Get Wallet Transaction History
Retrieve your wallet transaction history with optional filtering by transaction type.
Endpoint
GET /v1/delivery-partners/{dpID}/wallet/transactions
Headers
| Header | Type | Description | Required |
|---|---|---|---|
x-client-id | String | Your clientID | ✅ Yes |
x-client-secret | String | Your clientSecret | ✅ Yes |
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
dpID | String | Your delivery partner ID | ✅ Yes |
Query Parameters
| Parameter | Type | Description | Required | Options |
|---|---|---|---|---|
txnType | String | Filter by transaction type | ❌ No | CREDIT, DEBIT |
nextCursor | String | Pagination cursor | ❌ No | - |
limit | Integer | Records per page | ❌ No | Default: 15, Max: 100 |
Transaction Types
| Type | Description |
|---|---|
CREDIT | Money is credited into the wallet |
DEBIT | Money is debited from the wallet |
Example Requests
Get All Transactions
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/delivery-partners/YOUR_DP_ID/wallet/transactions' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Get Only Debit Transactions
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/delivery-partners/YOUR_DP_ID/wallet/transactions' \
--data-urlencode 'txnType=DEBIT' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Get Transactions with Pagination
curl --location 'https://stage-platform-exlr8.exlr8now.com/v1/delivery-partners/YOUR_DP_ID/wallet/transactions' \
--data-urlencode 'limit={limit}' \
--data-urlencode 'nextCursor={nextCursor}' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-client-secret: YOUR_CLIENT_SECRET'
Response
Selected Wallet Transactions
This API returns transactions for your selected wallet only. To view transactions for other wallets, first select the desired wallet using the Select Wallet endpoint.
Successful Response
{
"transactions": [
{
"txnID": "07924e18-e4f4-4617-b8dd-8464d194dfee",
"dpID": "daa30819-8150-4490-b20f-65b75cb148ba",
"txnType": "CREDIT",
"accountType": "WALLET",
"currency": "INR",
"amount": 61211,
"balanceBefore": 12437697.2263,
"balanceAfter": 12498908.2263,
"sourceSystem": "EXLR8_B2B_STORE",
"activity": "TOPUP",
"referenceID": "ADJ-20241113-0001",
"referenceType": "TOPUP",
"metadata": {
"comment": "Manual wallet adjustment after reconciliation"
},
"adjustmentInfo": {
"currency": "AED",
"amount": 2500,
"exchangeRate": 24.4844,
"markupPercentage": 0,
"markupAmount": 0,
"isManuallyAdjusted": false
},
"createdAt": "2025-12-08T18:25:22.041Z",
"updatedAt": "2025-12-08T18:25:22.041Z"
}
],
"paginationInfo": {
"nextCursor": "693717c8b7fdb35c37ffe227",
"hasMore": true
}
}
Response Fields
Transaction Fields
| Field | Type | Description |
|---|---|---|
txnID | String | Unique transaction identifier |
dpID | String | Your delivery partner ID |
txnType | String | Transaction type (CREDIT/DEBIT) |
accountType | String | Account type (e.g., WALLET) |
currency | String | Currency code |
amount | Number | Transaction amount |
balanceBefore | Number | Wallet balance before transaction |
balanceAfter | Number | Wallet balance after transaction |
sourceSystem | String | System that initiated the transaction |
activity | String | Activity type (see Activity Types below) |
referenceID | String | Reference to related entity (Order ID, UTR, etc.) |
referenceType | String | Type of reference |
metadata | Object | Additional transaction details |
adjustmentInfo | Object | Adjustment details (see below) |
createdAt | String | Transaction timestamp |
updatedAt | String | Last update timestamp |
Adjustment Info Fields
| Field | Type | Description |
|---|---|---|
currency | String | Original currency of adjustment |
amount | Number | Original amount in source currency |
exchangeRate | Number | Exchange rate used for conversion |
markupPercentage | Number | Markup percentage applied |
markupAmount | Number | Markup amount |
isManuallyAdjusted | Boolean | Whether adjustment was manual |
Transaction Activity Types
| Activity | Description | Reference Type |
|---|---|---|
TOPUP | Wallet topped up manually | UTR (bank reference) |
PURCHASE | Purchase made from wallet | Order ID |
REFUND | Money refunded against an order | Order ID |
ADJUST | Manual wallet adjustment | Transaction ID |
Filtering Examples
Get Recent Purchases
// Example: Get recent purchase transactions
async function getRecentPurchases(limit = 50) {
const response = await fetch(
`${baseUrl}/v1/delivery-partners/${dpID}/wallet/transactions?txnType=DEBIT&limit=${limit}`,
{
headers: {
"x-client-id": clientId,
"x-client-secret": clientSecret,
},
}
);
const data = await response.json();
// Filter only purchase activities
return data.transactions.filter((txn) => txn.activity === "PURCHASE");
}
Get Top-ups Only
// Example: Get wallet top-up history
async function getTopupHistory() {
const response = await fetch(
`${baseUrl}/v1/delivery-partners/${dpID}/wallet/transactions?txnType=CREDIT`,
{
headers: {
"x-client-id": clientId,
"x-client-secret": clientSecret,
},
}
);
const data = await response.json();
// Filter only top-up activities
return data.transactions.filter((txn) => txn.activity === "TOPUP");
}
Error Responses
Unauthorized Access
{
"error": "unauthenticated",
"errCode": "UNAUTHORIZED"
}
Invalid DP ID
{
"error": "forbidden: param: admin user does not have access to DP: INVALID_DP_ID",
"errCode": "FORBIDDEN"
}
Invalid Transaction Type
{
"error": "Invalid transaction type",
"errCode": "BAD_REQUEST"
}
Use Cases
1. Financial Reconciliation
Match transactions with your internal accounting systems.
2. Audit Trail
Maintain complete audit trails for compliance.
3. Spending Analysis
Analyze spending patterns and optimize purchasing.
4. Customer Support
Provide transaction details for customer inquiries.
Best Practices
- Regular Reconciliation: Regularly reconcile transactions with your records
- Filter Appropriately: Use transaction type filters to reduce data transfer
- Handle Pagination: Implement proper pagination for large transaction histories
- Store References: Map transaction references to your internal systems
- Monitor Patterns: Watch for unusual transaction patterns
Integration Example
// Example: Complete transaction monitoring
class TransactionMonitor {
async getTransactionSummary(days = 30) {
const transactions = await this.getTransactionsForPeriod(days);
const summary = {
totalCredits: 0,
totalDebits: 0,
purchaseCount: 0,
refundCount: 0,
topupCount: 0,
};
transactions.forEach((txn) => {
if (txn.txnType === "CREDIT") {
summary.totalCredits += txn.amount;
if (txn.activity === "TOPUP") summary.topupCount++;
if (txn.activity === "REFUND") summary.refundCount++;
} else if (txn.txnType === "DEBIT") {
summary.totalDebits += txn.amount;
if (txn.activity === "PURCHASE") summary.purchaseCount++;
}
});
return summary;
}
async reconcileWithOrders() {
const purchases = await this.getPurchaseTransactions();
const orders = await this.getOrders();
// Match transactions with orders
const reconciliation = purchases.map((txn) => {
const order = orders.find((o) => o.orderID === txn.referenceID);
return {
transaction: txn,
order: order,
matched: !!order,
discrepancy: order ? Math.abs(order.totalAmount - txn.amount) : null,
};
});
return reconciliation;
}
}
Related Endpoints
- Get Wallet Balance - Check current balance
- Place Order - Orders create debit transactions
- Get Orders - Match transactions with orders