Put a card on file
Answers the address of a page of the billing provider's where the person enters a card.
Answers the address of a page of the billing provider's where the person enters a card. Pod never sees the card's number; once the billing provider holds it, GET /v1/billing shows the card on_file. A card on file lifts the free plan's hold on outbound traffic and its one size, and with a checked identity moves a new account to the verified trust tier. Each call makes a new page; a page expires after a while, so ask again rather than keeping one. Only a signed-in person whose role may read billing can call it: an agent can ask to spend, only a person pays. With billing off, or before the billing provider holds the organization's customer, it is conflict. The billing provider not answering is upstream.
For people only: a signed-in person's token makes this call. An API key is refused with person_required. The person's role must be one that may read billing.
Request
curl -X POST "https://api.pod.mapier.ai/v1/billing/card" \
-H "Authorization: Bearer $POD_PERSON_TOKEN"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Answer
201. The page to send the person to.
{
"url": "https://app.example.com",
"mode": "off"
}| Field | Type | Always | What it is |
|---|---|---|---|
url | string | Yes | The billing provider's page. It expires. |
mode | "off" | "test" | "live" | Yes | How Pod bills, the same for every organization. |
Errors
The refusals this call is known for: person_required, conflict, upstream. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.billing.cardSetup() |
| Python | pod.billing.card_setup() |