Skip to main content
POST
Refund a payment

Authorizations

x-client-secret
string
header
required

Your secret API key. Keep this secure and never expose it in client-side code.

Headers

idempotency-key
string<uuid>
required

Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.

Example:

"refund_123456_unique_key"

Path Parameters

id
string
required

Payment ID to refund

Response

Payment refunded successfully

id
string
required

Refund ID

Example:

"ref_12345abcdef"

paymentId
string
required

Original payment ID

Example:

"pay_12345abcdef"

amount
number
required

The amount refunded

Example:

100.5

status
string
required

Refund status

Example:

"succeeded"

timestamp
string
required

Timestamp of the refund

Example:

"2023-07-01T12:00:00.000Z"