Wallet
Check your balance, price a plan, read the ledger and usage, and top up.
How the wallet works
The API is prepaid. Priced calls draw on your balance and are refused with 402 when it is not enough. Nothing is charged for a refused or failed call. Everything on this page is free to call except that the top-up itself is a payment you make in a browser.
Balance and quote
GET /v1/wallet/balance
Your credit balance. Free
Returns 200. Credit balance, held, available, and this month's spend and limit.
POST /v1/wallet/quote
What a plan of steps would cost. Free
Send the steps you plan to run. The reply gives the price of each, the total, and whether your available credit and this month’s limit cover it. Nothing is charged.
Returns 200. The price of each step, the total, and whether your available credit and this month's limit cover it. Nothing is charged.
Ledger and usage
GET /v1/wallet/ledger
Your charges, refunds and top-ups. Free
| Parameter | In | Required | Description |
|---|---|---|---|
after_id | query | No | Return entries after this id. |
limit | query | No | Page size. |
Returns 200. A page of entries.
GET /v1/usage
Your spend over a period. Free
| Parameter | In | Required | Description |
|---|---|---|---|
from | query | No | Start, YYYY-MM-DD or RFC 3339. Default: the start of this month. |
to | query | No | End, same format. Default: now. |
group_by | query | No | action, source, day, product or brand. Default: day. |
Returns 200. Spend rows.
Top up
POST /v1/wallet/topup
Start a top-up. Free
This starts a Stripe Checkout. Open checkout_url in a browser to pay. The amount is credited when the payment is confirmed.
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | No | A retry with the same key is answered from the stored response and charged once. |
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
amount_micros | integer | Yes | Amount in millionths of a dollar, a whole number of cents. At least 5000000, which is $5. |
success_url | string | No | |
cancel_url | string | No |
Returns 200. checkout_url: open it in a browser to pay. The amount is credited when the payment is confirmed.