Skip to content

Card Transactions ​

Get paginated transaction history for user's cards

Endpoint: GET https://api.uncash.io/api/v1/cards/transactions

Query Parameters ​

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number for pagination
limitintegerNo20Number of items per page (max: 100)
card_idstringNo-Filter transactions by specific card ID

Response ​

Success Response ​

FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringSuccess message

Data Object ​

FieldTypeDescription
dataarrayArray of card transactions
paginationobjectPagination information

Transaction Object ​

FieldTypeDescription
idstringTransaction ID
card_idstringInternal card ID
card_namestringCard nickname
statusstringTransaction status (e.g., "Approved", "Declined")
sidestringTransaction side ("Debit" or "Credit")
amountnumberTransaction amount
currencystringCurrency code (e.g., "USD")
typestringTransaction type
masked_panstringMasked card number
merchant_namestringMerchant name (if available)
original_amountnumberOriginal amount (before conversion)
original_currencystringOriginal currency
decline_codestringDecline reason code (if declined)
transaction_created_atstringTransaction timestamp
transaction_updated_atstringLast update timestamp

Pagination Object ​

FieldTypeDescription
pageintegerCurrent page number
limitintegerItems per page
totalintegerTotal number of transactions
totalPagesintegerTotal pages available
hasNextbooleanWhether more pages exist
hasPrevbooleanWhether previous pages exist

Request Example ​

bash
curl -X GET "https://api.uncash.io/api/v1/cards/transactions?page=1&limit=20" \
  -H "Authorization: Bearer uc_your_api_token_here"
bash
curl -X GET "https://api.uncash.io/api/v1/cards/transactions?page=1&limit=20&card_id=abc123" \
  -H "Authorization: Bearer uc_your_api_token_here"
javascript
const response = await fetch('https://api.uncash.io/api/v1/cards/transactions?page=1&limit=20&card_id=abc123', {
  headers: {
    'Authorization': 'Bearer uc_your_api_token_here'
  }
});

const data = await response.json();
python
import requests

url = "https://api.uncash.io/api/v1/cards/transactions"
headers = {"Authorization": "Bearer uc_your_api_token_here"}
params = {"page": 1, "limit": 20, "card_id": 123}

response = requests.get(url, headers=headers, params=params)
data = response.json()

Response Example ​

json
{
  "success": true,
  "data": {
    "data": [
      {
        "id": "67c48f6fc8614632e0b338fc",
        "card_id": "abc123",
        "card_name": "My Business Card",
        "status": "Approved",
        "side": "Debit",
        "amount": 25.50,
        "currency": "USD",
        "type": "Transaction",
        "masked_pan": "4559 88** **** 1234",
        "merchant_name": "Amazon.com",
        "original_amount": 25.50,
        "original_currency": "USD",
        "decline_code": null,
        "transaction_created_at": "2025-08-03T10:30:00.000Z",
        "transaction_updated_at": "2025-08-03T10:30:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 156,
      "totalPages": 8,
      "hasNext": true,
      "hasPrev": false
    }
  },
  "message": "Card transactions retrieved successfully"
}

Error Responses ​

Invalid Card ID ​

json
{
  "success": false,
  "message": "Invalid card_id parameter",
  "timestamp": "2025-08-03T10:00:00.000Z"
}

Card Not Found ​

json
{
  "success": false,
  "message": "Card not found or access denied",
  "timestamp": "2025-08-03T10:00:00.000Z"
}

UnCash API Documentation