List Withdrawals
Retrieve a paginated list of your withdrawals with optional filters.
Endpoint
GET /api/withdraws/list
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | Integer | 0 | Page number (starts at 0) |
size | Integer | 20 | Items per page (max: 100) |
status | String | — | Filter by status (pending, success, failed...) |
Request examples
Retrieve all withdrawals
curl -X GET "https://app.awdpay.com/api/withdraws/list?page=0&size=20" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Filter by status
curl -X GET "https://app.awdpay.com/api/withdraws/list?page=0&size=20&status=success" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Pagination (page 2)
curl -X GET "https://app.awdpay.com/api/withdraws/list?page=1&size=20" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Response
{
"content": [
{
"reference": "WTD1704067200000ABC123",
"status": "success",
"amount": 5000.00,
"currency": "XOF",
"beneficiaryName": "Amadou Diallo",
"beneficiaryPhone": "+221770123456",
"country": "SN",
"gatewayName": "wave-senegal",
"createdAt": "2025-01-15T10:30:00Z",
"processedAt": "2025-01-15T10:30:45Z"
},
{
"reference": "WTD1704063600000XYZ789",
"status": "pending",
"amount": 2500.00,
"currency": "XOF",
"beneficiaryName": "Fatou Sall",
"beneficiaryPhone": "+221770987654",
"country": "SN",
"gatewayName": "orange-money-sn",
"createdAt": "2025-01-15T09:00:00Z",
"processedAt": null
}
],
"pageable": {
"pageNumber": 0,
"pageSize": 20,
"offset": 0
},
"totalElements": 124,
"totalPages": 7,
"last": false,
"first": true,
"numberOfElements": 20,
"size": 20,
"number": 0,
"empty": false
}
Response fields
Main content
| Field | Type | Description |
|---|---|---|
content | Array | List of withdrawals on this page |
totalElements | Integer | Total number of withdrawals matching filters |
totalPages | Integer | Total number of pages |
size | Integer | Items per page |
number | Integer | Current page number |
first | Boolean | Is this the first page? |
last | Boolean | Is this the last page? |
empty | Boolean | Is the list empty? |
Withdrawal object
| Field | Type | Description |
|---|---|---|
reference | String | Unique withdrawal reference |
status | String | Current status |
amount | Double | Withdrawal amount |
currency | String | Currency code |
beneficiaryName | String | Beneficiary name |
beneficiaryPhone | String | Phone number |
country | String | Country code |
gatewayName | String | Gateway used |
createdAt | DateTime | Creation date |
processedAt | DateTime | Processing date (if completed) |
Filtering by status
| Status | Description |
|---|---|
pending | Awaiting processing |
processing | Being processed |
success | Completed successfully |
failed | Failed |
expired | Expired |
cancelled | Cancelled |
Pagination example
async function fetchAllWithdrawals() {
let page = 0;
let allWithdrawals = [];
let hasMore = true;
while (hasMore) {
const response = await fetch(
`https://app.awdpay.com/api/withdraws/list?page=${page}&size=100`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
const data = await response.json();
allWithdrawals = allWithdrawals.concat(data.content);
hasMore = !data.last;
page++;
}
return allWithdrawals;
}
Next step
➡️ Statistics — Access aggregated metrics