Skip to content
Authorization<token>

Use a public key (pk./pk_test.) for payment initialization. Use a secret key (sk./sk_test.) for sensitive operations (transfers, refunds, balance), or a restricted key (rk./rk_test.) scoped to specific permissions. The _test. variant of any key selects the sandbox environment — there is no separate sandbox URL. Never expose your secret key in client-side code.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

payment*string
amount?number | null

Must be at least 0.01.

currency?string | null

Must be 3 characters.

reason*string
reference?string | null

Must not be greater than 255 characters.

metadata?object | null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/refunds" \  -H "Content-Type: application/json" \  -d '{    "payment": "architecto",    "reason": "architecto"  }'
POST
/refunds
{
  "code": 200,
  "status": "OK",
  "message": "Refund initiated",
  "refund": {
    "id": "ref_01JXXX",
    "amount": 5000,
    "currency": "XAF",
    "status": "pending",
    "reason": "customer_request",
    "payment": "trx_01JXXX",
    "created_at": "2026-01-15T12:00:00Z"
  }
}
{
  "code": 401,
  "status": "Unauthorized",
  "message": "Invalid API credentials"
}
{
  "code": 406,
  "status": "Not Acceptable",
  "message": "Private Key Required"
}
{
  "code": 422,
  "status": "Unprocessable Content",
  "errors": {
    "payment": [
      "Payment not found or cannot be refunded."
    ]
  }
}
{
  "code": 429,
  "status": "Too Many Requests"
}