GladysDevelopers

Refunds

Give back all or part of a captured payment.

curl https://api.joingladys.com/api/v1/payments/pay_…/refunds \
  -H "Authorization: Bearer access_…" \
  -H "Idempotency-Key: order-1042-refund-1" \
  -H "Content-Type: application/json" \
  -d '{ "amount": "500.00", "reason": "One item returned" }'

Prop

Type

{
  "success": true,
  "message": "Refund issued",
  "data": {
    "reference": "ref_…",
    "payment_reference": "pay_…",
    "amount": "500.00",
    "currency": "KES",
    "reason": "One item returned",
    "environment": "TEST",
    "created_at": "2026-10-05T12:30:00Z"
  }
}

Rules

  • Only a CAPTURED payment can be refunded.
  • You can refund in several parts, as long as the total doesn't exceed the payment's amount. The payment's refundable_amount says what's left.
  • A refund is immediate: if the call succeeds, the money is back in the payer's wallet. There is no pending state.
  • The money comes from your business's settlement wallet. If it can't cover the refund, the call fails with 400 and nothing moves.
  • The Gladys fee is not returned on a refund.
  • The payment stays CAPTURED; its refunded_amount and refundable_amount change.

Each refund sends a payment.refunded webhook, with the refund included.

Use a different Idempotency-Key for each refund you mean to make. Reusing one returns the first refund rather than making a second.

Needs the payments:refund scope.

Listing a payment's refunds

GET /payments/{reference}/refunds returns all of them, oldest first.

On this page