Skip to main content

List Withdrawals

Retrieve a paginated list of your withdrawals with optional filters.

Endpoint

GET /api/withdraws/list

Query parameters

ParameterTypeDefaultDescription
pageInteger0Page number (starts at 0)
sizeInteger20Items per page (max: 100)
statusStringFilter 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

FieldTypeDescription
contentArrayList of withdrawals on this page
totalElementsIntegerTotal number of withdrawals matching filters
totalPagesIntegerTotal number of pages
sizeIntegerItems per page
numberIntegerCurrent page number
firstBooleanIs this the first page?
lastBooleanIs this the last page?
emptyBooleanIs the list empty?

Withdrawal object

FieldTypeDescription
referenceStringUnique withdrawal reference
statusStringCurrent status
amountDoubleWithdrawal amount
currencyStringCurrency code
beneficiaryNameStringBeneficiary name
beneficiaryPhoneStringPhone number
countryStringCountry code
gatewayNameStringGateway used
createdAtDateTimeCreation date
processedAtDateTimeProcessing date (if completed)

Filtering by status

StatusDescription
pendingAwaiting processing
processingBeing processed
successCompleted successfully
failedFailed
expiredExpired
cancelledCancelled

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