Skip to main content
POST
/
payments
/
{payment_id}
/
refunds
Create a refund for a payment
curl --request POST \
  --url https://api.withacclaim.com/v1/payments/{payment_id}/refunds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 50000,
  "reason": "Customer request",
  "metadata": {
    "custom_field": "value",
    "source": "api"
  }
}
'
{
  "id": "rf_AbC123XyZ",
  "payment_id": "pay_Def456UvW",
  "status": "Processing",
  "amount": 50000,
  "currency": "USD",
  "reason": "Customer request",
  "external_id": "ref_processor_123",
  "external_status": "pending",
  "metadata": {
    "custom_field": "value",
    "source": "api"
  },
  "created_at": "2025-10-08T18:20:31Z",
  "updated_at": "2025-10-08T18:25:00Z"
}

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

Optional metadata as key-value pairs

Example:
{ "custom_field": "value", "source": "api" }

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"

external_id
string | null

External ID from the payment processor

Example:

"ref_processor_123"

external_status
string | null

External status from the payment processor

Example:

"pending"

metadata
object

Optional metadata as key-value pairs

Example:
{ "custom_field": "value", "source": "api" }
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 April 14, 2026