Refund Process via API
To process a transaction refund using txshield, send parameters with HTTPS POST to https://office.paywiser.com/api/v1/index.php/{ptxid}/refund
HTTP Request
POST https://office.paywiser.com/api/v1/index.php/{ptxid}/refund
Refund Parameters
Parameter | Required | Description |
---|---|---|
ptxid | Yes | Parent transaction id |
sid | Yes | Site id (unique identifier for the web site) |
hash | Yes | md5 hash of sid+timestamp+amount+currency+rcode ie: md5('22'.'1234568995265421'.'17.00'.'CNY'.'222b6c') |
postback_url | Yes | The URL of the page used to receive the TxHandler postback. The response can be read from $_POST array. |
timestamp | Yes | Format: hhmmss, same value that is used to generate hash |
currency | Yes | Refund amount currency |
amount | Yes | Refund amount with 2 decimals |
tx_action | Yes | Value is REFUND |
Instant Response
Parameter | DataType | Description |
---|---|---|
status | String |
EXC – Refund Request failed PEND – Refund Request Pending Approval |
txid | String | The transaction ID |
error | - | If an error has occurred, then the status value will equal "EXC" and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. |
error_type | String | error_type |
error_sys | String | The system that caused the error (client or server) |
error_msg | String | Refund Submitted |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | error_code |
comment | String |
Status OK - Refund Submitted Status EXC – Reason of Failure |
Postback Response
Parameter | Required | Description |
---|---|---|
sid | String | Has the sid where transaction was processed |
status | String | Has the value "OK" for a successful transaction, or "EXC" for a failed transaction. |
parent_txid | String | Parent transaction id |
txid | String | The transaction ID |
tx_action | String | Tx_action = REFUND |
amount | String | The amount processed. |
currency | String | The currency in which the transaction was processed |
comment | String | Response from the gateway |
descriptor | String | Gateway descriptor name |
tid | String | From the original transaction |
error | - | If an error has occurred, then the status value will equal "EXC" and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. |
error_type | String | error_type |
error_sys | String | The system that caused the error (client or server) |
error_msg | String | The error message |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | error_code |
vry | String | $sid;$rcode;$txid;$status;$amount;$currency;$txaction |