REST · JSON · v1

API reference

Everything you need to integrate the Card App card API. All requests use HTTPS and JSON.

Base URL

https://carda.app/api/v1

Error 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.

Header
X-Api-Key: ca_live_xxxxxxxxxxxxxxxxxxxxxxxx
# or
Authorization: Bearer ca_live_xxxxxxxxxxxxxxxxxxxxxxxx

Keep 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.

Response
{
  "error": { "code": "validation_error", "message": "The amount field is required." }
}
CodeHTTPMeaning
unauthenticated401Missing, wrong or revoked API key.
subscription_inactive402Your API subscription is not active.
ip_not_allowed403The request came from an IP that is not in your allowed list.
card_not_found404No card with this id on your account.
validation_error422A parameter is missing or invalid.
rate_limited429Too many requests; see the Retry-After header.
request_failed400The operation was refused (for example: insufficient balance, amount below the minimum).
issuer_unavailable503The 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

idCard id, used in every card URL.
referenceYour own customer reference (optional).
statuspending, active, frozen, terminated or failed.
last4Last four digits of the card number.
expiryExpiry month/year.
billing_addressBilling address to use with merchants.

GET/account

Your account, wallet balance and subscription status. Use it to check that your key works.

Example
curl https://carda.app/api/v1/account \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{
  "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.

Parametersstatus: active | frozen | terminated | pending. reference: filter by your customer reference. per_page: 1–100 (default 50). page.
Example
curl "https://carda.app/api/v1/cards?status=active&reference=customer-1042" \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{
  "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.

Parametersamount (required): amount to take from your wallet in USD. reference (optional): your customer reference, up to 100 characters.

The issuer may need a few seconds to confirm a new card; until then its status is pending.

Example
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"}'
Response
// 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.

Example
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{
  "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).

Example
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/balance \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{
  "data": {
    "id": "CRD-7Q2M-XK4P",
    "balance": { "amount": "21.75", "currency": "USD" }
  }
}

GET/cards/{id}/transactions

Card transactions (refreshed at most every 30 seconds).

Example
curl https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/transactions \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{
  "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.

Parametersamount (required): amount to take from your wallet in USD.

A response with status processing (HTTP 202) means the top-up is being confirmed and the balance updates within minutes.

Example
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}'
Response
{
  "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.

Example
curl -X POST https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/freeze \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{ "data": { "id": "CRD-7Q2M-XK4P", "status": "frozen", … } }

POST/cards/{id}/unfreeze

Unfreeze a card.

A card can change state once every 20 seconds.

Example
curl -X POST https://carda.app/api/v1/cards/CRD-7Q2M-XK4P/unfreeze \
  -H "X-Api-Key: $CARDA_API_KEY"
Response
{ "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

pingTest event sent from the dashboard.
card.createdThe card became active after issuing.
card.creation_failedCard issuing failed.
card.topup.completedA top-up was completed.
card.topup.failedA card top-up failed.
card.withdrawal.completedMoney was withdrawn from the card to the wallet.
card.frozenThe card was frozen.
card.unfrozenThe card was unfrozen.
transaction.authorizedA purchase was approved.
transaction.settledA purchase was settled.
transaction.declinedA purchase was declined (with the reason).
transaction.reversedA transaction was reversed and refunded to the card.
transaction.refundedA merchant refunded a purchase to the card.
transaction.cross_border_feeCross-border fee for a transaction.
card.decline_feeFee for a declined transaction.
card.terminatedThe card was terminated.
Headers
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…
Body
{
  "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.

PHP
$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);
Node.js
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].