Pricing and balance
Messages are paid from the prepaid balance of your account, in its currency. Prices are per message (per segment for SMS) and depend on the channel and the country — and for SMS on the operator of the number. Your prices are in the Billing section of the console.
When the money moves
- At acceptance the price is fixed and reserved from the available balance. It is in the answer:
price: {"amount": "0.062500", "currency": "USD"}. A later change of the price list does not touch it. - When the provider takes the message the reserve is charged.
- If the provider refuses it before taking it, the reserve is released and nothing is charged.
A message the provider took and then could not deliver (failed, expired) is usually still charged: the provider charges for it.
A refused request (any 4xx) creates no message and moves no money. Test messages are free.
Available balance
The available balance is the balance minus the reserves of messages and campaigns in progress. A message whose price is over it is refused with 409 insufficient_funds; the problem tells how much is missing:
json
{
"type": "about:blank",
"status": 409,
"code": "insufficient_funds",
"title": "Not enough money on the balance",
"shortage": { "amount": "0.042500", "currency": "USD" }
}To stop before it happens, set the alert threshold in Billing in the console and subscribe to the balance.low webhook.