# List all withdrawals
curl "https://api.swiftpay.cx/api/withdrawals?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/withdrawals?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all withdrawals
const response = await fetch(
'https://api.swiftpay.cx/api/withdrawals?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const withdrawals = await response.json();
// Calculate total withdrawn
const totalWithdrawn = withdrawals.data
.filter(w => w.status === 'completed')
.reduce((sum, w) => sum + w.amountInCents, 0);
console.log(`Total withdrawn: $${(totalWithdrawn / 100).toFixed(2)}`);
import requests
# List completed withdrawals
response = requests.get(
'https://api.swiftpay.cx/api/withdrawals',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed', 'limit': 50}
)
withdrawals = response.json()
total = sum(w['amountInCents'] for w in withdrawals['data'])
print(f"Total withdrawn: ${total / 100:.2f}")
{
"success": true,
"data": {
"items": [
{
"id": "wd_abc123",
"amountInCents": 5000,
"status": "completed",
"destinationType": "paypal",
"requestedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T14:00:00Z"
},
{
"id": "wd_def456",
"amountInCents": 2500,
"status": "pending",
"destinationType": "crypto",
"requestedAt": "2024-01-16T09:00:00Z",
"completedAt": null
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}
}
Withdrawals
List Withdrawals
List all withdrawal requests with filtering and pagination
GET
/
api
/
withdrawals
# List all withdrawals
curl "https://api.swiftpay.cx/api/withdrawals?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/withdrawals?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all withdrawals
const response = await fetch(
'https://api.swiftpay.cx/api/withdrawals?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const withdrawals = await response.json();
// Calculate total withdrawn
const totalWithdrawn = withdrawals.data
.filter(w => w.status === 'completed')
.reduce((sum, w) => sum + w.amountInCents, 0);
console.log(`Total withdrawn: $${(totalWithdrawn / 100).toFixed(2)}`);
import requests
# List completed withdrawals
response = requests.get(
'https://api.swiftpay.cx/api/withdrawals',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed', 'limit': 50}
)
withdrawals = response.json()
total = sum(w['amountInCents'] for w in withdrawals['data'])
print(f"Total withdrawn: ${total / 100:.2f}")
{
"success": true,
"data": {
"items": [
{
"id": "wd_abc123",
"amountInCents": 5000,
"status": "completed",
"destinationType": "paypal",
"requestedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T14:00:00Z"
},
{
"id": "wd_def456",
"amountInCents": 2500,
"status": "pending",
"destinationType": "crypto",
"requestedAt": "2024-01-16T09:00:00Z",
"completedAt": null
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}
}
List Withdrawals
Returns a paginated list of withdrawal requests for your business.Request
Bearer token with your API key
Filter by status:
pending, processing, completed, failed, cancelledPage number for pagination
Number of results per page (1-100)
Response
Whether the request was successful
Show properties
Show properties
Array of withdrawal objects
# List all withdrawals
curl "https://api.swiftpay.cx/api/withdrawals?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/withdrawals?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all withdrawals
const response = await fetch(
'https://api.swiftpay.cx/api/withdrawals?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const withdrawals = await response.json();
// Calculate total withdrawn
const totalWithdrawn = withdrawals.data
.filter(w => w.status === 'completed')
.reduce((sum, w) => sum + w.amountInCents, 0);
console.log(`Total withdrawn: $${(totalWithdrawn / 100).toFixed(2)}`);
import requests
# List completed withdrawals
response = requests.get(
'https://api.swiftpay.cx/api/withdrawals',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed', 'limit': 50}
)
withdrawals = response.json()
total = sum(w['amountInCents'] for w in withdrawals['data'])
print(f"Total withdrawn: ${total / 100:.2f}")
{
"success": true,
"data": {
"items": [
{
"id": "wd_abc123",
"amountInCents": 5000,
"status": "completed",
"destinationType": "paypal",
"requestedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T14:00:00Z"
},
{
"id": "wd_def456",
"amountInCents": 2500,
"status": "pending",
"destinationType": "crypto",
"requestedAt": "2024-01-16T09:00:00Z",
"completedAt": null
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}
}
Withdrawal Statuses
| Status | Description |
|---|---|
pending | Awaiting processing |
processing | Funds being transferred |
completed | Successfully transferred |
failed | Transfer failed |
cancelled | Cancelled by user or system |
⌘I