Base URL
https://carda.app/api/v1Error messages are in English. Send Accept-Language: ar or ru to get them in Arabic or Russian.
Authentication
Send your API key in the X-Api-Key header (or as a Bearer token). Create keys in your dashboard under API service.
X-Api-Key: ca_live_xxxxxxxxxxxxxxxxxxxxxxxx
# or
Authorization: Bearer ca_live_xxxxxxxxxxxxxxxxxxxxxxxxKeep keys on your server only. A key is shown once; if it leaks, revoke it and create a new one. You can restrict keys to your server IP addresses.
Errors
Errors return a JSON body with a machine-readable code and a readable message.
{
"error": { "code": "validation_error", "message": "The amount field is required." }
}| Code | HTTP | Meaning |
|---|---|---|
unauthenticated | 401 | Missing, wrong or revoked API key. |
subscription_inactive | 402 | Your API subscription is not active. |
ip_not_allowed | 403 | The request came from an IP that is not in your allowed list. |
card_not_found | 404 | No card with this id on your account. |
validation_error | 422 | A parameter is missing or invalid. |
rate_limited | 429 | Too many requests; see the Retry-After header. |
request_failed | 400 | The operation was refused (for example: insufficient balance, amount below the minimum). |
issuer_unavailable | 503 | The card service is temporarily unavailable; retry later. |
Rate limits
Each account can send 60 requests per minute. Every response includes X-RateLimit-Limit and X-RateLimit-Remaining headers.
Idempotency
Send an Idempotency-Key header (any unique string up to 80 characters) when creating or topping up a card. Repeating a request with the same key within 24 hours returns the first result instead of running it again.
The card object
id | Card id, used in every card URL. |
reference | Your own customer reference (optional). |
status | pending, active, frozen, terminated or failed. |
last4 | Last four digits of the card number. |
expiry | Expiry month/year. |
billing_address | Billing address to use with merchants. |
GET/account
Your account, wallet balance and subscription status. Use it to check that your key works.
curl https://carda.app/api/v1/account \ -H "X-Api-Key: $CARDA_API_KEY"
{
"data": {
"account_id": "9b1c…",
"name": "John Smith",
"balance": { "amount": "240.00", "currency": "USD" },
"subscription": {
"status": "active",
"current_period_end": "2026-12-21T09:00:00+00:00",
"grace_until": null
}
}
}GET/cards
List the cards issued through the API, newest first.
curl "https://carda.app/api/v1/cards?status=active&reference=customer-1042" \ -H "X-Api-Key: $CARDA_API_KEY"
{
"data": [ { "id": "CRD-7Q2M-XK4P", "status": "active", … } ],
"meta": { "page": 1, "per_page": 50, "total": 1, "last_page": 1 }
}POST/cards
Issue a new US virtual card. The amount is taken from your wallet; the card receives the amount minus the issuing fee.
The issuer may need a few seconds to confirm a new card; until then its status is pending.
curl -X POST https://carda.app/api/v1/cards \
-H "X-Api-Key: $CARDA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"amount": 25, "reference": "customer-1042"}'// 201 Created
{
"data": {
"id": "CRD-7Q2M-XK4P",
"reference": "customer-1042",
"status": "active",
"type": "virtual",
"brand": "VISA",
"last4": "4821",
"expiry": "11/29",
"holder_name": "JOHN SMITH",
"billing_address": "3401 N. Miami Ave. Ste 230, Miami, Florida, 33127, United States",
"created_at": "2026-11-21T09:30:00+00:00"
}
}GET/cards/{id}
Get one card.
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P \ -H "X-Api-Key: $CARDA_API_KEY"
{
"data": {
"id": "CRD-7Q2M-XK4P",
"reference": "customer-1042",
"status": "active",
"type": "virtual",
"brand": "VISA",
"last4": "4821",
"expiry": "11/29",
"holder_name": "JOHN SMITH",
"billing_address": "3401 N. Miami Ave. Ste 230, Miami, Florida, 33127, United States",
"created_at": "2026-11-21T09:30:00+00:00"
}
}GET/cards/{id}/balance
Current card balance (refreshed at most every 30 seconds).
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/balance \ -H "X-Api-Key: $CARDA_API_KEY"
{
"data": {
"id": "CRD-7Q2M-XK4P",
"balance": { "amount": "21.75", "currency": "USD" }
}
}GET/cards/{id}/transactions
Card transactions (refreshed at most every 30 seconds).
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/transactions \ -H "X-Api-Key: $CARDA_API_KEY"
{
"data": [
{
"description": "NETFLIX.COM",
"amount": "-15.49",
"status": "success",
"merchant": "netflix.com",
"created_at": "2026-11-21 10:02:11"
}
]
}POST/cards/{id}/topup
Load money onto a card from your wallet. The card receives the amount minus the top-up fee.
A response with status processing (HTTP 202) means the top-up is being confirmed and the balance updates within minutes.
curl -X POST https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/topup \
-H "X-Api-Key: $CARDA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: topup-88231" \
-d '{"amount": 50}'{
"data": {
"id": "CRD-7Q2M-XK4P",
"transaction_id": "VR-…",
"amount": "48.50",
"fees": "1.50",
"total": "50.00",
"status": "completed"
}
}POST/cards/{id}/freeze
Freeze a card. Payments are declined while frozen.
A card can change state once every 20 seconds.
curl -X POST https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/freeze \ -H "X-Api-Key: $CARDA_API_KEY"
{ "data": { "id": "CRD-7Q2M-XK4P", "status": "frozen", … } }POST/cards/{id}/unfreeze
Unfreeze a card.
A card can change state once every 20 seconds.
curl -X POST https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/unfreeze \ -H "X-Api-Key: $CARDA_API_KEY"
{ "data": { "id": "CRD-7Q2M-XK4P", "status": "active", … } }Not available through the API
• Card number and CVV (shown only in the Card App app and website).
• Card termination (ask support).
Webhooks
Add your webhook URL on the API service page of your dashboard. We send a JSON POST for every event on your API cards and retry failed deliveries automatically (up to 8 times over about two days). Any 2xx response counts as received.
Up to 500 webhooks per hour and 5,000 per day per account; anything above is delayed, never dropped. An event may rarely arrive more than once — use its id to ignore duplicates.
Events
ping | Test event sent from the dashboard. |
card.created | The card became active after issuing. |
card.creation_failed | Card issuing failed. |
card.topup.completed | A top-up was completed. |
card.topup.failed | A card top-up failed. |
card.withdrawal.completed | Money was withdrawn from the card to the wallet. |
card.frozen | The card was frozen. |
card.unfrozen | The card was unfrozen. |
transaction.authorized | A purchase was approved. |
transaction.settled | A purchase was settled. |
transaction.declined | A purchase was declined (with the reason). |
transaction.reversed | A transaction was reversed and refunded to the card. |
transaction.refunded | A merchant refunded a purchase to the card. |
transaction.cross_border_fee | Cross-border fee for a transaction. |
card.decline_fee | Fee for a declined transaction. |
card.terminated | The card was terminated. |
POST /your/webhook HTTP/1.1 Content-Type: application/json X-CardApp-Event: transaction.authorized X-CardApp-Delivery: 1842 X-CardApp-Signature: t=1795240666,v1=a7560794…
{
"id": "evt_abfrghtbqi7fv2u1xyieswdo",
"type": "transaction.authorized",
"created_at": "2026-11-21T10:02:11+00:00",
"data": {
"card": { "id": "CRD-7Q2M-XK4P", "reference": "customer-1042", "last4": "4821", "status": "active" },
"transaction_id": "8f1c…",
"amount": "15.49",
"currency": "USD",
"merchant": "NETFLIX.COM",
"merchant_country": "US"
}
}Verifying the signature
Every webhook carries an X-CardApp-Signature header in the form t=<timestamp>,v1=<signature>. The signature is HMAC-SHA256 of "<timestamp>.<raw body>" with your signing secret. Reject webhooks whose signature does not match or whose timestamp is older than 5 minutes.
$raw = file_get_contents('php://input');
preg_match('/t=(\d+),v1=([a-f0-9]+)/',
$_SERVER['HTTP_X_CARDAPP_SIGNATURE'] ?? '', $m);
$ok = $m && abs(time() - (int) $m[1]) < 300
&& hash_equals(hash_hmac('sha256', $m[1] . '.' . $raw,
getenv('CARDA_WEBHOOK_SECRET')), $m[2]);
if (!$ok) { http_response_code(400); exit; }
$event = json_decode($raw, true);
http_response_code(200);const crypto = require('crypto');
// use the raw body, e.g. express.raw({type:'application/json'})
function verify(raw, header, secret) {
const m = /t=(\d+),v1=([a-f0-9]+)/.exec(header || '');
if (!m || Math.abs(Date.now()/1000 - m[1]) > 300) return false;
const sig = crypto.createHmac('sha256', secret)
.update(m[1] + '.' + raw).digest('hex');
return crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(m[2]));
}Help
Questions about your integration? Contact support from your dashboard or at [email protected].