Void Transaction
Tip
Void cancels a transaction that has NOT been settled yet. If the transaction is already settled, please please refer to Refund. Unlike Refund, after voiding a transaction there is neither record of the initial charge nor the void on the cardholder's statement.
! Tip
After you receive access credentials (merchant id, login name, merchant key). You can step through the demo Void which may help you when going through the documentation.
Endpoint
https://api.grubpay.io/v4/void
Method:
POST
Header
Content-Type: application/json;charset=UTF-8
Request
name | required | type | sample | description |
---|---|---|---|---|
mchId | y | String | 10000701 | assigned by GrubPay |
loginName | y | String(12) | jack_chen | assigned by merchant,equals to jobNo |
payOrderId | y | String | ||
sign | y | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Sign algorithm |
Response
name | required | type | sample | description |
---|---|---|---|---|
retCode | y | String | SUCCESS or FAIL | |
retMsg | y | String | ||
retData | y | JSON | if retCode is SUCCESS, order detailed info returned |
retData contains order information:
name | required | type | sample | description |
---|---|---|---|---|
payOrderId | y | String | SUCCESS or FAIL | |
mchId | y | String | ||
mchOrderNo | n | String | ||
originalOrderId | n | String | original pay order id for refund | |
amount | y | Int | 100 | in cents |
currency | y | String | CAD | |
payType | y | String | pay or refund | |
status | y | Int | 0,1,2,9 | 0 = pending order, 1 = unknown, 2 = success, 9 = fail |
recurringId | y | Int | recurring payment id this transaction belongs to ( 0 if non-recurring) | |
paySuccTime | y | String | 2021-04-07 19:44:51 | |
cardNum | y | String | 432567******2266 | |
cardType | y | String | ||
expiryDate | y | String | ||
authNum | y | String | ||
transNum | y | String | ||
channel | y | String | CC_CARD or CC_ACH | CC_CARD: card transactions, CC_ACH: ACH transactions |