Skip to main content
POST
Refund a payment

Authorizations

Authorization
string
header
required

Your API key: sk_live_… / sk_test_… (secret), pk_live_… / pk_test_… (publishable, read-only reference data) or rk_live_… / rk_test_… (payments only).

Headers

Idempotency-Key
string
required

A new value for every new request (a UUID is ideal), up to 64 characters. If your request times out, send it again with the same key. The same key for a different request returns 422 idempotency_key_reused.

Maximum string length: 64
Example:

"3c9a7e1f2b6d4a8e9f0c1b2a3d4e5f60"

Path Parameters

reference
string
required

The payment's reference.

Body

application/json
amount
number

Amount to refund in MWK. Leave out to refund everything still refundable.

Example:

5000

reason
string

Why you are refunding.

Example:

"Order cancelled"

Response

The refund.

reference
string
Example:

"RFD-6b1f3c0e9d2a4e7f8c5b1a2d3e4f6a7b"

payment
string

The refunded payment.

status
enum<string>
Available options:
processing,
success,
failed
amount
number
Example:

5000

currency
string
Example:

"MWK"

reason
string
Example:

"Order cancelled"

providerReference
string | null
failureCode
string | null
createdAt
string<date-time>
completedAt
string<date-time> | null