ThunderPhone Billing API
The billing API from ThunderPhone — 8 operation(s) for billing.
The billing API from ThunderPhone — 8 operation(s) for billing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/thunderphone-com:thunderphone-com-billing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: ThunderPhone Billing API
version: 1.0.0
description: Programmatic access to the ThunderPhone platform — agents, phone numbers, calls, billing, webhooks, and more. See https://thunderphone.com/docs and https://thunderphone.com/developers for the reference, tutorials and migration guides.
contact:
name: ThunderPhone support
url: https://thunderphone.com/docs
servers:
- url: https://api.thunderphone.com
description: Production
tags:
- name: Billing
paths:
/v1/billing:
get:
operationId: billing_list
description: Retrieve billing. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
security:
- bearerAuth: []
- bearerAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BillingAccount'
description: ''
summary: Billing list
x-summary-source: derived
patch:
operationId: billing_bulk_update
description: Update billing. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedAutoReloadRequest'
security:
- humanToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BillingAccountUpdateResponse'
description: ''
summary: Billing bulk update
x-summary-source: derived
/v1/billing/top-up:
post:
operationId: billing_top_up_create
description: Create or run billing / top up. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TopUpRequest'
required: true
security:
- humanToken: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TopUpResponse'
description: ''
summary: Billing top up create
x-summary-source: derived
/v1/billing/transactions:
get:
operationId: billing_transactions_list
description: Retrieve billing / transactions. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
security:
- bearerAuth: []
- bearerAuth: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BalanceTransaction'
description: ''
summary: Billing transactions list
x-summary-source: derived
/v1/billing/transactions/{transaction_id}/receipt:
get:
operationId: billing_transactions_receipt_retrieve
description: Link to the payment receipt for a top-up or automatic top-up transaction.
parameters:
- in: path
name: transaction_id
schema:
type: integer
required: true
tags:
- Billing
security:
- bearerAuth: []
- bearerAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BillingTransactionReceipt'
description: ''
summary: Billing transactions receipt retrieve
x-summary-source: derived
/v1/billing/setup-intent:
post:
operationId: billing_setup_intent_create
description: Create or run billing / setup intent. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
security:
- humanToken: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/SetupIntent'
description: ''
requestBody:
required: false
content:
application/json:
schema:
type: object
additionalProperties: false
summary: Billing setup intent create
x-summary-source: derived
/v1/billing/default-payment-method:
post:
operationId: billing_default_payment_method_create
description: Create or run billing / default payment method. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Billing
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DefaultPaymentMethodRequest'
required: true
security:
- humanToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BillingAccount'
description: ''
summary: Billing default payment method create
x-summary-source: derived
/v1/billing/payment-methods:
get:
operationId: billing_payment_methods_list
description: Every saved card on the org's Stripe customer, default first.
tags:
- Billing
security:
- bearerAuth: []
- bearerAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BillingPaymentMethodList'
description: ''
summary: Billing payment methods list
x-summary-source: derived
/v1/billing/payment-methods/{payment_method_id}:
delete:
operationId: billing_payment_methods_delete
description: Delete billing / payment methods. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
parameters:
- in: path
name: payment_method_id
schema:
type: string
required: true
tags:
- Billing
security:
- humanToken: []
responses:
'204':
description: No response body
summary: Billing payment methods delete
x-summary-source: derived
components:
schemas:
TopUpRequest:
type: object
properties:
amount_cents:
type: integer
minimum: 1
payment_method_id:
type: string
idempotency_key:
type: string
minLength: 1
maxLength: 64
required:
- amount_cents
BillingAccountUpdateResponse:
type: object
description: 'PATCH /v1/billing''s answer: the account, as GET /v1/billing, and what ``charge_now`` did (null when not sent).'
properties:
balance_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
available_cash_cents: {}
number_credit_available:
type: boolean
readOnly: true
description: True when the free call credit would pay a new ThunderPhone number's first charge now (its first month and setup fee; one number per account, while that much of the credit is left). That number is released 7 days after purchase unless funds are added.
test_call_budget_cents:
type: integer
readOnly: true
test_call_budget_remaining_cents:
type: integer
readOnly: true
balance_usd:
type: string
readOnly: true
currency:
type: string
maxLength: 8
auto_reload_enabled:
type: boolean
auto_reload_minimum_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
auto_reload_amount_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
auto_reload_monthly_limit_cents:
type:
- integer
- 'null'
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
monthly_spending_limit_cents:
type:
- integer
- 'null'
readOnly: true
current_month_usage_spend_cents:
type: integer
description: 'This UTC calendar month''s usage debits: what the monthly spending limit counts.'
readOnly: true
month_spend_cents:
type: integer
description: 'Usage debits this month in the account''s reporting time zone, today included: what Home, Billing
and Zeus''s chat say was spent this month (billing.services.month_usage_spend_cents). Number fees and
calls from the account''s own test numbers are in; the customer paid for them.'
readOnly: true
average_daily_spend_cents_7d:
type:
- integer
- 'null'
readOnly: true
balance_runway_days:
type:
- integer
- 'null'
readOnly: true
last_top_up:
allOf:
- $ref: '#/components/schemas/LastTopUp'
readOnly: true
spending_limit_reached:
type: boolean
readOnly: true
auto_reload_in_progress:
type: boolean
auto_reload_last_error:
type:
- string
- 'null'
readOnly: true
auto_reload_paused:
type: boolean
readOnly: true
auto_reload_paused_until:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_failure_code:
type:
- string
- 'null'
readOnly: true
auto_reload_status:
allOf:
- $ref: '#/components/schemas/AutoReloadStatusEnum'
readOnly: true
auto_reload_next_retry_at:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_failed_amount_cents:
type:
- integer
- 'null'
readOnly: true
auto_reload_failed_at:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_consecutive_declines:
type:
- integer
- 'null'
minimum: 1
readOnly: true
last_auto_reload:
allOf:
- $ref: '#/components/schemas/LastAutoReload'
readOnly: true
auto_reload_month_spend_cents:
type: integer
description: Auto top-up credits this calendar month (UTC), as the monthly cap counts them.
readOnly: true
last_manual_topup_error:
type:
- string
- 'null'
readOnly: true
last_manual_topup_intent_id:
type:
- string
- 'null'
readOnly: true
has_payment_method:
type: boolean
readOnly: true
has_ever_topped_up:
type: boolean
readOnly: true
pricing:
allOf:
- $ref: '#/components/schemas/BillingPricing'
readOnly: true
charge_now_result:
allOf:
- $ref: '#/components/schemas/ChargeNowResult'
readOnly: true
required:
- auto_reload_consecutive_declines
- auto_reload_failed_amount_cents
- auto_reload_failed_at
- auto_reload_failure_code
- auto_reload_last_error
- auto_reload_month_spend_cents
- auto_reload_next_retry_at
- auto_reload_paused
- auto_reload_paused_until
- auto_reload_status
- average_daily_spend_cents_7d
- balance_runway_days
- balance_usd
- charge_now_result
- current_month_usage_spend_cents
- has_ever_topped_up
- has_payment_method
- last_auto_reload
- last_manual_topup_error
- last_manual_topup_intent_id
- last_top_up
- month_spend_cents
- monthly_spending_limit_cents
- number_credit_available
- pricing
- spending_limit_reached
- test_call_budget_cents
- test_call_budget_remaining_cents
PatchedAutoReloadRequest:
type: object
properties:
auto_reload_enabled:
type: boolean
auto_reload_minimum_cents:
type: integer
minimum: 0
auto_reload_amount_cents:
type: integer
minimum: 0
auto_reload_monthly_limit_cents:
type:
- integer
- 'null'
minimum: 0
charge_now:
type: boolean
writeOnly: true
description: 'Set true once the person has agreed that saving charges the card now: the balance is already under the saved auto_reload_minimum_cents, so auto-reload charges auto_reload_amount_cents right after the save, and the response''s charge_now_result says what happened. Without it nothing is charged by the save itself; auto-reload then runs on the next charge (a call, a phone number).'
BillingPaymentMethod:
type: object
description: A saved card on the org's Stripe customer (read-only projection).
properties:
id:
type: string
brand:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
exp_month:
type:
- integer
- 'null'
exp_year:
type:
- integer
- 'null'
is_default:
type: boolean
is_backup:
type: boolean
required:
- brand
- exp_month
- exp_year
- id
- is_backup
- is_default
- last4
AutoReloadStatusEnum:
enum:
- 'off'
- ok
- retrying
- stopped
- capped
type: string
description: '* `off` - off
* `ok` - ok
* `retrying` - retrying
* `stopped` - stopped
* `capped` - capped'
ChargeNowResult:
type: object
description: What PATCH /v1/billing's ``charge_now`` did (billing.services.charge_auto_reload_now).
properties:
status:
allOf:
- $ref: '#/components/schemas/ChargeNowResultStatusEnum'
description: 'charged: the card was charged and the balance has it. pending: a charge is on its way and hasn''t settled (including one already in flight when the save came); the balance updates when it does. declined: the card (and any backup card) was declined and nothing was charged; auto-reload stays switched on, but won''t charge until the card is updated or the pause ends. error: nothing was charged and no decline was recorded; auto-reload stays on and tries again after a later charge. not_charged: nothing was charged now.
* `charged` - charged
* `pending` - pending
* `declined` - declined
* `error` - error
* `not_charged` - not_charged'
amount_cents:
type: integer
required:
- amount_cents
- status
BillingPricingModelEnum:
enum:
- grandfathered
- cost_plus
- contract
type: string
description: '* `grandfathered` - Current pricing
* `cost_plus` - New pricing
* `contract` - Contract'
BillingTransactionReceipt:
type: object
properties:
receipt_url:
type: string
format: uri
required:
- receipt_url
DefaultPaymentMethodRequest:
type: object
properties:
payment_method_id:
type: string
minLength: 1
required:
- payment_method_id
BalanceTransaction:
type: object
properties:
id:
type: integer
readOnly: true
kind:
allOf:
- $ref: '#/components/schemas/BalanceTransactionKindEnum'
readOnly: true
description: 'The transaction''s broad kind. Newer charges are reported as adjustment; charge_type says what they are.
* `manual_topup` - Manual Top-Up
* `auto_reload` - Auto Reload
* `call_usage` - Call Usage
* `phone_number_monthly` - Phone Number Monthly
* `conversion_report` - Conversion Report
* `voice_sample_usage` - Voice Sample Usage
* `adjustment` - Adjustment
* `transfer_bridge` - Transfer Bridge'
description:
type: string
readOnly: true
amount_cents:
type: integer
readOnly: true
amount_usd:
type: string
readOnly: true
call_id:
type:
- integer
- 'null'
readOnly: true
phone_number_id:
type:
- integer
- 'null'
readOnly: true
phone_number_value:
type:
- string
- 'null'
readOnly: true
metadata:
readOnly: true
has_receipt:
type: boolean
readOnly: true
payment_method_brand:
type:
- string
- 'null'
readOnly: true
payment_method_last4:
type:
- string
- 'null'
readOnly: true
is_adjustment:
type: boolean
readOnly: true
description: 'True on a later change to a call''s charge (kind call_usage): usage that arrived after the call was billed (a debit), or a call abroad settled at what the phone carrier billed for it (a debit, or a credit with a positive amount_cents). False on every other transaction.'
default: false
charge_type:
type: string
readOnly: true
description: 'What the transaction is, more specific than kind (a plain string, not an enum): the kind itself, or for a charge reported as adjustment one of simulation_caller (a side-by-side test call''s simulated caller), caller_reputation (spam-label monitoring), line_type_lookup (a campaign''s number type lookups) or own_number_check (checking a number the account owns before calls show it). More values may be added.'
agent_id:
type:
- integer
- 'null'
readOnly: true
description: The agent on the call a call charge is for (call_usage, a transfer, a later increase); null for every other transaction, and for a call with no agent.
created_at:
type: string
format: date-time
readOnly: true
required:
- amount_cents
- amount_usd
- call_id
- created_at
- description
- has_receipt
- id
- kind
- metadata
- payment_method_brand
- payment_method_last4
- phone_number_id
- phone_number_value
BalanceTransactionKindEnum:
enum:
- manual_topup
- auto_reload
- call_usage
- phone_number_monthly
- conversion_report
- voice_sample_usage
- adjustment
- transfer_bridge
type: string
description: '* `manual_topup` - Manual Top-Up
* `auto_reload` - Auto Reload
* `call_usage` - Call Usage
* `phone_number_monthly` - Phone Number Monthly
* `conversion_report` - Conversion Report
* `voice_sample_usage` - Voice Sample Usage
* `adjustment` - Adjustment
* `transfer_bridge` - Transfer Bridge'
BillingAccount:
type: object
properties:
balance_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
available_cash_cents: {}
number_credit_available:
type: boolean
readOnly: true
description: True when the free call credit would pay a new ThunderPhone number's first charge now (its first month and setup fee; one number per account, while that much of the credit is left). That number is released 7 days after purchase unless funds are added.
test_call_budget_cents:
type: integer
readOnly: true
test_call_budget_remaining_cents:
type: integer
readOnly: true
balance_usd:
type: string
readOnly: true
currency:
type: string
maxLength: 8
auto_reload_enabled:
type: boolean
auto_reload_minimum_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
auto_reload_amount_cents:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
auto_reload_monthly_limit_cents:
type:
- integer
- 'null'
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
monthly_spending_limit_cents:
type:
- integer
- 'null'
readOnly: true
current_month_usage_spend_cents:
type: integer
description: 'This UTC calendar month''s usage debits: what the monthly spending limit counts.'
readOnly: true
month_spend_cents:
type: integer
description: 'Usage debits this month in the account''s reporting time zone, today included: what Home, Billing
and Zeus''s chat say was spent this month (billing.services.month_usage_spend_cents). Number fees and
calls from the account''s own test numbers are in; the customer paid for them.'
readOnly: true
average_daily_spend_cents_7d:
type:
- integer
- 'null'
readOnly: true
balance_runway_days:
type:
- integer
- 'null'
readOnly: true
last_top_up:
allOf:
- $ref: '#/components/schemas/LastTopUp'
readOnly: true
spending_limit_reached:
type: boolean
readOnly: true
auto_reload_in_progress:
type: boolean
auto_reload_last_error:
type:
- string
- 'null'
readOnly: true
auto_reload_paused:
type: boolean
readOnly: true
auto_reload_paused_until:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_failure_code:
type:
- string
- 'null'
readOnly: true
auto_reload_status:
allOf:
- $ref: '#/components/schemas/AutoReloadStatusEnum'
readOnly: true
auto_reload_next_retry_at:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_failed_amount_cents:
type:
- integer
- 'null'
readOnly: true
auto_reload_failed_at:
type:
- string
- 'null'
format: date-time
readOnly: true
auto_reload_consecutive_declines:
type:
- integer
- 'null'
minimum: 1
readOnly: true
last_auto_reload:
allOf:
- $ref: '#/components/schemas/LastAutoReload'
readOnly: true
auto_reload_month_spend_cents:
type: integer
description: Auto top-up credits this calendar month (UTC), as the monthly cap counts them.
readOnly: true
last_manual_topup_error:
type:
- string
- 'null'
readOnly: true
last_manual_topup_intent_id:
type:
- string
- 'null'
readOnly: true
has_payment_method:
type: boolean
readOnly: true
has_ever_topped_up:
type: boolean
readOnly: true
pricing:
allOf:
- $ref: '#/components/schemas/BillingPricing'
readOnly: true
required:
- auto_reload_consecutive_declines
- auto_reload_failed_amount_cents
- auto_reload_failed_at
- auto_reload_failure_code
- auto_reload_last_error
- auto_reload_month_spend_cents
- auto_reload_next_retry_at
- auto_reload_paused
- auto_reload_paused_until
- auto_reload_status
- average_daily_spend_cents_7d
- balance_runway_days
- balance_usd
- current_month_usage_spend_cents
- has_ever_topped_up
- has_payment_method
- last_auto_reload
- last_manual_topup_error
- last_manual_topup_intent_id
- last_top_up
- monthly_spending_limit_cents
- number_credit_available
- spending_limit_reached
- test_call_budget_cents
- test_call_budget_remaining_cents
BillingPaymentMethodList:
type: object
properties:
payment_methods:
type: array
items:
$ref: '#/components/schemas/BillingPaymentMethod'
required:
- payment_methods
LastTopUpKindEnum:
enum:
- manual
- auto
type: string
description: '* `manual` - Manual top-up
* `auto` - Auto top-up'
ChargeNowResultStatusEnum:
enum:
- charged
- pending
- declined
- error
- not_charged
type: string
description: '* `charged` - charged
* `pending` - pending
* `declined` - declined
* `error` - error
* `not_charged` - not_charged'
TopUpResponse:
type: object
properties:
payment_intent_id:
type: string
status:
type: string
client_secret:
type:
- string
- 'null'
required:
- client_secret
- payment_intent_id
- status
BillingPricing:
type: object
description: 'Which pricing the account bills on today (billing.cost_plus): ``grandfathered`` (its current pricing,
until ``moves_on``, when it moves to the new pricing on its own), ``cost_plus`` (the new pricing:
what each part of a call costs, plus a markup; ``moves_on`` null) or ``contract`` (a customer contract
sets what the account pays; ``moves_on`` null). POST /v1/billing/new-pricing switches sooner, one way.'
properties:
model:
$ref: '#/components/schemas/BillingPricingModelEnum'
moves_on:
type:
- string
- 'null'
format: date
required:
- model
- moves_on
LastAutoReload:
type: object
description: The newest successful auto top-up credit on the ledger.
properties:
amount_cents:
type: integer
created_at:
type: string
format: date-time
required:
- amount_cents
- created_at
LastTopUp:
type: object
description: The newest successful top-up credit, manual or automatic.
properties:
amount_cents:
type: integer
created_at:
type: string
format: date-time
kind:
$ref: '#/components/schemas/LastTopUpKindEnum'
required:
- amount_cents
- created_at
- kind
SetupIntent:
type: object
properties:
setup_intent_id:
type: string
client_secret:
type:
- string
- 'null'
status:
type: string
required:
- client_secret
- setup_intent_id
- status
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: sk_live_…
description: 'Organization API key. Send Authorization: Bearer sk_live_…; create a key in the dashboard.'
humanToken:
type: apiKey
in: header
name: Authorization
description: 'Human session token: Authorization: Token <session-token>. Organization API keys are rejected by key-management and account-control operations.'
x-mcp-server: https://api.thunderphone.com/v1/mcp