# List all refunds
curl "https://api.swiftpay.cx/api/refunds?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by session
curl "https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/refunds?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all refunds
const response = await fetch(
'https://api.swiftpay.cx/api/refunds?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const refunds = await response.json();
// Filter by specific session
const sessionRefunds = await fetch(
'https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
).then(r => r.json());
import requests
# List all refunds
response = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'page': 1, 'limit': 20}
)
refunds = response.json()
# Filter by status
completed_refunds = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed'}
).json()
{
"success": true,
"data": [
{
"id": "ref_xyz789",
"checkoutSessionId": "sess_abc123",
"amountInCents": 2999,
"reason": "Customer requested refund",
"status": "completed",
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "ref_abc456",
"checkoutSessionId": "sess_def789",
"amountInCents": 4999,
"reason": "Product not as described",
"status": "pending",
"createdAt": "2024-01-14T15:20:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}
Refunds
List Refunds
List all refunds with filtering and pagination
GET
/
api
/
refunds
# List all refunds
curl "https://api.swiftpay.cx/api/refunds?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by session
curl "https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/refunds?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all refunds
const response = await fetch(
'https://api.swiftpay.cx/api/refunds?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const refunds = await response.json();
// Filter by specific session
const sessionRefunds = await fetch(
'https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
).then(r => r.json());
import requests
# List all refunds
response = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'page': 1, 'limit': 20}
)
refunds = response.json()
# Filter by status
completed_refunds = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed'}
).json()
{
"success": true,
"data": [
{
"id": "ref_xyz789",
"checkoutSessionId": "sess_abc123",
"amountInCents": 2999,
"reason": "Customer requested refund",
"status": "completed",
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "ref_abc456",
"checkoutSessionId": "sess_def789",
"amountInCents": 4999,
"reason": "Product not as described",
"status": "pending",
"createdAt": "2024-01-14T15:20:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}
List Refunds
Returns a paginated list of refunds for your business.Request
Bearer token with your API key
Filter by checkout session ID
Filter by status:
pending, processing, completed, failedPage number for pagination
Number of results per page (1-100)
Response
Whether the request was successful
# List all refunds
curl "https://api.swiftpay.cx/api/refunds?page=1&limit=20" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by session
curl "https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123" \
-H "Authorization: Bearer mp_live_your_api_key"
# Filter by status
curl "https://api.swiftpay.cx/api/refunds?status=completed" \
-H "Authorization: Bearer mp_live_your_api_key"
// List all refunds
const response = await fetch(
'https://api.swiftpay.cx/api/refunds?page=1&limit=20',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
);
const refunds = await response.json();
// Filter by specific session
const sessionRefunds = await fetch(
'https://api.swiftpay.cx/api/refunds?transactionId=sess_abc123',
{
headers: {
'Authorization': 'Bearer mp_live_your_api_key'
}
}
).then(r => r.json());
import requests
# List all refunds
response = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'page': 1, 'limit': 20}
)
refunds = response.json()
# Filter by status
completed_refunds = requests.get(
'https://api.swiftpay.cx/api/refunds',
headers={'Authorization': 'Bearer mp_live_your_api_key'},
params={'status': 'completed'}
).json()
{
"success": true,
"data": [
{
"id": "ref_xyz789",
"checkoutSessionId": "sess_abc123",
"amountInCents": 2999,
"reason": "Customer requested refund",
"status": "completed",
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "ref_abc456",
"checkoutSessionId": "sess_def789",
"amountInCents": 4999,
"reason": "Product not as described",
"status": "pending",
"createdAt": "2024-01-14T15:20:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}
⌘I