DELETE
/v1/billing/credits/auto-top-up
Disable Auto Top-Up
Disable automatic credit replenishment.
Auth
Bearer token or API key; tenant context required.
Success
200
- Auto top-up disabled.
POST
/v1/billing/credits/auto-top-up
Set Auto Top-Up
Enable or update automatic credit top-up policy.
Auth
Bearer token or API key; tenant context required.
Success
200
- Auto top-up saved.
Body / Path Fields
-
threshold_cents
(integer)
-
required
- Trigger threshold.
-
top_up_amount_cents
(integer)
-
required
- Recharge amount.
-
payment_method_id
(string)
-
required
- Funding source.
Common Errors
-
3001
- Invalid auto top-up configuration
{
"payment_method_id": "pm_1",
"threshold_cents": 500,
"top_up_amount_cents": 5000
}
GET
/v1/billing/credits/balance
Get Credit Balance
Return current balance and thresholds.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns available balance.
{
"auto_top_up": true,
"balance_cents": 12340
}
POST
/v1/billing/credits/purchase
Purchase Credits
Buy prepaid credits for message and RPC usage.
Auth
Bearer token or API key; tenant context required.
Success
200
- Purchase initiated.
Body / Path Fields
-
amount_cents
(integer)
-
required
- Credit purchase amount in cents.
-
currency
(string)
-
optional
- Defaults to usd.
-
provider
(string)
-
optional
- stripe or nowpayments.
Common Errors
-
3001
- Invalid credit purchase payload
{
"amount_cents": 2000,
"currency": "usd",
"provider": "stripe"
}
{
"payment_id": "pay_1",
"status": "pending"
}
GET
/v1/billing/credits/transactions
List Credit Transactions
List debits and credits with pagination.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns transaction ledger.
Query Params
-
page
(integer)
-
optional
- Page number.
-
per_page
(integer)
-
optional
- Page size.
{
"transactions": [
{
"amount_cents": 3,
"type": "debit"
}
]
}
GET
/v1/billing/invoices
List Invoices
List invoices for the organization.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns invoices.
Query Params
-
page
(integer)
-
optional
- Page number.
-
per_page
(integer)
-
optional
- Page size.
{
"invoices": [
{
"id": "inv_1",
"status": "paid"
}
]
}
GET
/v1/billing/invoices/:id
Get Invoice
Fetch invoice detail record.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns invoice details.
Body / Path Fields
-
id
(path)
-
required
- Invoice ID.
{
"invoice": {
"id": "inv_1",
"total_cents": 2300
}
}
GET
/v1/billing/invoices/:id/pdf
Get Invoice PDF
Download invoice PDF document.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns PDF binary stream.
Body / Path Fields
-
id
(path)
-
required
- Invoice ID.
Common Errors
-
3001
- Invoice PDF not found
{
"content_type": "application/pdf"
}
GET
/v1/billing/payment-methods
List Payment Methods
List saved payment methods.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns methods.
{
"payment_methods": [
{
"brand": "visa",
"id": "pm_1"
}
]
}
POST
/v1/billing/payment-methods
Create Payment Method Setup
Create setup intent / attach payment method.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns setup secret and workflow details.
Body / Path Fields
-
provider
(string)
-
optional
- Defaults to stripe.
-
payment_method_type
(string)
-
optional
- card etc.
Common Errors
-
3001
- Invalid payment method request
{
"payment_method_type": "card",
"provider": "stripe"
}
{
"client_secret": "seti_..._secret_..."
}
DELETE
/v1/billing/payment-methods/:id
Delete Payment Method
Remove one payment method.
Auth
Bearer token or API key; tenant context required.
Success
200
- Payment method removed.
Body / Path Fields
-
id
(path)
-
required
- Payment method ID.
Common Errors
-
3001
- Payment method not found
PATCH
/v1/billing/payment-methods/:id/set-default
Set Default Payment Method
Mark a payment method as default.
Auth
Bearer token or API key; tenant context required.
Success
200
- Default payment method updated.
Body / Path Fields
-
id
(path)
-
required
- Payment method ID.
Common Errors
-
3001
- Payment method not found
GET
/v1/billing/payments/:payment_id/status
Get Payment Status
Poll payment session status by payment id.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns payment lifecycle state.
Body / Path Fields
-
payment_id
(path)
-
required
- Provider payment/session ID.
{
"payment_id": "pay_1",
"status": "confirmed"
}
GET
/v1/billing/payments/currencies
List Supported Currencies
List currencies accepted by payment providers.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns supported currencies.
{
"currencies": [
"usd",
"eur",
"usdt"
]
}
GET
/v1/billing/payments/estimate
Estimate Payment
Estimate provider totals and fees for a requested amount.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns estimated totals and fees.
Query Params
-
provider
(string)
-
required
- stripe or nowpayments.
-
amount_cents
(integer)
-
required
- Requested amount.
-
currency
(string)
-
optional
- Currency code.
Common Errors
-
3001
- Invalid estimate query
{
"fee_cents": 90,
"subtotal_cents": 2000,
"total_cents": 2090
}
GET
/v1/billing/payments/minimum
Get Minimum Payment
Return minimum purchase amounts per provider/currency.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns minimum thresholds.
Query Params
-
provider
(string)
-
optional
- Optional provider filter.
-
currency
(string)
-
optional
- Optional currency filter.
{
"currency": "usd",
"minimum_cents": 500
}
GET
/v1/billing/subscriptions
List Subscriptions
List subscriptions for the organization.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns subscriptions.
{
"subscriptions": [
{
"id": "sub_1",
"status": "active"
}
]
}
DELETE
/v1/billing/subscriptions/:id
Cancel Subscription
Cancel an active subscription.
Auth
Bearer token or API key; tenant context required.
Success
200
- Cancellation accepted.
Body / Path Fields
-
id
(path)
-
required
- Subscription ID.
Common Errors
-
3001
- Subscription not found
{
"status": "cancelled"
}
GET
/v1/billing/subscriptions/:id
Get Subscription
Fetch one subscription by id.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns subscription details.
Body / Path Fields
-
id
(path)
-
required
- Subscription ID.
Common Errors
-
3001
- Subscription not found
{
"subscription": {
"id": "sub_1",
"status": "active"
}
}
POST
/v1/billing/subscriptions/create
Create Subscription Checkout
Start checkout flow for recurring subscription.
Auth
Bearer token or API key; tenant context required.
Success
200
- Returns checkout URL or payment metadata.
Body / Path Fields
-
provider
(string)
-
required
- stripe or nowpayments.
-
plan_type
(string)
-
required
- starter|pro|enterprise.
-
payment_flow
(string)
-
optional
- direct or hosted (nowpayments).
Common Errors
-
3001
- Invalid provider or plan
{
"plan_type": "pro",
"provider": "stripe"
}
{
"checkout_url": "https://checkout.stripe.com/..."
}