Skip to main content
GET
/
api
/
refunds
/
:id
curl https://api.swiftpay.cx/api/refunds/ref_xyz789 \
  -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",
    "completedAt": "2024-01-15T10:35:00Z",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Get Refund

Retrieves the details of an existing refund.

Request

Authorization
string
required
Bearer token with your API key
id
string
required
The unique identifier of the refund (e.g., ref_xyz789)

Response

success
boolean
Whether the request was successful
data
object
curl https://api.swiftpay.cx/api/refunds/ref_xyz789 \
  -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",
    "completedAt": "2024-01-15T10:35:00Z",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Refund Statuses

StatusDescription
pendingRefund created, awaiting processing
processingRefund is being processed with payment provider
completedRefund successful, funds returned to customer
failedRefund failed, check failureReason
Use webhooks to get notified when refund status changes rather than polling this endpoint.