Refund a payment
Returns funds to a customer for a transaction that has already completed successfully.
Refunds can only be issued against captured payments. Confirm the original transaction is
CAPTURED using the payment status endpoint before calling this.
A success response confirms the refund was submitted, not that it has settled. Confirm the final state with the payment status endpoint.
Payzah does not deduplicate refund requests — guard against duplicate submissions on your side.
Authorizations
Your private key, Base64-encoded.
Encode the key before sending it — for example base64_encode($privateKey) in PHP or
Buffer.from(privateKey).toString('base64') in Node.js. Paste the already-encoded
value here when testing from these docs.
Use your test key here. This console only calls the sandbox environment, so a production key will not authenticate.
Body
Merchant Track ID used during the original payment transaction.
"1000"
Payzah Reference Code from the successful payment — the PaymentID from initialization,
or payzahRefrenceCode from the status response.
Note the spelling: the field is refrence_code, not reference_code.
"2021060819283746732378"
Amount to refund. For a full refund, the original transaction amount. For a partial refund, the portion to return. Must not exceed the captured amount.
"70"
1 = Full Refund, 2 = Partial Refund.
1, 2 "1"
Reason for the refund. Stored against the transaction for reconciliation and support.
"This is the message why to refund the amount"
Response
Always returned with HTTP 200. Check the status field — a 200 with status: false
means nothing was refunded.

