Skip to main content
POST
/
v1
/
payments
/
{payment_id}
/
refund
Refund payment
curl --request POST \
  --url https://api.adullam.dev/v1/payments/{payment_id}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "amount": 5000,
  "reason": "customer_request",
  "description": "Customer requested refund"
}
'
{
  "id": "refund_xyz789",
  "payment_id": "pay_abc123",
  "status": "pending",
  "amount": 5000,
  "currency": "XOF",
  "reason": "customer_request",
  "description": "Customer requested refund",
  "ussd_reference": null,
  "created_at": "2024-01-15T11:00:00Z",
  "completed_at": null,
  "failure_reason": null
}

Refund Payment

Refunding a payment allows you to return funds to the payer for a specific transaction. Use the Refund Payment API to initiate a refund, specifying the payment ID and refund amount.

Authorizations

Authorization
string
header
required

Use the access token obtained from /v1/auth/token

Headers

Idempotency-Key
string<uuid>
required

UUID for idempotent requests

Path Parameters

payment_id
string
required

Payment ID

Body

application/json
amount
integer

Amount to refund (optional, full refund if not specified)

Required range: x >= 100
Example:

5000

reason
enum<string>
Available options:
customer_request,
fraud,
duplicate,
error,
other
Example:

"customer_request"

description
string
Maximum string length: 200
Example:

"Customer requested refund"

Response

Refund created

id
string
Example:

"refund_xyz789"

payment_id
string
Example:

"pay_abc123"

status
enum<string>
Available options:
pending,
processing,
completed,
failed
Example:

"pending"

amount
integer
Example:

5000

currency
string
Example:

"XOF"

reason
enum<string>
Available options:
customer_request,
fraud,
duplicate,
error,
other
Example:

"customer_request"

description
string
Example:

"Customer requested refund"

ussd_reference
string | null
Example:

null

created_at
string<date-time>
Example:

"2024-01-15T11:00:00Z"

completed_at
string<date-time> | null
Example:

null

failure_reason
string | null
Example:

null