Billing

These are the endpoints for Billing. More information coming soon.

GET
/v1/billing-accounts

List billing accounts

Description for this endpoint is coming soon.

Path attributes

  • Name
    pageToken
    Type
    string
    Description
  • Name
    pageSize
    Type
    integer
    Description
Request
GET
/v1/billing-accounts
curl 'https://rest.compute.cudo.org/v1/billing-accounts' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "billingAccounts": [
    {
      "id": "string",
      "createTime": "string",
      "displayName": "string",
      "stripeRef": "string",
      "createBy": "string",
      "monthlySpend": "string",
      "hourlySpendRate": "string",
      "taxIds": [
        {
          "id": "string",
          "type": "string",
          "value": "string"
        }
      ],
      "taxId": {
        "id": "string",
        "type": "string",
        "value": "string"
      },
      "invoiceTime": "string",
      "billingThreshold": {
        "value": "string"
      },
      "monthlySpendLimit": {
        "value": "string"
      },
      "hourlySpendLimit": {
        "value": "string"
      },
      "nextInvoiceTotal": {
        "value": "string"
      },
      "creditBalance": {
        "value": "string"
      },
      "creditBalanceRecharge": {
        "low": {
          "value": "string"
        },
        "high": {
          "value": "string"
        },
        "autoRecharge": "boolean",
        "transaction": {
          "id": "string",
          "amount": {
            "value": "string"
          },
          "description": "string",
          "createTime": "string",
          "status": "string",
          "succeeded": "boolean",
          "latestCharge": {
            "amount": {
              "value": "string"
            },
            "createTime": "string",
            "paid": "boolean",
            "refunded": "boolean",
            "status": "string",
            "failureCode": "string"
          },
          "lastPaymentError": {
            "code": "string",
            "declineCode": "string"
          }
        }
      },
      "billingAddress": {
        "name": "string",
        "phone": "string",
        "city": "string",
        "line1": "string",
        "line2": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string"
      },
      "state": "string",
      "paymentTerms": "string"
    }
  ],
  "pageToken": "string",
  "pageSize": "integer"
}

POST
/v1/billing-accounts

Create a billing account

Description for this endpoint is coming soon.

Request
POST
/v1/billing-accounts
curl 'https://rest.compute.cudo.org/v1/billing-accounts' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "displayName": "string",
    "invoiceName": "string",
    "email": "string",
    "taxIds": "array",
    "taxId": "object",
    "referral": "string",
    "billingAddress": "object"
}'
Response
{
  "id": "string",
  "createTime": "string",
  "displayName": "string",
  "stripeRef": "string",
  "createBy": "string",
  "monthlySpend": "string",
  "hourlySpendRate": "string",
  "taxIds": [
    {
      "id": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "taxId": {
    "id": "string",
    "type": "string",
    "value": "string"
  },
  "invoiceTime": "string",
  "billingThreshold": {
    "value": "string"
  },
  "monthlySpendLimit": {
    "value": "string"
  },
  "hourlySpendLimit": {
    "value": "string"
  },
  "nextInvoiceTotal": {
    "value": "string"
  },
  "creditBalance": {
    "value": "string"
  },
  "creditBalanceRecharge": {
    "low": {
      "value": "string"
    },
    "high": {
      "value": "string"
    },
    "autoRecharge": "boolean",
    "transaction": {
      "id": "string",
      "amount": {
        "value": "string"
      },
      "description": "string",
      "createTime": "string",
      "status": "string",
      "succeeded": "boolean",
      "latestCharge": {
        "amount": {
          "value": "string"
        },
        "createTime": "string",
        "paid": "boolean",
        "refunded": "boolean",
        "status": "string",
        "failureCode": "string"
      },
      "lastPaymentError": {
        "code": "string",
        "declineCode": "string"
      }
    }
  },
  "billingAddress": {
    "name": "string",
    "phone": "string",
    "city": "string",
    "line1": "string",
    "line2": "string",
    "state": "string",
    "postalCode": "string",
    "country": "string"
  },
  "state": "string",
  "paymentTerms": "string"
}

GET
/v1/billing-accounts/invoices

List invoices

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    pageSize
    Type
    integer
    Description
  • Name
    startingAfter
    Type
    string
    Description
  • Name
    status
    Type
    string
    Description
Request
GET
/v1/billing-accounts/invoices
curl 'https://rest.compute.cudo.org/v1/billing-accounts/invoices' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "invoices": [
    {
      "id": "string",
      "amountDue": "string",
      "amountPaid": "string",
      "amountRemaining": "string",
      "created": "string",
      "description": "string",
      "currency": "string",
      "hostedInvoiceUrl": "string",
      "status": "string",
      "dueDate": "string",
      "paidDate": "string",
      "billingReason": "string",
      "autoAdvance": "boolean",
      "periodStart": "string",
      "periodEnd": "string",
      "number": "string",
      "subtotalExcludingTax": "string",
      "subtotal": "string",
      "totalExcludingTax": "string",
      "tax": "string",
      "total": "string"
    }
  ],
  "hasMore": "boolean"
}

GET
/v1/billing-accounts/invoices/outstanding

Get outstanding invoices

Description for this endpoint is coming soon.

Request
GET
/v1/billing-accounts/invoices/outstanding
curl 'https://rest.compute.cudo.org/v1/billing-accounts/invoices/outstanding' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "invoices": [
    {
      "id": "string",
      "amountDue": "string",
      "amountPaid": "string",
      "amountRemaining": "string",
      "created": "string",
      "description": "string",
      "currency": "string",
      "hostedInvoiceUrl": "string",
      "status": "string",
      "dueDate": "string",
      "paidDate": "string",
      "billingReason": "string",
      "autoAdvance": "boolean",
      "periodStart": "string",
      "periodEnd": "string",
      "number": "string",
      "subtotalExcludingTax": "string",
      "subtotal": "string",
      "totalExcludingTax": "string",
      "tax": "string",
      "total": "string"
    }
  ]
}

PATCH
/v1/billing-accounts/{billingAccount.id}

Update billing account

Description for this endpoint is coming soon.

Body attributes

  • Name
    billingAccount
    Type
    object
    Description
  • Name
    updateMask
    Type
    string
    Description

Path attributes

  • Name
    billingAccount.id
    Type
    string
    Description
Request
PATCH
/v1/billing-accounts/{billingAccount.id}
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{billingAccount.id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "billingAccount": "object",
    "updateMask": "string"
}'
Response
{
  "id": "string",
  "createTime": "string",
  "displayName": "string",
  "stripeRef": "string",
  "createBy": "string",
  "monthlySpend": "string",
  "hourlySpendRate": "string",
  "taxIds": [
    {
      "id": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "taxId": {
    "id": "string",
    "type": "string",
    "value": "string"
  },
  "invoiceTime": "string",
  "billingThreshold": {
    "value": "string"
  },
  "monthlySpendLimit": {
    "value": "string"
  },
  "hourlySpendLimit": {
    "value": "string"
  },
  "nextInvoiceTotal": {
    "value": "string"
  },
  "creditBalance": {
    "value": "string"
  },
  "creditBalanceRecharge": {
    "low": {
      "value": "string"
    },
    "high": {
      "value": "string"
    },
    "autoRecharge": "boolean",
    "transaction": {
      "id": "string",
      "amount": {
        "value": "string"
      },
      "description": "string",
      "createTime": "string",
      "status": "string",
      "succeeded": "boolean",
      "latestCharge": {
        "amount": {
          "value": "string"
        },
        "createTime": "string",
        "paid": "boolean",
        "refunded": "boolean",
        "status": "string",
        "failureCode": "string"
      },
      "lastPaymentError": {
        "code": "string",
        "declineCode": "string"
      }
    }
  },
  "billingAddress": {
    "name": "string",
    "phone": "string",
    "city": "string",
    "line1": "string",
    "line2": "string",
    "state": "string",
    "postalCode": "string",
    "country": "string"
  },
  "state": "string",
  "paymentTerms": "string"
}

GET
/v1/billing-accounts/{billingAccountId}/spend/details

Get spend details

Description for this endpoint is coming soon.

Path attributes

  • Name
    billingAccountId
    Type
    string
    Description
  • Name
    startTime
    Type
    string
    Description
  • Name
    endTime
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{billingAccountId}/spend/details
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{billingAccountId}/spend/details' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "spend": [
    {
      "projectId": "string",
      "description": "string",
      "quantity": "number",
      "unit": "string",
      "unitAmount": {
        "value": "string"
      },
      "amount": {
        "value": "string"
      }
    }
  ]
}

GET
/v1/billing-accounts/{id}

Get a billing account

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "id": "string",
  "createTime": "string",
  "displayName": "string",
  "stripeRef": "string",
  "createBy": "string",
  "monthlySpend": "string",
  "hourlySpendRate": "string",
  "taxIds": [
    {
      "id": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "taxId": {
    "id": "string",
    "type": "string",
    "value": "string"
  },
  "invoiceTime": "string",
  "billingThreshold": {
    "value": "string"
  },
  "monthlySpendLimit": {
    "value": "string"
  },
  "hourlySpendLimit": {
    "value": "string"
  },
  "nextInvoiceTotal": {
    "value": "string"
  },
  "creditBalance": {
    "value": "string"
  },
  "creditBalanceRecharge": {
    "low": {
      "value": "string"
    },
    "high": {
      "value": "string"
    },
    "autoRecharge": "boolean",
    "transaction": {
      "id": "string",
      "amount": {
        "value": "string"
      },
      "description": "string",
      "createTime": "string",
      "status": "string",
      "succeeded": "boolean",
      "latestCharge": {
        "amount": {
          "value": "string"
        },
        "createTime": "string",
        "paid": "boolean",
        "refunded": "boolean",
        "status": "string",
        "failureCode": "string"
      },
      "lastPaymentError": {
        "code": "string",
        "declineCode": "string"
      }
    }
  },
  "billingAddress": {
    "name": "string",
    "phone": "string",
    "city": "string",
    "line1": "string",
    "line2": "string",
    "state": "string",
    "postalCode": "string",
    "country": "string"
  },
  "state": "string",
  "paymentTerms": "string"
}

DELETE
/v1/billing-accounts/{id}

Delete billing account

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
Request
DELETE
/v1/billing-accounts/{id}
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{}

POST
/v1/billing-accounts/{id}/credit

Add credit to billing account

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    amount.value
    Type
    string
    Description
  • Name
    paymentMethod
    Type
    string
    Description
  • Name
    radarSessionId
    Type
    string
    Description
Request
POST
/v1/billing-accounts/{id}/credit
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/credit' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "paymentIntent": {
    "clientSecret": "string"
  }
}

GET
/v1/billing-accounts/{id}/credit-balance-transactions

List credit balance transactions on a billing account

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    pageSize
    Type
    integer
    Description
  • Name
    startingAfter
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}/credit-balance-transactions
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/credit-balance-transactions' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "creditBalanceTransactions": [
    {
      "id": "string",
      "amount": {
        "value": "string"
      },
      "description": "string",
      "createTime": "string"
    }
  ],
  "hasMore": "boolean"
}

GET
/v1/billing-accounts/{id}/details

Get billing account details

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}/details
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/details' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "billingAccount": {
    "id": "string",
    "createTime": "string",
    "displayName": "string",
    "stripeRef": "string",
    "createBy": "string",
    "monthlySpend": "string",
    "hourlySpendRate": "string",
    "taxIds": [
      {
        "id": "string",
        "type": "string",
        "value": "string"
      }
    ],
    "taxId": {
      "id": "string",
      "type": "string",
      "value": "string"
    },
    "invoiceTime": "string",
    "billingThreshold": {
      "value": "string"
    },
    "monthlySpendLimit": {
      "value": "string"
    },
    "hourlySpendLimit": {
      "value": "string"
    },
    "nextInvoiceTotal": {
      "value": "string"
    },
    "creditBalance": {
      "value": "string"
    },
    "creditBalanceRecharge": {
      "low": {
        "value": "string"
      },
      "high": {
        "value": "string"
      },
      "autoRecharge": "boolean",
      "transaction": {
        "id": "string",
        "amount": {
          "value": "string"
        },
        "description": "string",
        "createTime": "string",
        "status": "string",
        "succeeded": "boolean",
        "latestCharge": {
          "amount": {
            "value": "string"
          },
          "createTime": "string",
          "paid": "boolean",
          "refunded": "boolean",
          "status": "string",
          "failureCode": "string"
        },
        "lastPaymentError": {
          "code": "string",
          "declineCode": "string"
        }
      }
    },
    "billingAddress": {
      "name": "string",
      "phone": "string",
      "city": "string",
      "line1": "string",
      "line2": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string"
    },
    "state": "string",
    "paymentTerms": "string"
  },
  "stripeCustomer": {
    "id": "string",
    "name": "string",
    "email": "string",
    "balance": {
      "value": "string"
    }
  }
}

GET
/v1/billing-accounts/{id}/payment-methods

Get payment methods

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}/payment-methods
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/payment-methods' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "paymentMethods": [
    {
      "id": "string",
      "type": "string",
      "card": {
        "brand": "string",
        "country": "string",
        "expMonth": "string",
        "expYear": "string",
        "fingerprint": "string",
        "last4": "string"
      },
      "paypal": {
        "payerEmail": "string",
        "payerId": "string"
      },
      "isDefault": "boolean"
    }
  ]
}

DELETE
/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}

Remove payment method

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    paymentMethodId
    Type
    string
    Description
Request
DELETE
/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "id": "string",
  "paymentMethodId": "string"
}

POST
/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default

Set default payment method

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    paymentMethodId
    Type
    string
    Description
Request
POST
/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "id": "string",
  "paymentMethodId": "string"
}

GET
/v1/billing-accounts/{id}/setup-intent

Get setup intent

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}/setup-intent
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/setup-intent' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "id": "string",
  "clientSecret": "string"
}

GET
/v1/billing-accounts/{id}/transactions

List transactions on a billing account

Description for this endpoint is coming soon.

Path attributes

  • Name
    id
    Type
    string
    Description
  • Name
    pageSize
    Type
    integer
    Description
  • Name
    startingAfter
    Type
    string
    Description
Request
GET
/v1/billing-accounts/{id}/transactions
curl 'https://rest.compute.cudo.org/v1/billing-accounts/{id}/transactions' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
  "transactions": [
    {
      "id": "string",
      "amount": {
        "value": "string"
      },
      "description": "string",
      "createTime": "string",
      "status": "string",
      "succeeded": "boolean",
      "latestCharge": {
        "amount": {
          "value": "string"
        },
        "createTime": "string",
        "paid": "boolean",
        "refunded": "boolean",
        "status": "string",
        "failureCode": "string"
      },
      "lastPaymentError": {
        "code": "string",
        "declineCode": "string"
      }
    }
  ],
  "hasMore": "boolean"
}