Cards API
Cards API reference: create a card in two steps, read cards and their purchases, freeze and unfreeze, and check your USD balance.
Base URL and authentication
https://api.tranzak.co/api/cards/v1
Send your live API key in the X-Api-Key header. The key must be allowed for Cards in your dashboard (Cards → API access). All amounts are numbers in US dollars with two decimals (5.00 means five dollars).
curl https://api.tranzak.co/api/cards/v1/balance \
-H "X-Api-Key: $TRANZAK_API_KEY"
Note Never call this API from a browser or a mobile app: your API key must stay on your server.
Errors
Failed requests return { "success": false, "error": "<code>", "message": "…" }. The message is meant for you, the developer: decide what to show your own users.
| HTTP | error |
Meaning |
|---|---|---|
| 403 | cards_not_enabled_for_key |
This key is not allowed for Cards (dashboard → Cards → API access). |
| 403 | cards_not_enabled |
The Cards service is not enabled on your account. |
| 403 | live_key_required |
Cards only works with live keys. |
| 422 | validation_error |
A field is missing or invalid. See errors. |
| 422 | person_not_eligible |
This person cannot receive a card. The answer is the same whether the person is unknown, belongs to someone else or is not verified. |
| 422 | card_limit_reached |
This person already has the maximum number of cards with you. |
| 422 | amount_too_low |
The recharge is below the minimum. minimum is in the response. |
| 422 | balance_limit_exceeded |
The card balance would go over its maximum. max_allowed is in the response. |
| 422 | monthly_limit_exceeded |
The card would exceed its monthly recharge limit. remaining_this_month and resets_at are in the response. |
| 422 | card_not_rechargeable |
This card cannot be recharged right now (frozen by Tranzak, canceled or not active). |
| 409 | reference_conflict |
This reference is already used for a different recharge. |
| 422 | person_underage |
The person is under 18. |
| 422 | person_not_registrable |
These details cannot be registered: the e-mail or phone belongs to another person, the name does not match the person already registered with this e-mail and phone, or the person refused your link. |
| 429 | person_limit_reached |
Too many people waiting for verification, or too many registrations today. |
| 409 | person_already_verified |
No new verification link is needed: the person is already verified. |
| 409 | card_unavailable |
This card cannot be revoked right now (not active or frozen). |
| 503 | service_unavailable |
The card could not be frozen right now. Nothing changed: retry. |
| 422 | invalid_amount |
The initial amount is outside the allowed range. minimum and maximum are in the response. |
| 409 | card_request_pending |
A card request for this person is already waiting for the identity verification. |
| 503 | verification_unavailable |
The identity check service did not answer and the last check is too old. Nothing was charged: retry the same request. |
| 402 | insufficient_balance |
Your USD balance is too low. required and available are in the response. |
| 422 | invalid_authorization_token / authorization_expired |
The authorization token is wrong, already used or older than 5 minutes. |
| 404 | card_not_found / person_not_found |
Unknown to your account. |
| 409 | frozen_by_tranzak |
The card was frozen by Tranzak and cannot be unfrozen by you. |
| 503 | service_busy |
Too many simultaneous requests. Nothing was charged: retry the same request. |
Balance {#balance}
GET /balance returns your prepaid USD balance.
{ "success": true, "balance": { "available": 41.00, "pending": 0.00, "currency": "USD" } }
available can be spent on cards. pending is a recent conversion still in its review period.
Register a person {#persons}
A card belongs to a person whose identity Tranzak has verified. You register the person, then send them to a verification page hosted by Tranzak. Tranzak pays for the verification: it is free for you.
POST /persons
curl https://api.tranzak.co/api/cards/v1/persons \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Marie",
"last_name": "Joseph",
"date_of_birth": "1995-04-12",
"email": "[email protected]",
"phone": "+50937123456",
"document_type": "national_id",
"reference": "user-1042"
}'
| Field | Description |
|---|---|
first_name, last_name |
The legal name, as on the identity document. |
date_of_birth |
YYYY-MM-DD. The person must be at least 18. |
email, phone |
The person's own e-mail and phone (international format, +509…). |
document_type |
national_id, passport or drivers_license: the document the person will present. |
reference |
Your own identifier for this person, unique in your account. |
Unknown fields are refused.
{
"success": true,
"person": {
"person_id": "per_9k2x7m4q1a8b3c5d",
"reference": "user-1042",
"first_name": "Marie",
"last_name": "Joseph",
"kyc_status": "pending",
"created_at": "2026-11-20T10:02:11+00:00"
},
"verification": {
"url": "https://tranzak.co/cards/verify/…",
"expires_at": "2026-11-27T10:02:11+00:00"
}
}
The answer is 201 for a new registration, and 200 if you send the same reference with the same data again (you get a fresh link, and nothing is duplicated).
Send the person to verification.url
Open the link in the person's browser (or in a web view). Tranzak does the rest:
- First time: the person takes a photo of an identity document and a selfie. Nothing is shown to you, only the result.
- Already verified with Tranzak: the person does not repeat the check. They confirm with a 6-digit code sent to the e-mail address Tranzak already holds (never to the address you typed), and the link to your account is created. They can also refuse.
You cannot tell the two cases apart, and this is on purpose: the answer to POST /persons always has the same shape.
Follow the result
Tranzak tells you when the check ends with a webhook (see below), so you do not need to poll. You can also read GET /persons/{person_id} (or GET /persons) until kyc_status is final:
kyc_status |
Meaning |
|---|---|
pending |
Waiting for the person (verification or confirmation not finished). |
under_review |
Legacy value, no longer produced. Tranzak does not review identities by hand: the decision follows the verification provider's. |
approved |
You can create a card for this person. |
rejected |
The check failed. Request a new link with POST /persons/{person_id}/verification-link (at most 3 attempts per person). |
revoked |
Tranzak withdrew the verification. No new card or recharge is possible. |
first_name and last_name stay null until the person has confirmed the link. POST /persons/{person_id}/verification-link returns a new link if the person lost the first one.
Person webhooks
Sent to your callback URL (the website that owns your API key), signed like every other Tranzak webhook (X-Tranzak-Signature, HMAC-SHA256 of the body with your webhook secret). Only the developer whose verification link was used receives them.
event |
When | data |
|---|---|---|
person.verified |
The check succeeded: you can create a card for this person. | person_id, reference, kyc_status: "approved" |
person.rejected |
The check failed, was refused, or was not completed in time. | person_id, reference, kyc_status: "rejected", reason |
person.expired |
The verification link expired without the person ever starting the check. The person is not refused: kyc_status stays pending. |
person_id, reference, kyc_status: "pending", reason: "link_expired" |
reason is deliberately general: verification_failed (the check did not pass), not_eligible (the person cannot be accepted) or expired (the verification was not completed or decided in time). After person.rejected you may request a new link with POST /persons/{person_id}/verification-link. Failed deliveries are retried; you can always read the state with GET /persons/{person_id}.
If the person does not finish
A verification link is valid for 7 days. What happens when the person stops half way:
- The person abandons the verification. Tranzak checks the open sessions with the verification provider every 10 minutes. When the session has expired, failed or no longer exists, the person becomes
rejectedand you receiveperson.rejectedwithreason: "expired"(orverification_failed). If the provider has not decided after 72 hours, the person also becomesrejectedwithreason: "expired". There is no manual review at Tranzak. - The person never starts the verification. After the 7 days the link expires and you receive
person.expired(once). The person is not refused:kyc_statusstayspendingand you can send a new link. - Trying again. After a refusal or an expired link, request a new link with
POST /persons/{person_id}/verification-link(at most 3 attempts per person). A session that is still open can be resumed by the person with the same link. - Money. Nothing is charged for a person: no amount is taken until you create a card. With
POST /cards/requests(verification and card in one call) the fee and amount are taken at once, and are refunded in full if the verification is refused or not completed beforeexpires_at; you then receivecard.failed. - Limits. The number of people waiting for verification is limited per developer (100 by default), so links that are never used count against it until they expire.
Identity is checked again
Tranzak does not rely on a single check. Approval is decided by re-reading the verified identity at the verification provider, and the check is renewed before a card is created or recharged (and regularly in the background). If an identity is no longer valid, the person moves to rejected and no new card or recharge is possible until the person completes a new verification (request a new link). When the provider validates an identity, Tranzak validates it too: there is no additional manual review on our side.
Email and phone are checked first
Before anything is sent to our card provider, the email and the phone number are validated. The phone must be in international format with no spaces (for example +50937001234); the email must have a real domain ([email protected]). Invalid values are refused with validation_error (422) and the field name, so nothing is created and nothing is charged.
One person, one identity
A person is identified by their e-mail and their phone number together. Both are unique at Tranzak: the same e-mail or the same number can never belong to two people. The e-mail is normalised before it is compared (case and spacing do not matter).
| You send | What happens |
|---|---|
The same e-mail and phone, with a different reference |
It is the same person. You get the same person_id; nothing is duplicated. |
The same reference and the same details |
Replay: you get a fresh verification link, nothing is duplicated (200). |
The same reference for a different person |
409 reference_conflict. |
| The phone of a known person with a new e-mail, and the same name and date of birth | It is the same person (for example a new e-mail address): no new person, no new KYC, no new cardholder. If the person is not yet confirmed for you, a code is sent to the e-mail Tranzak already holds (never to the new one). The registered e-mail is not changed. |
| The e-mail of a known person with a new phone | 422 person_not_registrable. |
| An e-mail or a phone that is already known, but not the pair of one single person | 422 person_not_registrable. The answer never says which of the two is known. |
| A known person, but another name or another date of birth | 422 person_not_registrable (or 409 reference_conflict if you reuse the same reference). Nothing is created or charged. Accents, capitals, hyphens, the order of first and last name and an added or missing middle name are ignored; a different name or date is not. Send them exactly as on the person's document. |
| The e-mail and phone of a person another developer already registered | It is the same person at Tranzak, but the person must first confirm your request with a code sent to their e-mail. Until they do, their name and status stay hidden from you (kyc_status is pending). |
| A person who refused your link | 422 person_not_registrable. |
When a registration is refused (person_not_registrable), the answer says why and what to do, without revealing anything about the person:
{
"success": false,
"error": "person_not_registrable",
"reason": "details_conflict",
"message": "These details conflict with a person already registered at Tranzak (the e-mail, phone, name or date of birth do not match what we hold), or the person refused your link. Nothing was created or charged.",
"help": "If you are sure this is the same person (for example a new e-mail address), contact Tranzak support with a copy of the person's identity document: our team will check it and correct the record.",
"contact": "[email protected]"
}
Tranzak never tells which detail conflicts, nor what we hold. Once our team has checked the person's identity document, we can correct the e-mail or phone on our side and you can register the person again. The name, the date of birth and the document never change: they come from the identity check.
The identity document is unique too: one document identifies one person only. If the document used for a verification already belongs to another person, the verification is refused (person.rejected, reason: "not_eligible"), whatever the e-mail or phone.
Only people aged 18 or more can be registered (person_underage).
Limits
- Tranzak pays for each verification, so your account has a ceiling on people waiting for a verification and on registrations per day (
person_limit_reached).
Request a card with identity verification {#request-card}
The simplest way to issue a card: one call, with the person's details and the amount to load. Tranzak registers the person, takes the funds, and gives you the verification link. When the person is verified, the card is created by itself.
curl -X POST https://api.tranzak.co/api/cards/v1/cards/requests \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reference": "order-1042",
"initial_amount": "25.00",
"first_name": "Marie",
"last_name": "Joseph",
"date_of_birth": "1995-04-12",
"email": "[email protected]",
"phone": "+50937000000",
"document_type": "national_id"
}'
| Field | Meaning |
|---|---|
reference |
Your own unique reference for this card. Sending it again returns the same card and never charges twice. |
initial_amount |
The amount loaded on the card, in USD. Minimum 5.00, maximum 2000.00, at most 2 decimals. You choose it. |
| the other fields | Same as Register a person. |
What is charged, immediately, from your USD balance: the creation fee, plus initial_amount, plus, when initial_amount is above the minimum, the recharge fee on the part above the minimum only. If your balance is too low, nothing is created (402 insufficient_balance, with required and available).
initial_amount |
Creation fee | Fee on the part above 5.00 | Total charged (standard prices) |
|---|---|---|---|
| 5.00 | 4.00 | none | 9.00 |
| 25.00 | 4.00 | 1.50 + 1.9 % of 20.00 = 1.88 | 30.88 |
| 100.00 | 4.00 | 1.50 + 1.9 % of 95.00 = 3.31 | 107.31 |
The answer is 202 Accepted:
{
"success": true,
"duplicate": false,
"card": { "card_id": "card_…", "status": "pending_verification", "reference": "order-1042", "…": "…" },
"verification": { "url": "https://tranzak.co/cards/verify/…", "expires_at": "2026-11-28T10:00:00+00:00" }
}
- Send the person to
verification.url. They verify their identity (or, if already verified elsewhere, just confirm with a code sent to their e-mail). - When the verification is accepted, the card is created automatically and its
statusbecomesprovisioning, thenactivewithin seconds. You receive acard.activewebhook. - If the verification is refused for good, or is not completed before
expires_at(7 days), the card becomesfailedand the fee and the amount are refunded in full to your balance. You receive acard.failedwebhook (failure_reasontells why).
If the issuing account behind the cards is short of funds at that moment, your request is never refused: the card waits with the status pending_funds (your funds stay taken) and is created automatically, in order of arrival, as soon as the account is topped up. If it has not been created after 7 days, the request is canceled and refunded in full (failure_reason = funding_timeout, with a card.failed webhook). The same applies to recharges: they stay pending until applied.
A person who is already verified with you gets the card immediately: the answer has no verification and the status is provisioning.
Only one card request can wait at a time for the same person; another one returns 409 card_request_pending. Sending the same reference again returns the same card with a fresh verification.url while it is still waiting.
Webhooks
Tranzak calls your callback URL (the one of the website that owns your API key), signed like every other Tranzak webhook (X-Tranzak-Signature, HMAC-SHA256 of the body with your webhook secret):
event |
When | data |
|---|---|---|
card.active |
The card was created and can be used. | The card object. |
card.failed |
The request ended without a card; the amount was refunded. | The card object with failure_reason. |
Failed deliveries are retried. You can always read the state with GET /cards/{card_id}.
Create a card
Use this two-step flow when the person is already verified and you want to confirm the quote before charging.
A card is created in two steps, so that the amount and the person cannot change between the check and the charge.
1. Authorize: POST /cards/authorize
Checks everything and charges nothing.
| Field | Description |
|---|---|
person_id |
The person who will own the card. |
reference |
Your own unique reference for this card (letters, digits, ., _, -; 100 characters at most). Sending the same reference again never creates a second card. |
curl https://api.tranzak.co/api/cards/v1/cards/authorize \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "person_id": "per_9k2x7m4q1a8b3c5d", "reference": "order-1042" }'
{
"success": true,
"authorization": {
"authorization_token": "…",
"expires_at": "2026-11-19T20:24:02-05:00",
"reference": "order-1042",
"creation_fee": 4.00,
"initial_deposit": 5.00,
"total_debited": 9.00,
"currency": "USD"
}
}
The token is shown once, is valid for 5 minutes and can be used once.
2. Confirm: POST /cards
curl https://api.tranzak.co/api/cards/v1/cards \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "authorization_token": "…" }'
The answer is 202 Accepted: the card is being created and its status is provisioning. It becomes active within seconds. If creation fails for good, the amount is refunded automatically to your balance and the card becomes failed.
Sending the same token again returns 200 with the same card and "duplicate": true. You are never charged twice.
Recharge a card {#recharge}
Adding money to a card works in two steps, like creating one. Nothing is charged until you confirm.
1. Authorize: POST /cards/{card_id}/recharges/authorize
curl https://api.tranzak.co/api/cards/v1/cards/card_vafgjlnlt8izadfhcrdo/recharges/authorize \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": 100.00, "reference": "topup-7781" }'
amount is what the card will receive, in USD (at most 2 decimals). reference is your own unique identifier for this recharge.
{
"success": true,
"authorization": {
"authorization_token": "…",
"expires_at": "2026-11-19T21:10:00+00:00",
"reference": "topup-7781",
"amount": 100.00,
"fee": 3.40,
"total_debited": 103.40,
"currency": "USD"
}
}
The token is shown once, is valid for 5 minutes and only works with the API key that requested it. The fee is 1.50 USD + 1.9 % of the amount credited to the card, and it is charged in addition to the amount.
2. Confirm: POST /cards/{card_id}/recharges
curl https://api.tranzak.co/api/cards/v1/cards/card_vafgjlnlt8izadfhcrdo/recharges \
-H "X-Api-Key: $TRANZAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "authorization_token": "…" }'
The answer is 202 Accepted with a recharge object whose status is pending. It becomes completed within seconds, and the money is then usable on the card. If the recharge fails for good, the amount and the fee are both refunded to your balance and the status becomes failed.
Sending the same token or the same reference again returns 200 with the same recharge and "duplicate": true. You are never charged twice.
{
"success": true,
"duplicate": false,
"recharge": {
"recharge_id": "rch_k3m9x2q8a1b7c4d6e5f0",
"card_id": "card_vafgjlnlt8izadfhcrdo",
"reference": "topup-7781",
"status": "pending",
"amount": 100.00,
"fee": 3.40,
"total_debited": 103.40,
"currency": "USD",
"failure_reason": null,
"created_at": "2026-11-19T21:05:00+00:00",
"processed_at": null
}
}
GET /cards/{card_id}/recharges lists the recharges of a card, newest first.
Limits
- Minimum recharge: 10 USD. There is no maximum per recharge.
- A card balance cannot exceed 2,000 USD (
balance_limit_exceeded, withmax_allowed). - A card can receive at most 2,000 USD per calendar month (UTC): the balance at the start of the month plus everything recharged since, plus the new amount, must stay within 2,000 USD (
monthly_limit_exceeded, withremaining_this_monthandresets_at). - A card frozen by you or by its user can be recharged. A card frozen or locked by Tranzak, canceled or failed cannot (
card_not_rechargeable).
The card object
{
"card_id": "card_vafgjlnlt8izadfhcrdo",
"person_id": "per_9k2x7m4q1a8b3c5d",
"reference": "order-1042",
"status": "active",
"last4": "0815",
"currency": "USD",
"balance": 5.00,
"total_loaded": 5.00,
"total_spent": 0.00,
"pending_holds": 0.00,
"failure_reason": null,
"created_at": "2026-11-19T20:19:02-05:00"
}
| Field | Description |
|---|---|
status |
pending_verification (waiting for the person's identity check, funds already taken), pending_funds (the person is verified but our issuing account is being topped up: the card is created automatically, in order of arrival), provisioning, active, frozen, canceled or failed. |
balance |
What the card can still spend: total_loaded − total_spent − pending_holds. |
pending_holds |
Purchases approved but not yet settled. They already reduce the balance. |
The full number, the expiry date and the CVC are never part of this object. Use the widget.
Read cards
| Request | Description |
|---|---|
GET /cards |
Your cards, newest first. Filters: person_id, status, per_page (1 to 100). |
GET /cards/{card_id} |
One card. |
GET /cards/{card_id}/transactions |
Purchases, refunds, pending holds and declined attempts. |
{
"success": true,
"data": [
{ "id": "txn_3f9a2c…", "type": "purchase", "amount": -12.00, "currency": "USD", "merchant": "Amazon", "category": "book_stores", "decline_reason": null, "occurred_at": "2026-11-19T21:02:10+00:00" },
{ "id": "txn_b71e04…", "type": "declined", "amount": -90.00, "currency": "USD", "merchant": "Shop", "category": "misc", "decline_reason": "insufficient_balance", "occurred_at": "2026-11-19T21:05:41+00:00" }
],
"pagination": { "current_page": 1, "per_page": 25, "total": 2, "last_page": 1 }
}
amount is signed: negative for a purchase, positive for a refund. type is purchase, refund, pending, declined or reversed. A declined attempt does not change the balance. decline_reason is one of insufficient_balance, card_frozen, card_unavailable, suspected_fraud or declined.
Freeze and unfreeze
POST /cards/{card_id}/freeze and POST /cards/{card_id}/unfreeze return the updated card. A frozen card refuses every purchase. Nothing changes if the request fails (503): retry it.
Revoke a card {#revoke}
POST /cards/{card_id}/revocations asks Tranzak to cancel a card for good. The body is empty.
curl -X POST https://api.tranzak.co/api/cards/v1/cards/card_…/revocations \
-H "X-Api-Key: $TRANZAK_API_KEY"
The answer is 202 Accepted: { "success": true, "revocation": { "revocation_id": "rev_…", "status": "pending", "requested_by": "developer", … } }.
- The card is frozen immediately and nobody but Tranzak can unfreeze it while the request is open.
- Tranzak contacts the cardholder before deciding. If the request is approved, the card is canceled for good and the unspent balance is returned to your USD balance, once. If it is refused, the card is unfrozen.
GET /cards/{card_id}/revocationsgives the state:pending,approved(withrefund, in USD) orrejected.- While a request is open, the card keeps its place in the limits of the person. Sending the request again returns the same one (
"duplicate": true). 409 card_unavailable: only anactiveorfrozencard can be revoked.503 service_unavailable: the card could not be frozen right now, nothing changed, retry.
Show the card to your user
POST /cards/{card_id}/widget-sessions returns the URL of the widget. See Display the card with the widget.