Skip to main content
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

Authorization
string
required
Bearer token with your API key
status
string
Filter by status: pending, processing, completed, failed, cancelled
page
integer
default:"1"
Page number for pagination
limit
integer
default:"20"
Number of results per page (1-100)

Response

success
boolean
Whether the request was successful
data
object
# 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

StatusDescription
pendingAwaiting processing
processingFunds being transferred
completedSuccessfully transferred
failedTransfer failed
cancelledCancelled by user or system