curl -X POST https://api.swiftpay.cx/api/refunds \ -H "Authorization: Bearer mp_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "checkoutSessionId": "sess_abc123", "reason": "Customer requested refund" }'
{ "success": true, "data": { "id": "ref_xyz789", "checkoutSessionId": "sess_abc123", "amountInCents": 2999, "reason": "Customer requested refund", "status": "pending", "createdAt": "2024-01-15T10:30:00Z" } }
Create a refund for a completed checkout session
completed
Show properties
ref_xyz789
pending
processing
failed
refund.completed
refund.failed