Skip to main content

Card Operations

Card operations are individual transactions on a specific card — purchases, refunds, top-ups, withdrawals, and fees.


List Card Operations

Returns card transactions across all cards in your organization, with rich filtering options.

Endpoint

GET /api/v2/organizations/{org_id}/instruments/operations

Query Parameters

ParameterTypeDescription
pageintegerPage number
quantityintegerItems per page
ids[]arrayFilter by specific transaction IDs
cardIds[]arrayFilter by card IDs
accountIds[]arrayFilter by wallet IDs
types[]arrayFilter by type (see below)
statuses[]arrayFilter by status (see below)
createdAtFromstringISO 8601 start date
createdAtTostringISO 8601 end date
sortBystringcreatedAt or status
sortTypestringasc or desc

Transaction Types

TypeDescription
purchaseCard payment at merchant
refundRefund from merchant
feeService fee charged
top_upBalance added to card
withdrawalBalance withdrawn from card

Transaction Statuses

StatusDescription
authorizedTransaction authorized, awaiting settlement
completedTransaction settled
declinedTransaction declined
canceledTransaction canceled

Request

curl "https://api.4pay.cc/api/v2/organizations/{org_id}/instruments/operations?types[]=purchase&statuses[]=completed&sortBy=createdAt&sortType=desc" \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK
{
"data": [
{
"id": "d413a9d7-6c7b-4f89-b47e-c742060a12c7",
"card": {
"id": "abc123e4-5678-90ab-cdef-1234567890ab",
"name": "Business Card",
"maskedNumber": "4111******1111"
},
"amount": "50.00",
"currency": "USD",
"type": "purchase",
"status": "completed",
"merchantName": "Amazon",
"merchantCategory": "5411",
"createdAt": "2025-06-02T15:38:49+00:00"
}
],
"pagination": {
"quantity": 25,
"totalQuantity": 2,
"currentPage": 1,
"pages": 1
}
}

Get Card Operation Details

Returns detailed information about a specific card transaction, including fee and settlement amounts.

Endpoint

GET /api/v2/organizations/{org_id}/instruments/operations/{operation_id}

Path Parameters

ParameterTypeRequiredDescription
org_idstringYesYour organization ID
operation_idstringYesTransaction UUID

Request

curl "https://api.4pay.cc/api/v2/organizations/{org_id}/instruments/operations/{operation_id}" \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK
{
"data": {
"id": "d413a9d7-6c7b-4f89-b47e-c742060a12c7",
"card": {
"id": "abc123e4-5678-90ab-cdef-1234567890ab",
"name": "Business Card",
"maskedNumber": "4111******1111"
},
"account": {
"id": "8f3d0c3d-9f3e-4ef6-8fae-c3169025dfcb",
"name": "Business Wallet"
},
"amount": "50.00",
"currency": "USD",
"feeAmount": "0.50",
"feeCurrency": "USD",
"settlementAmount": "49.50",
"settlementCurrency": "USD",
"type": "purchase",
"status": "completed",
"merchantName": "Amazon",
"merchantCategory": "5411",
"description": "Online purchase",
"createdAt": "2025-06-02T15:38:49+00:00",
"updatedAt": "2025-06-02T15:40:00+00:00"
}
}

Response Fields

FieldTypeDescription
amountstringTransaction amount in card currency
feeAmountstringFee charged for this transaction
settlementAmountstringNet amount after fee
merchantNamestringMerchant name (for purchases)
merchantCategorystringMCC code (Merchant Category Code)
descriptionstringTransaction description