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 limitwith amountCentsand frequency.Tip: To set a card label, call
POST /encryption/encryptfirst and pass the returned valueas 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)
Fields (create/update)
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 authorization -
per24HourPeriod— rolling 24‑hour spend cap -
per7DayPeriod— rolling 7‑day spend cap -
per30DayPeriod— rolling 30‑day spend cap -
perYearPeriod— rolling 1‑year cap -
allTime— 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.readscope./encryption/decryptis for card labels only. Use /cards//secretsfor PAN/CVC.The
sessionIdused 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.