$0.00, inbound
calls are rejected and outbound calls return 402 Payment Required.
These endpoints let you query balance state, top up via Stripe, and
configure automatic reloads.
Endpoints
Billing account object
Get billing account
200 OK with a Billing account object.
Update auto-reload
Enable, disable, or reconfigure automatic balance reloads. A payment method must be on file (has_payment_method: true) before
auto_reload_enabled can be set to true — otherwise the server
returns 422 Unprocessable Entity with
{"detail": "Auto-reload requires a default payment method. Create a setup intent first."}.
Returns
200 OK with the updated Billing account object.
Top up balance
Create a one-time charge to increase your balance. Uses the default payment method unlesspayment_method_id is supplied.
Returns
201 Created:
When
status === "succeeded" the balance is credited synchronously
from the request. When status === "requires_action", complete the
3DS flow client-side and wait for the payment_intent.succeeded
webhook — then poll GET /v1/billing to
observe the credit.
Errors
Validation problems (e.g. a missing or non-positiveamount_cents)
return 400 with a standard DRF field-error body:
code, plus message/detail, a retryable hint,
and a next_action your client can act on:
402 example
These same coded errors are returned by the other billing write
endpoints when they hit Stripe (
/setup-intent,
/default-payment-method).
Add / save a payment method
Two-step flow: create a SetupIntent, confirm it client-side, then set the resulting payment-method id as the org’s default.1. Create a SetupIntent
Response
2. Confirm client-side with Stripe.js
See the Stripe documentation forstripe.confirmCardSetup(). On success you receive a
payment_method id.
3. Mark the payment method as default
200 OK with the updated Billing account object;
has_payment_method is now true.
List transactions
Returns every ledger entry on the account — top-ups, per-call usage, monthly number fees, and manual adjustments — newest first.Query parameters
The response is a plain JSON array of transaction objects (no
{results, total} envelope). Page forward by increasing offset
until you receive fewer rows than limit.
Transaction object
Stripe webhook
ThunderPhone receives Stripe webhooks at/v1/stripe/webhook internally — you don’t interact with this endpoint
directly. It processes payment_intent.succeeded,
payment_intent.payment_failed, and setup_intent.succeeded events to
update balances and mark payment methods ready.
Related
Outbound Calls
Outbound calls require positive balance.
Pricing
Per-minute pricing by product tier.