Get Wallet Transactions
Retrieve wallet transaction history.
List Transactions
GET
https://api.zenpays.com/merchant/api/v1/wallet/{currency}/transactionsBearer · API key
Headers
| Header | Description |
|---|---|
Authorization REQUIRED | Bearer {api_key} |
X-Signature REQUIRED | HMAC-SHA256 signature |
X-Timestamp REQUIRED | ISO 8601 timestamp |
X-Secret-Salt REQUIRED | Secret salt for HMAC validation |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page OPTIONAL | integer1 | Page number |
limit OPTIONAL | integer20 | Items per page |
startDate OPTIONAL | string- | Start date filter (ISO 8601) |
endDate OPTIONAL | string- | End date filter (ISO 8601) |
type OPTIONAL | string- | Filter by type (CREDIT, DEBIT, SETTLEMENT, COMMISSION, REFUND, CHARGEBACK, ADJUSTMENT) |
status OPTIONAL | string- | Filter by status (PENDING, PROCESSING, COMPLETED, FAILED, REVERSED) |
minAmount OPTIONAL | number- | Minimum transaction amount |
maxAmount OPTIONAL | number- | Maximum transaction amount |
sortOrder OPTIONAL | string- | Sort order (asc or desc) |
Response (200 OK)
{
"success": true,
"data": [
{
"id": "wtx_xxxxx",
"type": "CREDIT",
"amount": 1000,
"currency": "USD",
"balance": 250000,
"description": "Payment received",
"reference": "txn_xxxxx",
"status": "COMPLETED",
"createdAt": "2024-01-15T10:30:00.000Z"
},
{
"id": "wtx_yyyyy",
"type": "SETTLEMENT",
"amount": 500,
"currency": "USD",
"balance": 249500,
"description": "Settlement to bank",
"reference": "stl_xxxxx",
"status": "COMPLETED",
"createdAt": "2024-01-15T09:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 500,
"totalPages": 25
}
}
Get Transaction Detail
GET
https://api.zenpays.com/merchant/api/v1/wallet/{currency}/transactions/{transactionId}Bearer · API key
Path Parameters
| Parameter | Type | Description |
|---|---|---|
transactionId REQUIRED | string | Wallet transaction ID |
Response (200 OK)
{
"success": true,
"data": {
"id": "wtx_xxxxx",
"type": "CREDIT",
"amount": 1000,
"currency": "USD",
"balance": 250000,
"description": "Payment received",
"reference": "txn_xxxxx",
"status": "COMPLETED",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
Transaction Types
| Type | Description |
|---|---|
CREDIT | Money added to wallet |
DEBIT | Money withdrawn from wallet |
SETTLEMENT | Settlement to bank account |
COMMISSION | Commission or fee |
REFUND | Refund processed |
CHARGEBACK | Chargeback deduction |
ADJUSTMENT | Manual adjustment |
Transaction Statuses
| Status | Description |
|---|---|
PENDING | Transaction initiated, awaiting processing |
PROCESSING | Transaction being processed |
COMPLETED | Transaction completed |
FAILED | Transaction failed |
REVERSED | Transaction reversed |
Examples
- cURL
- SDK
# List wallet transactions
curl -X GET "https://api.zenpays.com/merchant/api/v1/wallet/{currency}/transactions?type=CREDIT&limit=50&sortOrder=desc" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"
# Get transaction detail
curl -X GET "https://api.zenpays.com/merchant/api/v1/wallet/{currency}/transactions/wtx_xxxxx" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"
// List transactions
const { data } = await zenpays.wallet.getTransactions({
type: 'CREDIT',
limit: 50,
sortOrder: 'desc',
});
// Get transaction detail
const txn = await zenpays.wallet.getTransaction('wtx_xxxxx');