Skip to main content
POST
Create a refund

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

Alguna-Version
enum<string>
required
Available options:
2026-04-01
Idempotency-Key
string

A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.

Maximum string length: 255
Example:

"ik_a1b2c3d4e5f6"

Body

application/json
amount
string
required

Refund amount

Example:

"99.00"

payment_id
string
required

The payment to refund

Example:

"pay_01H1VECT"

reason
string | null

Reason for the refund

Example:

"Customer requested refund"

statement_descriptor
string | null

Text that appears on the customer's bank statement

Example:

"Invoice INV-001 refund"

Response

Success

amount
string
required

Refund amount as a decimal string

Example:

"99.00"

created_at
string<date-time>
required

Timestamp when the refund was created

Example:

"2026-04-01T10:00:00Z"

currency
string
required

Currency code

Example:

"USD"

customer_id
string
required

The customer that received the refund

Example:

"cust_01H1VECT"

id
string
required

Unique identifier for the refund

Example:

"re_01H1VECT"

payment_id
string
required

The original payment that was refunded

Example:

"pay_01H1VECT"

status
enum<string>
required

Refund status

Available options:
pending,
succeeded,
failed,
canceled
Example:

"succeeded"

updated_at
string<date-time>
required

Timestamp when the refund was last updated

Example:

"2026-04-01T12:30:00Z"

external_id
string | null

External reference ID from the payment processor

external_url
string | null

Link to view the refund in the payment processor's dashboard

failure_reason
string | null

Reason for failure if status is failed

processor_id
string | null

Payment processor's internal refund ID

reason
string | null

Reason for the refund

Example:

"Customer requested refund"