Card lifecycle
API flows (step‑by‑step)
List cards
Endpoint:
GET /cardsCreate a card
Endpoint:
Body: optional
Tip: To set a card label, call
POST /cardsBody: optional
encryptedName (encrypted card label) and optional limit with amountCents and frequency.Tip: To set a card label, call
POST /encryption/encrypt first and pass the returned value as encryptedName (see Encryption).Update status or limits
Endpoint:
PATCH /cards/Delete a card
Endpoint:
DELETE /cards/Create a card secrets session (optional)
Endpoint:
Body: send an empty JSON object if your client sets
POST /cards/secrets/sessionBody: send an empty JSON object if your client sets
Content-Type: application/json.Get card secrets (optional)
Endpoint:
Body: (from the secrets session helper)
POST /cards//secretsBody: (from the secrets session helper)
Fields (create/update)
Optional encrypted card label field . Generate with
POST /encryption/encrypt.Spending cap in cents.
One of:
perAuthorization, per24HourPeriod, per7DayPeriod, per30DayPeriod, perYearPeriod, allTime.Response (secrets session)
Session id used to fetch encrypted PAN/CVC.
16‑byte secret (hex) used to decrypt PAN/CVC with AES‑128‑GCM.
Response (secrets)
Base64 ciphertext + auth tag.
Base64 IV.
Base64 ciphertext + auth tag.
Base64 IV.
Expiration month (MM).
Expiration year (YYYY).
Last 4 digits.
Card labels vs card secrets
- Card labels use
/encryption/encryptand/encryption/decrypt. - Card secrets (PAN/CVC) use
/cards/secrets/session+/cards//secrets. - Decrypt card labels on your backend and send plaintext labels to your frontend.
- Card labels are optional, but recommended for clean UI.
Card limits
- amountCents: integer amount in cents (e.g., 5000 = $50). Minimum 1.
- frequency: one of
perAuthorization— max per single authorizationper24HourPeriod— rolling 24‑hour spend capper7DayPeriod— rolling 7‑day spend capper30DayPeriod— rolling 30‑day spend capperYearPeriod— rolling 1‑year capallTime— lifetime cap
Lock / unlock / update limits
PATCH /cards/withstatus: “locked”to pause spend.- Set
status: “active”to unlock. - Update limits by sending a new
limitpayload.
Delete
DELETE /cards/ cancels immediately.
Card number secrets (PAN/CVC)
This flow is only for retrieving the card number (PAN) and CVC. Do not use it for card labels.- Call
POST /cards/secrets/sessionto getsessionIdandsecretKey. - Call
POST /cards//secretswith . - Decrypt
encryptedPanandencryptedCvclocally using AES‑128‑GCM with thesecretKey.
This endpoint requires the
cards.secrets.read scope./encryption/decrypt is for card labels only. Use /cards//secrets for PAN/CVC.The
sessionId used here is different from your API session token. Always request it from /cards/secrets/session.No decrypted PAN/CVC ever leaves your process; only encrypted blobs are returned by the API.