For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payment Refund

post

Initiates a refund for a specific transaction identified by the ptxid parameter. This endpoint allows partial or full refunds based on the provided input. Ensure the transaction ID (ptxid) corresponds to a valid transaction and has not been fully refunded previously.

Path parameters
ptxidstringRequired

Parent txid of the transaction

Query parameters
sidintegerRequired

sid of site

hashstringRequired

md5 hash of sid+timestamp+amount+currency+rcode e.g. md5('22'.'1234568995265421'.'17.00'.'USD'.'222b6c')

timestampstringRequired

timestamp value used in the hash e.g. 1234568995265421

amountstringRequired

Specifies the amount to refund for the transaction. This parameter is required and must be a string representing a numeric value (e.g., "50.00"). Use this to process a partial refund by providing a specific amount or the full transaction amount for a complete refund.

currencystringRequired

Transaction currency, ISO 3 letter code (e.g., "USD")

reasonstringOptional

Provides a reason for the refund. This parameter is optional and can include a brief message explaining the refund request (e.g., "Client Requested" or "Merchant Request").

postbackurlstringOptional

url to which a postback should be sent

sendNotificationbooleanOptional

Specifies whether to send a notification email related to the transaction. Set to true to enable email notifications or false to disable them.

Responses
200

Lookup result

application/json
tidstringOptional

tid sent through with the transaction

txidinteger · int64Optional

Transaction id

parent_txidinteger · int64Optional

Each Transaction has a unique id. The parent transaction is the transaction that groups all transaction together.

statusstringOptional

Has the value "OK" for a successful transaction, "EXC" for a failed transaction, "PEND" for a transaction in progress.

tx_actionstringOptional

The state change txaction, e.g. "PAYMENT", "REFUND"

amountnumberOptional

The amount of the transaction

currencystringOptional

The currency of the transaction

referencestringOptional

Merchant reference

ref1stringOptional

your reference 1

ref2stringOptional

your reference 2

ref3stringOptional

your reference 3

ref4stringOptional

your reference 4

vrfystringOptional

This is a sha256 hash so the data can be verified. Generate sha256 hash of the string of sid;rcode;txid;status;amount;currency;txaction

post/{ptxid}/refund
POST /api/v1/index.php/{ptxid}/refund?sid=1&hash=text&timestamp=text&amount=text&currency=text HTTP/1.1
Accept: */*
{
  "tid": "text",
  "txid": 1,
  "parent_txid": 1,
  "status": "text",
  "tx_action": "text",
  "amount": 1,
  "currency": "text",
  "reference": "text",
  "ref1": "text",
  "ref2": "text",
  "ref3": "text",
  "ref4": "text",
  "vrfy": "text"
}

Last updated