Payment Void
The Payment Void request is acceptable with HTTPS POST method only.
*Note, Only allow void for same day transaction
Staging URL: https://stagingpayment.share-commerce.com/Payment/Void
Production URL: https://payment.share-commerce.com/Payment/Void
Request
Merchant need to pass in the following for Payment Void transaction.
| Field Name | Data Type (Len) | M/O | Description |
|---|---|---|---|
| MerchantID | String (50) | M | Unique merchant ID assigned to each merchant by Share Commerce |
| MerchantOrderNo | String (50) | M | MerchantOrderNo upon submission on payment transaction |
| TxnRefNo | String (50) | M | Unique reference of a transaction, generated by system |
| VoidRemarks | String (150) | M | Void Remarks |
| Http Header | Data Type (Len) | M/O | Description |
|---|---|---|---|
| SCSign | M | Message sign (Refer to below SCSign Calculation section) |
*Note, field SCSign have to put in Http Header.
Request Sample
{
"MerchantID": "MID0001",
"MerchantOrderNo": "POST0001",
"TxnRefNo": "8712893729013",
"VoidRemarks": "Void Transaction"
}
SCSign Calculation (Request)
For Payment Void, SCSign generation will based on the raw request send, and calculate with HMACSHA256. And SCSign value have to be capture at Http Header.
Secret Key : mSuE3Ttn5B8vJhe5ncMutMLV
Raw Request
{"MerchantID":"MID0001","MerchantOrderNo":"POST0001","TxnRefNo":"8712893729013","VoidRemarks":"Void Transaction"}
SCSign (Request) : db4ae5622955a907f3ed8e44949c668becf4a4c79f335a6849082bbe75ca62a0
Response
Merchant Server shall examine field RespCode to determine the actual processing response of the request.
| Field Name | Data Type (Len) | M/O | Description |
|---|---|---|---|
| RespCode | String (50) | M | Payment response code. (Refer to Appendix 1 - Response code) |
| RespMessage | String (2000) | M | Result description of void payment transaction. |
| MerchantOrderNo | String (50) | M | MerchantOrderNo upon submission on payment transaction |
| TxnRefNo | String (50) | M | Unique reference of a transaction, generated by system. |
| VoidAmount | Decimal (18,2) | M | Exact sale transaction void amount |
| VoidRemarks | String (150) | M | Void Remarks |
Response Sample
{
"RespCode": "00",
"RespMessage": "FULL_REFUNDED",
"MerchantOrderNo": "POST0001",
"TxnRefNo": "8712893729013",
"VoidAmount": 1.50,
"VoidRemarks": "Void Txn"
}