API Reference · Cards

Cards

Proposed pre-funded virtual and physical debit cards with blocked merchant categories. Not live: no card processor is connected, so no real card is issued.

The card object

Represents a card entity in the rafiqPay system.

FieldType & FlagsDescription
id
string
Card ID (crd_...).
type
enum
virtual | physical.
last4
string
Last 4 digits of PAN.
status
enum
active | frozen | terminated.
Example card JSON
card example payload
{
  "id": "crd_01",
  "type": "virtual",
  "last4": "4821",
  "status": "active",
  "blockedCategoriesEnabled": true
}

Endpoints & Operations

POST/v1/cardsProposed

Issue a card

Proposed. Not live: no card processor is connected, so no real card is issued.

Request Example
POST /v1/cards
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/cards" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
  -H "Idempotency-Key: idem_issue-card_01" \
  -H "Content-Type: application/json" \
  -d '{
  "cardholderId": "crh_01",
  "type": "virtual",
  "walletId": "wal_amina_01",
  "monthlyLimit": "500000.00"
}'
Response (200 OK)
Response payload
{
  "id": "crd_01",
  "last4": "4821",
  "status": "active"
}
GET/v1/cards/:idProposed

Retrieve a card

Proposed. Not live.

Request Example
GET /v1/cards/:id
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/cards/:id" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"
Response (200 OK)
Response payload
{
  "id": "crd_01",
  "last4": "4821",
  "status": "active"
}
GET/v1/cardsProposed

List cards

Proposed. Not live.

Request Example
GET /v1/cards
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/cards" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"
Response (200 OK)
Response payload
{
  "object": "list",
  "data": [],
  "hasMore": false,
  "nextCursor": null
}
PATCH/v1/cards/:idProposed

Update a card

Updates card status (freeze/unfreeze) or velocity limits.

Request Example
PATCH /v1/cards/:id
cURL · v1
curl -X PATCH "https://api.rafiqpay.net/v1/cards/:id" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "frozen"
}'
Response (200 OK)
Response payload
{
  "id": "crd_01",
  "status": "frozen"
}
POST/v1/cards/:id/reveal-sessionsProposed

Show card details

Creates a short-lived ephemeral token to reveal PAN/CVV in an iframe.

Request Example
POST /v1/cards/:id/reveal-sessions
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/cards/:id/reveal-sessions" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
  -H "Idempotency-Key: idem_reveal-card_01"
Response (200 OK)
Response payload
{
  "ephemeralToken": "rev_tok_99182",
  "expiresInSeconds": 60
}
GET/v1/cards/:id/transactionsProposed

List card transactions

Lists settled transactions for a card.

Request Example
GET /v1/cards/:id/transactions
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/cards/:id/transactions" \
  -H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"
Response (200 OK)
Response payload
{
  "object": "list",
  "data": [],
  "hasMore": false,
  "nextCursor": null
}

These events are dispatched to your webhook endpoints when actions occur on this resource: