# 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"
{
"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 all refunds with filtering and pagination
# 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"
{
"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
}
}
pending, processing, completed, failed# 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"
{
"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
}
}