API reference

Billing

Inspect pricing and usage, choose a plan, buy message packages, manage saved cards, and configure automatic credit top-ups.

Balance

GET/v1/billing/balance

Response

FieldTypeNotes
objectrequired"credit_balance"
organization_idrequiredstring
balance_brlrequiredstring
currencyrequired"brl"
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Rate-card history

GET/v1/rate-cards

Returns effective-dated BRL rate cards in reverse chronological order. Use the cursor fields to page through historical pricing.

Query

FieldTypeNotes
limitrequiredinteger
range 1..100
starting_afterstring
currency"brl"

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Current rate card

GET/v1/rate-cards/current

Response

FieldTypeNotes
idrequiredstring
objectrequired"rate_card"
namerequiredstring
currencyrequired"brl"
effective_fromrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
effective_torequiredstring<ISO-8601> | null
entriesrequiredobject[]

Available plans

GET/v1/billing/plans

Lists the purchasable plan catalog, including each plan's effective transport rate, throughput tier, and phone-number allowance.

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]

Current plan

GET/v1/billing/plan

Returns the organization's effective subscription. A status of none represents the free tier.

Response

FieldTypeNotes
objectrequired"subscription"
statusrequired"active" | "past_due" | "canceled" | "none"
plan_offering_idrequiredstring | null
display_namerequiredstring | null
billing_railrequired"stripe_card" | "pix_annual" | null
throughput_tierrequired"starter" | "growth" | "scale"
max_phonesrequiredinteger | null
platform_fee_multiplierrequiredstring
net_transport_rate_brlrequiredstring
monthly_fee_brlrequiredstring | null
current_period_endrequiredstring<ISO-8601> | null
cancel_at_period_endrequiredboolean

Subscribe to a plan

POST/v1/billing/plan/subscribe

Requires billing:write and supports Idempotency-Key. Card subscriptions charge the saved default card; annual Pix subscriptions return checkout details in pix.

Request body

FieldTypeNotes
plan_offering_idrequiredstring
railrequired"stripe_card" | "pix_annual"

Response

FieldTypeNotes
objectrequired"subscription_checkout"
subscriptionrequiredobject
pixrequiredobject | null

Change the current plan

POST/v1/billing/plan/change

Changes an active subscription to another catalog offering. Reuse one Idempotency-Keyacross retries. The switch is asynchronous: the response still shows the current plan, and the new plan's entitlement applies when the payment provider confirms the paid invoice — poll GET /v1/billing/plan to observe it.

Request body

FieldTypeNotes
plan_offering_idrequiredstring

Response

FieldTypeNotes
objectrequired"subscription"
statusrequired"active" | "past_due" | "canceled" | "none"
plan_offering_idrequiredstring | null
display_namerequiredstring | null
billing_railrequired"stripe_card" | "pix_annual" | null
throughput_tierrequired"starter" | "growth" | "scale"
max_phonesrequiredinteger | null
platform_fee_multiplierrequiredstring
net_transport_rate_brlrequiredstring
monthly_fee_brlrequiredstring | null
current_period_endrequiredstring<ISO-8601> | null
cancel_at_period_endrequiredboolean

Cancel the current plan

POST/v1/billing/plan/cancel

Schedules cancellation according to the current billing period. The request has no JSON body and supports Idempotency-Key.

Response

FieldTypeNotes
objectrequired"subscription"
statusrequired"active" | "past_due" | "canceled" | "none"
plan_offering_idrequiredstring | null
display_namerequiredstring | null
billing_railrequired"stripe_card" | "pix_annual" | null
throughput_tierrequired"starter" | "growth" | "scale"
max_phonesrequiredinteger | null
platform_fee_multiplierrequiredstring
net_transport_rate_brlrequiredstring
monthly_fee_brlrequiredstring | null
current_period_endrequiredstring<ISO-8601> | null
cancel_at_period_endrequiredboolean

Packages

GET/v1/billing/packages

Lists past package purchases and the package offerings currently available to the organization.

Query

FieldTypeNotes
limitrequiredinteger
range 1..100
starting_afterstring
status"pending" | "succeeded" | "failed" | "refunded" | "expired"

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null
available_packagesrequiredobject[]
POST/v1/billing/packages/purchase

Purchases a package with a saved card. This write requires billing:write and supports Idempotency-Key.

Request body

FieldTypeNotes
package_coderequiredstring
len 1..∞
payment_method"card"
payment_method_idstring
len 1..∞

Response

FieldTypeNotes
idrequiredstring
objectrequired"credit_topup"
kindrequired"cash" | "package" | "x402"
statusrequired"pending" | "succeeded" | "failed" | "refunded" | "expired"
amount_brlrequiredstring
payment_methodrequired"pix" | "card" | "x402" | "manual" | "promotion"
package_coderequiredstring | null
quota_messagesrequiredinteger | null
quota_remainingrequiredinteger | null
stripe_payment_intent_idrequiredstring | null
stripe_client_secretrequiredstring | null
provider"stripe" | "abacate_pay" | "manual" | "promotion"
abacate_charge_idstring | null
pix_copy_pastestring | null
pix_qr_code_base64string | null
pix_expires_atstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
completed_atrequiredstring<ISO-8601> | null

Saved payment methods

GET/v1/billing/payment-methods

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequired"false"
next_cursorrequirednull
POST/v1/billing/payment-methods/setup-intent

Creates a Stripe SetupIntent for collecting a card without charging it. The client secret is sensitive and is returned only for client-side confirmation.

Response

FieldTypeNotes
objectrequired"billing_payment_method_setup_intent"
stripe_customer_idrequiredstring
stripe_setup_intent_idrequiredstring
stripe_client_secretrequiredstring | null
POST/v1/billing/payment-methods

Saves a payment method after the SetupIntent succeeds. The request supports Idempotency-Key.

Request body

FieldTypeNotes
stripe_payment_method_idrequiredstring
len 1..∞
set_defaultboolean

Response

FieldTypeNotes
idrequiredstring
objectrequired"billing_payment_method"
typerequired"card"
brandrequiredstring | null
last4requiredstring | null
exp_monthrequiredinteger | null
exp_yearrequiredinteger | null
is_defaultrequiredboolean
statusrequired"active" | "deleted"
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
POST/v1/billing/payment-methods/{payment_method_id}/default

Makes an active saved card the default for plan and package charges. The request has no JSON body and supports Idempotency-Key.

Response

FieldTypeNotes
idrequiredstring
objectrequired"billing_payment_method"
typerequired"card"
brandrequiredstring | null
last4requiredstring | null
exp_monthrequiredinteger | null
exp_yearrequiredinteger | null
is_defaultrequiredboolean
statusrequired"active" | "deleted"
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
DELETE/v1/billing/payment-methods/{payment_method_id}

Removes a saved card. The response preserves its public record with status: deleted; retries may reuse the same Idempotency-Key.

Response

FieldTypeNotes
idrequiredstring
objectrequired"billing_payment_method"
typerequired"card"
brandrequiredstring | null
last4requiredstring | null
exp_monthrequiredinteger | null
exp_yearrequiredinteger | null
is_defaultrequiredboolean
statusrequired"active" | "deleted"
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Automatic top-up

GET/v1/billing/auto-topup

Response

FieldTypeNotes
objectrequired"auto_topup_config"
enabledrequiredboolean
threshold_brlrequiredstring
amount_brlrequiredstring
payment_method_idrequiredstring | null
last_triggered_atrequiredstring<ISO-8601> | null
updated_atrequiredstring<ISO-8601> | null
PUT/v1/billing/auto-topup

Replaces the organization's auto-top-up configuration. An enabled configuration needs an active saved payment method and supports Idempotency-Key.

Request body

FieldTypeNotes
enabledrequiredboolean
threshold_brlrequiredstring
pattern: ^\d+(\.\d{1,2})?$
amount_brlrequiredstring
pattern: ^\d+(\.\d{1,2})?$
payment_method_idstring | null

Response

FieldTypeNotes
objectrequired"auto_topup_config"
enabledrequiredboolean
threshold_brlrequiredstring
amount_brlrequiredstring
payment_method_idrequiredstring | null
last_triggered_atrequiredstring<ISO-8601> | null
updated_atrequiredstring<ISO-8601> | null

Ledger

GET/v1/billing/ledger

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Entry shape

FieldTypeNotes
idrequiredstring
objectrequired"ledger_entry"
typerequired"debit" | "credit"
source_typerequired"usage" | "credit_topup"
source_idrequiredstring
meter_idrequiredstring | null
amount_brlrequiredstring
uncollected_brlrequiredstring | null
currencyrequired"brl"
environmentrequired"sandbox" | "production" | null
recorded_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
trace_idrequiredstring | null

Dashboard-only billing actions

Custom-amount top-ups, invoice builds, and spend-limit updates are dashboard control-plane workflows, not public customer API endpoints. They are intentionally excluded from /openapi.json.

Invoices

GET/v1/invoices

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null
GET/v1/invoices/{id}/download

Response

FieldTypeNotes
objectrequired"invoice_download"
invoice_idrequiredstring
urlrequiredstring
expires_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$