Withdrawal Statistics
Get aggregated metrics on your disbursements to track your performance.
Endpoint
GET /api/withdraws/statistics
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | String | ❌ | Start date (format: yyyy-MM-dd) |
endDate | String | ❌ | End date (format: yyyy-MM-dd) |
Default period
If no dates are specified, statistics cover all withdrawals in your account.
Request examples
Global statistics
curl -X GET "https://app.awdpay.com/api/withdraws/statistics" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Current month statistics
curl -X GET "https://app.awdpay.com/api/withdraws/statistics?startDate=2025-01-01&endDate=2025-01-31" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Last 7 days
curl -X GET "https://app.awdpay.com/api/withdraws/statistics?startDate=2025-01-08&endDate=2025-01-15" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Response
{
"totalWithdrawals": 248,
"successfulWithdrawals": 231,
"failedWithdrawals": 12,
"pendingWithdrawals": 5,
"totalAmount": 12450000.00,
"successAmount": 11800000.00,
"failedAmount": 450000.00,
"pendingAmount": 200000.00,
"totalFees": 187500.00,
"currency": "XOF",
"successRate": 93.15,
"averageAmount": 50201.61,
"largestWithdrawal": 500000.00,
"smallestWithdrawal": 1000.00,
"byGateway": [
{
"gatewayName": "wave-senegal",
"count": 145,
"totalAmount": 7250000.00,
"successCount": 142,
"failedCount": 3
},
{
"gatewayName": "orange-money-sn",
"count": 103,
"totalAmount": 5200000.00,
"successCount": 89,
"failedCount": 9
}
],
"byCountry": [
{
"country": "SN",
"count": 210,
"totalAmount": 10500000.00
},
{
"country": "CI",
"count": 38,
"totalAmount": 1950000.00
}
]
}
Response fields
Global metrics
| Field | Type | Description |
|---|---|---|
totalWithdrawals | Integer | Total number of withdrawals |
successfulWithdrawals | Integer | Number of successful withdrawals |
failedWithdrawals | Integer | Number of failed withdrawals |
pendingWithdrawals | Integer | Number of pending withdrawals |
totalAmount | Double | Total amount of all withdrawals |
successAmount | Double | Total amount of successful withdrawals |
failedAmount | Double | Total amount of failed withdrawals |
pendingAmount | Double | Total amount of pending withdrawals |
totalFees | Double | Total fees charged |
currency | String | Main currency |
successRate | Double | Success rate (%) |
averageAmount | Double | Average withdrawal amount |
largestWithdrawal | Double | Largest withdrawal |
smallestWithdrawal | Double | Smallest withdrawal |
Breakdown by gateway
| Field | Type | Description |
|---|---|---|
gatewayName | String | Gateway name |
count | Integer | Number of withdrawals |
totalAmount | Double | Total amount |
successCount | Integer | Number of successful withdrawals |
failedCount | Integer | Number of failed withdrawals |
Breakdown by country
| Field | Type | Description |
|---|---|---|
country | String | Country code |
count | Integer | Number of withdrawals |
totalAmount | Double | Total amount |
Usage example
async function getMonthlyReport(year, month) {
const startDate = `${year}-${month.toString().padStart(2, '0')}-01`;
const lastDay = new Date(year, month, 0).getDate();
const endDate = `${year}-${month.toString().padStart(2, '0')}-${lastDay}`;
const response = await fetch(
`https://app.awdpay.com/api/withdraws/statistics?startDate=${startDate}&endDate=${endDate}`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
const stats = await response.json();
console.log(`Month report ${month}/${year}`);
console.log(`Total: ${stats.totalWithdrawals} withdrawals`);
console.log(`Success rate: ${stats.successRate.toFixed(2)}%`);
console.log(`Total amount: ${stats.totalAmount.toLocaleString()} ${stats.currency}`);
console.log(`Total fees: ${stats.totalFees.toLocaleString()} ${stats.currency}`);
return stats;
}
Next step
➡️ Webhooks — Receive real-time notifications