Skip to main content
The Refund API lets you return funds to a customer for a transaction that has already completed successfully. You can issue a Full Refund for the entire original amount, or a Partial Refund for any portion of it. Like every other Payzah call, a refund is a single server-side POST request in JSON format.

Before You Begin

A refund request will only succeed when all of the following are true:
  • The original transaction completed successfully — refunds cannot be issued against failed, cancelled, or uncaptured payments
  • You have the trackid you sent during the original payment initialization
  • You have the Payzah Reference Code returned after that payment succeeded
  • For a partial refund, the amount you are refunding is less than or equal to the original transaction amount
If you are not certain the original payment was captured, confirm it first with the Get Payment Details API. A paymentStatus of CAPTURED means the transaction is eligible for a refund.

How Refunds Work

1

Set the Endpoint for Your Environment

Refunds use a dedicated endpoint. Use the test URL while building and switch to production only when your integration is fully validated.Headers
Your private key must never appear in client-side code, front-end JavaScript, or mobile app binaries. Refund requests must always be sent from your backend server.
2

Choose the Refund Type

The refund_type field determines how much is returned to the customer.For a partial refund, the amount must be less than or equal to the original transaction amount.
3

Send the Refund Request

Send a POST request containing the original transaction identifiers, the amount, the refund type, and a message explaining why the refund is being issued.
Note the spelling of refrence_code. The field name is refrence_code, not reference_code.
4

Read the Response

A successful submission returns status: true. Any other value means the refund was not accepted and no funds have been returned.
Success Response
Failure Response
A failure most commonly means the trackid and refrence_code do not match an existing successful transaction. Verify both values against your original payment record before retrying.
Never confirm a refund to your customer based on the HTTP request completing. Check the status field explicitly — a 200 response with status: false means nothing was refunded.
5

Confirm the Transaction State

The success response confirms that your refund request was submitted, not that it has fully settled. Call the Get Payment Details API with the same trackid and payment_id to check the transaction’s current state.
Request Body
Use this call for reconciliation, for customer service enquiries, and before issuing any further refund against the same transaction.

How Long Refunds Take

Submitting a refund is instant. Funds reaching the customer is not — the timing depends on the payment method used for the original transaction.
These windows depend on the customer’s issuing bank, so treat them as typical rather than guaranteed. Weekends and public holidays extend them.
Tell your customers this upfront. “Your refund has been processed and will appear within 14 days” prevents far more support tickets than any amount of after-the-fact explaining — particularly for card refunds, where a customer who expects same-day money will assume something has gone wrong.

What You Will See as a Merchant

The refund moves through two states in your Payzah dashboard: A status of Refund requested does not mean the customer has their money yet — it means Payzah has accepted the instruction. Wait for Refunded before treating the refund as complete in your own records.

Why Settlement Timing Matters

Understanding where the money physically sits explains why some refunds clear faster than others. When a customer pays, the funds are debited from them immediately and held by Payzah. They are settled into your merchant account the next business day.
If you already know an order will be refunded — a cancellation, a failed delivery, an obvious duplicate — process it the same day. Refunding before settlement keeps the money on a single path back to the customer instead of routing it out to you and back again.

Request Field Reference

Best Practices

Always confirm the original transaction is CAPTURED before submitting a refund. Requests against transactions that were voided, cancelled, or never captured will be rejected.
Protect your refund endpoint against double-clicks, retries, and repeated background jobs. Payzah does not deduplicate refund requests for you — track which transactions you have already refunded on your side.
Store the trackid, refrence_code, amount, refund_type, and the complete API response for every refund. These records are essential for reconciliation, chargeback handling, and support enquiries.
The message field is stored against the transaction. Use a clear, specific reason — for example, an order number and cause — rather than a generic placeholder. It makes reconciliation and support investigations considerably faster.

Next Steps

Payment Status

Verify a transaction’s current state before and after issuing a refund.

Response Codes

Full reference for every Payzah error code and payment status value.