readyDocs Open the appOpen the app

Balance and billing

For your balance and rates in code, use GET /v1/account. The /billing endpoints below power the dashboard: they aren’t versioned, and fields not listed here can change. Prices are on Billing and pricing. To add money or turn on Auto top-up, use Add funds in Settings → Billing (Add money).

#The Transaction object

One row of billing history.

row_typestring
transaction (a top-up, credit or refund on your balance), daily_usage (usage summed per day per category; usage isn’t itemized per text) or stripe_charge (a card charge that doesn’t touch the balance, for example a brand registration).
idstring or integer
Treat it as an opaque string.
typestring
The kind of row within its row_type, for example daily_sms, stripe_charge or bonus.
cost_usdnumber
Positive, whether money came in or went out, except on adjustment and admin_deduction rows, which are negative when money left your balance. Use is_credit for the direction.
is_creditboolean
true means money came onto your balance.
descriptionstring
What the row is, in words.
created_atstring
When it happened. A usage row carries the end of its day.
amountinteger
A legacy count, not money. Ignore it.

#Get balance and rates

Your balance and the exact rates you’re billed at, including any negotiated rate.

Returns
data.balance_usdnumber | null
Your balance, rounded to cents. Use balance_cents for exact math.
data.balance_centsinteger | null
Your balance in cents.
data.planstring | null
Always null. Ready bills from your balance, not a plan; the field is kept so older integrations don’t break.
data.sms_rate_usd_per_segmentnumber | null
Your per-segment rate. null if it couldn’t be read; retry.
data.carrier_fee_usd_per_segmentnumber | null
The carrier fee per segment. null when the rate is.
data.compliance_usd_per_segmentnumber | null
The compliance surcharge per segment for the checks your account has on: number validation and TCPA scrubbing, each when it’s on. 0 when both are off or your account isn’t charged it. null if it couldn’t be read; retry.
data.mms_usd_per_messagenumber | null
Your price for one text with an image, carrier fee included, whatever its length. null if it couldn’t be read; retry.
data.managed_billing_hiddenboolean
Only present, as true, when an agency pays for your account. Its wallet and prices are the agency’s, so the balance, plan and every price above are null.
Errors
HTTPCodeWhen
500internal_errorRead failed. Retry.

#List billing history

Top-ups, credits, refunds and card charges one by one, and usage summed per day. Needs the view_billing permission.

Parameters

from, toYYYY-MM-DD · query
UTC dates, inclusive. Without from you get the last 90 days. Any other format is ignored, not rejected: check summary.from and summary.to to confirm your filter applied. An account its agency pays for gets no from or to in summary.
limitinteger · queryDefault 20Max 1000
Page size. 0, negative or non-numeric values fall back to 20.
offsetinteger · queryDefault 0
Rows to skip.

Returns a list of Transaction objects in data. For per-message cost, use cost_usd on GET /v1/messages. At most the 200 newest top-up and credit rows, and the 200 newest refunds, are returned per range, so narrow from and to to see older ones. A new top-up or credit shows at once. Usage can lag up to 30 seconds, and the first load after a quiet spell may show older usage while it refreshes.

Returns
totalinteger
Rows in the range.
summaryobject
spend_usd (money charged to your card in the range), count, from, to. For an account its agency pays for (a sub-account made with billing: "agency", or any call with X-Sub-Account-Id for one), the rows are its own usage, one per day, and summary is only { "complete": true }.
Errors
HTTPCodeWhen
503permission_check_unavailableThe permission check couldn’t run. Retry.
500no codeTransactions couldn’t be loaded. Retry.

#Export billing history as CSV

The same history as List billing history, as one CSV file. Needs the view_billing permission.

Parameters

from, toYYYY-MM-DD · query
UTC dates, inclusive. Leave both out for the whole history. A date in any other format is refused.

Returns text/csv with the columns id, type, amount, cost_usd, description, created_at and category. An account its agency pays for gets its own usage, one row per day.

Errors
HTTPCodeWhen
400no codeA date isn’t YYYY-MM-DD, or from is after to.
422export_range_too_largeToo many rows for one file. Pick a shorter range.
429no codeToo many exports in a short time. Wait, then retry.
500no codeThe file couldn’t be built. Retry. A download that stops partway is not a complete file.

#Get billing status

Whether the account that pays is in good standing. When a payment failed, lists what’s failing.

Returns
data.billing_statusstring
active when all is well; past_due after a failed subscription payment; at_risk after your card is refused for automatic top-ups; fraud_hold or canceled when the account is on hold or closed.
data.past_due_sincestring | null
When the account went past due, ISO 8601. null when it isn’t.
data.failing_subscriptions[]object[]
Only when past_due: type (brand, campaign, phone_number or blue_line), record_id, label, status (past_due, unpaid or incomplete).

#Get saved cards

The cards on file for the account that pays. Only brand, last 4 and expiry; never the card number. Needs the view_billing permission.

Returns
data.has_cardboolean
Whether a card is on file.
data.cards[]object[]
id, brand, last4, exp (M/YYYY) and is_primary.
Errors
HTTPCodeWhen
503permission_check_unavailableThe permission check couldn’t run. Retry.
500cards_not_loadedThe cards couldn’t be loaded. Retry.

#Get spend history

What you spent each day for the last 30 days, this month and last month, and a projection for this month. In dollars, by UTC day. Needs the view_billing permission.

Returns
data.daily[]object[]
30 rows of date and amount, oldest first. Days with no spend are 0.
data.this_month_spent, data.last_month_spentnumber
Dollars spent this month so far, and last month.
data.projectionnumber
This month so far, divided by days elapsed, times days in the month.
data.vs_last_month_pctinteger | null
Projection against last month. null when last month was 0.
Errors
HTTPCodeWhen
503permission_check_unavailableThe permission check couldn’t run. Retry.

#How a text is priced

Cost of one text = segments × (sms_rate_usd_per_segment + carrier_fee_usd_per_segment + compliance_usd_per_segment). A text with an image costs mms_usd_per_message + compliance_usd_per_segment, whatever its length. All four come from one call to GET /v1/account. Replies you receive are billed too, per segment, at your send rate plus the carrier fee, unless your account has its own price for received texts; see Your price on Billing and pricing. When someone texts STOP, START or HELP, Ready answers automatically, as carriers require. That answer is billed like a text you send. If your balance can’t cover it, it is sent free.

The rates are your own, so read them from that call instead of hard-coding them. The numbers in the examples on this page are for illustration only. Where to see your prices in the app is on Billing and pricing.

Older paths
  • GET /v1/balance and GET /v1/account/balance: the same body as GET /v1/account.
  • GET /billing/balance: the dashboard’s balance read. Use GET /v1/account. It also returns forecast fields (monthly_spend for this calendar month in UTC, monthly_messages for the last 30 days, daily_avg_send, estimated_days_left, and number_price_cents, your monthly price per number in cents), some cached for up to 15 minutes. Its balance and estimated_segments count 1-segment texts, not money.