Billing
user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe automatic top-up
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
enabled*booleanWhether automatic top-up is enabled.
target_cents?|The balance targeted by a top-up, in cents, or null when unset.
int64threshold_cents?|The balance that triggers a top-up, in cents, or null when unset.
int64curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/automatic-top-up'{ "currency": "string", "enabled": true, "target_cents": 0, "threshold_cents": 0}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidAutomatic top-up reset
curl -X DELETE 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/automatic-top-up'user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
target_cents*integerThe balance targeted by a top-up, in cents.
int64value <= 99999999threshold_cents*integerThe balance that triggers a top-up, in cents.
int641000 <= value <= 99998999The automatic top-up, updated
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
enabled*booleanWhether automatic top-up is enabled.
target_cents?|The balance targeted by a top-up, in cents, or null when unset.
int64threshold_cents?|The balance that triggers a top-up, in cents, or null when unset.
int64curl -X PUT 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/automatic-top-up' \ -H 'Content-Type: application/json' \ -d '{ "target_cents": 99999999, "threshold_cents": 1000}'{ "currency": "string", "enabled": true, "target_cents": 0, "threshold_cents": 0}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe balance notification
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
enabled*booleanWhether low-balance notifications are enabled.
threshold_cents?|The notification threshold in cents, or null when unset.
int64curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/balance-notification'{ "currency": "string", "enabled": true, "threshold_cents": 0}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidBalance notification reset
curl -X DELETE 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/balance-notification'user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
threshold_cents*integerThe notification threshold in cents.
int64500 <= value <= 5000000The balance notification, updated
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
enabled*booleanWhether low-balance notifications are enabled.
threshold_cents?|The notification threshold in cents, or null when unset.
int64curl -X PUT 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/balance-notification' \ -H 'Content-Type: application/json' \ -d '{ "threshold_cents": 500}'{ "currency": "string", "enabled": true, "threshold_cents": 0}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidlimit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of balances
application/json- response
balances*array<>The balances in this page.
next_cursor?|The next page cursor, or null at the end.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/balances'{ "balances": [ { "applicable_to": null, "balance_cents": 0, "created_at": "2019-08-24T14:15:22Z", "currency": "string", "expires_at": "2019-08-24T14:15:22Z", "granted_amount_cents": 0, "id": "string", "name": "string", "type": "credit" } ], "next_cursor": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidlimit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of charges
application/json- response
charges*array<>The charges in this page.
next_cursor?|The next page cursor, or null at the end.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/charges'{ "charges": [ { "amount_cents": 0, "created_at": "2019-08-24T14:15:22Z", "currency": "string", "description": "string", "failure_message": "string", "has_invoice": true, "has_pdf": true, "id": "string", "invoice_url": "string", "receipt_url": "string", "status": "succeeded" } ], "next_cursor": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidcharge_id*stringThe charge ID
The charge receipt PDF
response?ChargeReceiptPdfapplication/pdfThe charge receipt PDF.
binarycurl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/charges/string/pdf'"string"user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe billing contact
application/json- response
effective_email?|The email currently used for billing notices, or null when unavailable.
email?|The configured billing email, or null when unset.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/contact'{ "effective_email": "string", "email": "string"}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
email?|The billing email to set, or null to restore the default.
The billing contact, updated
application/json- response
effective_email?|The email currently used for billing notices, or null when unavailable.
email?|The configured billing email, or null when unset.
curl -X PUT 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/contact' \ -H 'Content-Type: application/json' \ -d '{}'{ "effective_email": "string", "email": "string"}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
code*stringThe coupon code.
^[A-Za-z0-9_-]{1,64}$The created coupon redemption
application/json- response
code*stringThe redeemed coupon code.
credit_cents*integerThe granted credit in cents.
int64credit_expires_at?|When the granted credit expires, or null when it does not expire.
date-timecurrency*stringThe lowercase ISO 4217 currency code.
redeemed_at*stringWhen the coupon was redeemed.
date-timecurl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/coupons/redeem' \ -H 'Content-Type: application/json' \ -d '{ "code": "string"}'{ "code": "string", "credit_cents": 0, "credit_expires_at": "2019-08-24T14:15:22Z", "currency": "string", "redeemed_at": "2019-08-24T14:15:22Z"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidlimit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
unpaid?booleanWhether to return only unpaid invoices (default false)
The page of invoices
application/json- response
invoices*array<>The invoices in this page.
next_cursor?|The next page cursor, or null at the end.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/invoices'{ "invoices": [ { "currency": "string", "file_url": "string", "has_pdf": true, "id": "string", "issued_at": "2019-08-24T14:15:22Z", "number": "string", "payment_due_at": "2019-08-24T14:15:22Z", "payment_overdue": true, "payment_status": "pending", "status": "draft", "subtotal_amount_cents": 0, "suspends_at": "2019-08-24T14:15:22Z", "taxes_amount_cents": 0, "total_amount_cents": 0, "total_due_amount_cents": 0, "type": "usage" } ], "next_cursor": "string"}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidinvoice_id*stringThe invoice ID
The created billing session
application/json- response
expires_at?|When the session expires, or null when the provider does not expose an expiry.
date-timeurl*stringThe generated session URL.
curl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/invoices/string/payment-sessions'{ "expires_at": "2019-08-24T14:15:22Z", "url": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidinvoice_id*stringThe invoice ID
The invoice PDF
response?InvoicePdfapplication/pdfThe invoice PDF.
binarycurl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/invoices/string/pdf'"string"user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidThe created billing session
application/json- response
expires_at?|When the session expires, or null when the provider does not expose an expiry.
date-timeurl*stringThe generated session URL.
curl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/payment-method-sessions'{ "expires_at": "2019-08-24T14:15:22Z", "url": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidlimit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of payment methods
application/json- response
next_cursor?|The next page cursor, or null at the end.
payment_methods*array<>The payment methods in this page.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/payment-methods'{ "next_cursor": "string", "payment_methods": [ { "brand": "amex", "exp_month": 0, "exp_year": 0, "id": "string", "is_default": true, "last4": "string" } ]}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe billing plan
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
current_period?|The current billing period, or null when unavailable.
entitlements*array<string>The entitlement keys included in the plan.
fee_cents*integerThe recurring plan fee in cents.
int64limits*The plan limits.
monthly_credit_cents*integerThe monthly included credit in cents.
int64pending?|The scheduled plan change, or null when none is pending.
plan*PlanNameThe scheduled plan.
"starter""team""enterprise"self_serve*booleanWhether members can change this plan through the API.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/plan'{ "currency": "string", "current_period": null, "entitlements": [ "string" ], "fee_cents": 0, "limits": { "max_concurrent_gpu_sandboxes": 0, "max_concurrent_sandboxes": 0, "max_members": 0, "max_sandbox_memory_mib": 0, "max_sandbox_vcpus": 0 }, "monthly_credit_cents": 0, "pending": null, "plan": "starter", "self_serve": true}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
plan*PlanNameThe requested plan.
"starter""team""enterprise"The billing plan, updated
application/json- response
currency*stringThe lowercase ISO 4217 currency code.
current_period?|The current billing period, or null when unavailable.
entitlements*array<string>The entitlement keys included in the plan.
fee_cents*integerThe recurring plan fee in cents.
int64limits*The plan limits.
monthly_credit_cents*integerThe monthly included credit in cents.
int64pending?|The scheduled plan change, or null when none is pending.
plan*PlanNameThe scheduled plan.
"starter""team""enterprise"self_serve*booleanWhether members can change this plan through the API.
curl -X PUT 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/plan' \ -H 'Content-Type: application/json' \ -d '{ "plan": "starter"}'{ "currency": "string", "current_period": null, "entitlements": [ "string" ], "fee_cents": 0, "limits": { "max_concurrent_gpu_sandboxes": 0, "max_concurrent_sandboxes": 0, "max_members": 0, "max_sandbox_memory_mib": 0, "max_sandbox_vcpus": 0 }, "monthly_credit_cents": 0, "pending": null, "plan": "starter", "self_serve": true}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe billing plans
application/json- response
plans*array<>The billing plan catalog.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/plans'{ "plans": [ { "currency": "string", "entitlements": [ "string" ], "fee_cents": 0, "limits": { "max_concurrent_gpu_sandboxes": 0, "max_concurrent_sandboxes": 0, "max_members": 0, "max_sandbox_memory_mib": 0, "max_sandbox_vcpus": 0 }, "monthly_credit_cents": 0, "plan": "starter", "self_serve": true } ]}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidThe created billing session
application/json- response
expires_at?|When the session expires, or null when the provider does not expose an expiry.
date-timeurl*stringThe generated session URL.
curl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/portal-sessions'{ "expires_at": "2019-08-24T14:15:22Z", "url": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe billing profile
application/json- response
address*The billing address.
email*stringThe billing contact email.
name*stringThe legal billing name.
phone*stringThe billing contact phone number.
tax_ids*array<>The registered tax identifiers.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/profile'{ "address": { "city": "string", "country": "string", "line1": "string", "line2": "string", "postal_code": "string", "state": "string" }, "email": "string", "name": "string", "phone": "string", "tax_ids": [ { "type": "ad_nrt", "value": "string" } ]}user_jwt write:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: write:billing
org_id*stringThe organization ID
uuidapplication/json- body
amount_cents*integerThe amount to add in cents.
int641000 <= value <= 99999999The created billing session
application/json- response
expires_at?|When the session expires, or null when the provider does not expose an expiry.
date-timeurl*stringThe generated session URL.
curl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/top-up-sessions' \ -H 'Content-Type: application/json' \ -d '{ "amount_cents": 1000}'{ "expires_at": "2019-08-24T14:15:22Z", "url": "string"}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidlimit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of usage periods
application/json- response
next_cursor?|The next page cursor, or null at the end.
usage_periods*array<>The usage periods in this page, newest first.
curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/usage-periods'{ "next_cursor": "string", "usage_periods": [ { "amount_cents": 0, "charges": [ { "billable_metric": "string", "events_count": 0, "name": "string", "quantity": 0.1, "total_cents": 0, "units": "string" } ], "currency": "string", "end_at": "2019-08-24T14:15:22Z", "issued_at": "2019-08-24T14:15:22Z", "start_at": "2019-08-24T14:15:22Z", "status": "open", "taxes_amount_cents": 0, "total_amount_cents": 0 } ]}user_jwt read:billingAuthorizationBearer <token>Bearer access token for a signed-in user.
Scope: read:billing
org_id*stringThe organization ID
uuidThe wallet
application/json- response
automatic_top_up*The automatic top-up setting, including its unset state.
balance_cents*integerThe total available balance in cents.
int64billing_type*BillingTypeThe organization's billing arrangement.
"pre-paid""post-paid"currency*stringThe lowercase ISO 4217 currency code.
free_credits_balance_cents*integerThe promotional-credit balance in cents.
int64paid_credits_balance_cents*integerThe purchased-credit balance in cents.
int64total_amount_due_this_month_cents*integerThe amount due in the current month, in cents.
int64total_spent_this_month_cents*integerThe amount spent in the current month, in cents.
int64curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/wallet'{ "automatic_top_up": { "currency": "string", "enabled": true, "target_cents": 0, "threshold_cents": 0 }, "balance_cents": 0, "billing_type": "pre-paid", "currency": "string", "free_credits_balance_cents": 0, "paid_credits_balance_cents": 0, "total_amount_due_this_month_cents": 0, "total_spent_this_month_cents": 0}