Put a card on file

Answers the address of a page of the billing provider's where the person enters a card.

POST/v1/billing/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

NameInTypeRequiredWhat it is
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Answer

201. The page to send the person to.

201
{
  "url": "https://app.example.com",
  "mode": "off"
}
FieldTypeAlwaysWhat it is
urlstringYesThe billing provider's page. It expires.
mode"off" | "test" | "live"YesHow 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

ClientCall
TypeScriptpod.billing.cardSetup()
Pythonpod.billing.card_setup()