Skip to main content

Get Wallet Transaction History

Retrieve your wallet transaction history with optional filtering by transaction type.

Endpoint

GET /v1/delivery-partners/{dpID}/wallet/transactions

Headers

HeaderTypeDescriptionRequired
x-client-idStringYour clientID✅ Yes
x-client-secretStringYour clientSecret✅ Yes

Path Parameters

ParameterTypeDescriptionRequired
dpIDStringYour delivery partner ID✅ Yes

Query Parameters

ParameterTypeDescriptionRequiredOptions
txnTypeStringFilter by transaction type❌ NoCREDIT, DEBIT
nextCursorStringPagination cursor❌ No-
limitIntegerRecords per page❌ NoDefault: 15, Max: 100

Transaction Types

TypeDescription
CREDITMoney is credited into the wallet
DEBITMoney 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

FieldTypeDescription
txnIDStringUnique transaction identifier
dpIDStringYour delivery partner ID
txnTypeStringTransaction type (CREDIT/DEBIT)
accountTypeStringAccount type (e.g., WALLET)
currencyStringCurrency code
amountNumberTransaction amount
balanceBeforeNumberWallet balance before transaction
balanceAfterNumberWallet balance after transaction
sourceSystemStringSystem that initiated the transaction
activityStringActivity type (see Activity Types below)
referenceIDStringReference to related entity (Order ID, UTR, etc.)
referenceTypeStringType of reference
metadataObjectAdditional transaction details
adjustmentInfoObjectAdjustment details (see below)
createdAtStringTransaction timestamp
updatedAtStringLast update timestamp

Adjustment Info Fields

FieldTypeDescription
currencyStringOriginal currency of adjustment
amountNumberOriginal amount in source currency
exchangeRateNumberExchange rate used for conversion
markupPercentageNumberMarkup percentage applied
markupAmountNumberMarkup amount
isManuallyAdjustedBooleanWhether adjustment was manual

Transaction Activity Types

ActivityDescriptionReference Type
TOPUPWallet topped up manuallyUTR (bank reference)
PURCHASEPurchase made from walletOrder ID
REFUNDMoney refunded against an orderOrder ID
ADJUSTManual wallet adjustmentTransaction 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

  1. Regular Reconciliation: Regularly reconcile transactions with your records
  2. Filter Appropriately: Use transaction type filters to reduce data transfer
  3. Handle Pagination: Implement proper pagination for large transaction histories
  4. Store References: Map transaction references to your internal systems
  5. 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;
}
}