Appearance
Card Transactions
Get paginated transaction history for user's cards
Endpoint: GET https://api.uncash.io/api/v1/cards/transactions
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number for pagination |
limit | integer | No | 20 | Number of items per page (max: 100) |
card_id | string | No | - | Filter transactions by specific card ID |
Response
Success Response
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful |
message | string | Success message |
Data Object
| Field | Type | Description |
|---|---|---|
data | array | Array of card transactions |
pagination | object | Pagination information |
Transaction Object
| Field | Type | Description |
|---|---|---|
id | string | Transaction ID |
card_id | string | Internal card ID |
card_name | string | Card nickname |
status | string | Transaction status (e.g., "Approved", "Declined") |
side | string | Transaction side ("Debit" or "Credit") |
amount | number | Transaction amount |
currency | string | Currency code (e.g., "USD") |
type | string | Transaction type |
masked_pan | string | Masked card number |
merchant_name | string | Merchant name (if available) |
original_amount | number | Original amount (before conversion) |
original_currency | string | Original currency |
decline_code | string | Decline reason code (if declined) |
transaction_created_at | string | Transaction timestamp |
transaction_updated_at | string | Last update timestamp |
Pagination Object
| Field | Type | Description |
|---|---|---|
page | integer | Current page number |
limit | integer | Items per page |
total | integer | Total number of transactions |
totalPages | integer | Total pages available |
hasNext | boolean | Whether more pages exist |
hasPrev | boolean | Whether 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"
}