Skip to main content
POST

Authorizations

Authorization
string
header
required

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

application/json
trackid
string
required

Merchant Track ID used during the original payment transaction.

Example:

"1000"

refrence_code
string
required

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.

Example:

"2021060819283746732378"

amount
string
required

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.

Example:

"70"

refund_type
enum<string>
required

1 = Full Refund, 2 = Partial Refund.

Available options:
1,
2
Example:

"1"

message
string
required

Reason for the refund. Stored against the transaction for reconciliation and support.

Example:

"This is the message why to refund the amount"

Response

200 - application/json

Always returned with HTTP 200. Check the status field — a 200 with status: false means nothing was refunded.

status
boolean

true when the refund request was submitted successfully.

Example:

true

message
string
Example:

"Refund request is submited successfully"

code
integer
Example:

10012