Skip to main content
POST
Create a refund for a payment

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

payment_id
string
required

ID of the payment.

Body

application/json
amount
integer
required

Refund amount in smallest currency unit

Required range: x >= 1
Example:

50000

reason
string | null

Optional reason for the refund

Maximum string length: 255
Example:

"Customer request"

metadata
object | null

Optional metadata as key-value pairs

Example:

Response

Refund created and processed.

id
string
Example:

"rf_AbC123XyZ"

payment_id
string | null

ID of the payment being refunded

Example:

"pay_Def456UvW"

status
enum<string>

Current status of the refund

Available options:
Processing,
Succeeded,
Failed
Example:

"Processing"

amount
integer

Amount in smallest currency unit

Example:

50000

currency
string

ISO 4217 currency code

Example:

"USD"

reason
string | null

Reason for the refund

Example:

"Customer request"

processor_transaction_id
string | null

Processor transaction ID from the payment processor

Example:

"ref_processor_123"

failure_code
string | null

Error code if the refund failed

Example:

"unknown_failure"

failure_message
string | null

Human-readable error message if the refund failed

Example:

"The refund could not be completed"

metadata
object | null

Optional metadata as key-value pairs

Example:
created_at
string<date-time>
Example:

"2025-10-08T18:20:31Z"

updated_at
string<date-time>
Example:

"2025-10-08T18:25:00Z"

Last modified on June 14, 2026