# PayPal Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50.00,
"destinationType": "paypal",
"destinationDetails": {
"paypalEmail": "user@example.com"
}
}'
# Crypto Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"destinationType": "crypto",
"destinationDetails": {
"cryptoCoin": "USDT",
"cryptoNetwork": "TRC20",
"cryptoAddress": "Txxxxxxxxxxxxxxxxxxxxxxx"
}
}'
const response = await fetch("https://api.swiftpay.cx/api/withdrawals", {
method: "POST",
headers: {
Authorization: "Bearer mp_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 50.00,
destinationType: "paypal",
destinationDetails: {
paypalEmail: "user@example.com"
}
}),
});
const withdrawal = await response.json();
console.log(`Withdrawal ${withdrawal.data.id} created`);
import requests
response = requests.post(
'https://api.swiftpay.cx/api/withdrawals',
headers={
'Authorization': 'Bearer mp_live_your_api_key',
'Content-Type': 'application/json'
},
json={
'amount': 50.00,
'destinationType': 'paypal',
'destinationDetails': {
'paypalEmail': 'user@example.com'
}
}
)
withdrawal = response.json()
print(f"Withdrawal {withdrawal['data']['id']} created")
{
"success": true,
"data": {
"id": "wd_abc123",
"amountInCents": 5000,
"status": "pending",
"destinationType": "paypal",
"destinationDetails": "{\"paypalEmail\":\"user@example.com\"}",
"requestedAt": "2024-01-15T10:30:00Z"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Insufficient available balance",
"requestId": "req_abc123"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Withdrawal method not found",
"requestId": "req_abc123"
}
}
Withdrawals
Create Withdrawal
Create a withdrawal request to transfer funds to your bank or wallet
POST
/
api
/
withdrawals
# PayPal Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50.00,
"destinationType": "paypal",
"destinationDetails": {
"paypalEmail": "user@example.com"
}
}'
# Crypto Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"destinationType": "crypto",
"destinationDetails": {
"cryptoCoin": "USDT",
"cryptoNetwork": "TRC20",
"cryptoAddress": "Txxxxxxxxxxxxxxxxxxxxxxx"
}
}'
const response = await fetch("https://api.swiftpay.cx/api/withdrawals", {
method: "POST",
headers: {
Authorization: "Bearer mp_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 50.00,
destinationType: "paypal",
destinationDetails: {
paypalEmail: "user@example.com"
}
}),
});
const withdrawal = await response.json();
console.log(`Withdrawal ${withdrawal.data.id} created`);
import requests
response = requests.post(
'https://api.swiftpay.cx/api/withdrawals',
headers={
'Authorization': 'Bearer mp_live_your_api_key',
'Content-Type': 'application/json'
},
json={
'amount': 50.00,
'destinationType': 'paypal',
'destinationDetails': {
'paypalEmail': 'user@example.com'
}
}
)
withdrawal = response.json()
print(f"Withdrawal {withdrawal['data']['id']} created")
{
"success": true,
"data": {
"id": "wd_abc123",
"amountInCents": 5000,
"status": "pending",
"destinationType": "paypal",
"destinationDetails": "{\"paypalEmail\":\"user@example.com\"}",
"requestedAt": "2024-01-15T10:30:00Z"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Insufficient available balance",
"requestId": "req_abc123"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Withdrawal method not found",
"requestId": "req_abc123"
}
}
Create Withdrawal
Creates a new withdrawal request to transfer funds from your available balance.You can only withdraw from your available balance. Reserved funds cannot
be withdrawn until released.
Request
Bearer token with your API key
Amount to withdraw in dollars (e.g.,
50.00). Must not exceed available
balance.Type of withdrawal:
paypal or cryptoShow properties
Show properties
Required if
destinationType is paypal. The PayPal email address to
receive funds.Required if
destinationType is crypto. The coin to withdraw (e.g.,
USDT, USDC).Required if
destinationType is crypto. The network (e.g., ERC20,
TRC20).Required if
destinationType is crypto. The destination wallet
address.Optional internal notes for the withdrawal.
Response
Whether the request was successful
Show properties
Show properties
Unique withdrawal identifier (e.g.,
wd_abc123)Withdrawal amount in cents
Withdrawal status:
pending, processing, completed, failed,
cancelledType of withdrawal:
paypal or cryptoJSON string containing destination details
ISO 8601 creation timestamp
# PayPal Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50.00,
"destinationType": "paypal",
"destinationDetails": {
"paypalEmail": "user@example.com"
}
}'
# Crypto Withdrawal
curl -X POST https://api.swiftpay.cx/api/withdrawals \
-H "Authorization: Bearer mp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"destinationType": "crypto",
"destinationDetails": {
"cryptoCoin": "USDT",
"cryptoNetwork": "TRC20",
"cryptoAddress": "Txxxxxxxxxxxxxxxxxxxxxxx"
}
}'
const response = await fetch("https://api.swiftpay.cx/api/withdrawals", {
method: "POST",
headers: {
Authorization: "Bearer mp_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 50.00,
destinationType: "paypal",
destinationDetails: {
paypalEmail: "user@example.com"
}
}),
});
const withdrawal = await response.json();
console.log(`Withdrawal ${withdrawal.data.id} created`);
import requests
response = requests.post(
'https://api.swiftpay.cx/api/withdrawals',
headers={
'Authorization': 'Bearer mp_live_your_api_key',
'Content-Type': 'application/json'
},
json={
'amount': 50.00,
'destinationType': 'paypal',
'destinationDetails': {
'paypalEmail': 'user@example.com'
}
}
)
withdrawal = response.json()
print(f"Withdrawal {withdrawal['data']['id']} created")
{
"success": true,
"data": {
"id": "wd_abc123",
"amountInCents": 5000,
"status": "pending",
"destinationType": "paypal",
"destinationDetails": "{\"paypalEmail\":\"user@example.com\"}",
"requestedAt": "2024-01-15T10:30:00Z"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Insufficient available balance",
"requestId": "req_abc123"
}
}
{
"success": false,
"error": {
"type": "validation_error",
"message": "Withdrawal method not found",
"requestId": "req_abc123"
}
}
Withdrawal Flow
- Pending: Withdrawal request created, awaiting processing
- Processing: Funds being transferred to your account
- Completed: Funds successfully transferred
- Failed: Transfer failed (contact support)
- Cancelled: Withdrawal cancelled (funds returned to balance)
Before Withdrawing
Check Available Balance
Use the Balance API to verify
available funds
Pending and processing withdrawals reduce your available balance to prevent
over-withdrawal.
⌘I