Refund Transaction

Tip

Restores all or part of the funds from an settled transaction to the cardholder's card. If the transaction is not yet settled, please please refer to Void. Unlike Void, after a Refund there is a record of both the initial charge and the refund on the cardholder's statement.

! Tip

After you receive access credentials (merchant id, login name, merchant key). You can step through the demo Refundopen in new window which may help you when going through the documentation.

Endpoint

https://api.grubpay.io/v4/refund

Method:

POST

Content-Type: application/json;charset=UTF-8

Request
namerequiredtypesampledescription
mchIdyString10000701assigned by GrubPay
loginNameyString(12)jack_chenassigned by merchant,equals to jobNo
refundAmountyInt100in cents
payOrderIdyString
signyString(32)C380BEC2BFD727A4B6845133519F3AD6Sign algorithm
Response
namerequiredtypesampledescription
retCodeyStringSUCCESS or FAIL
retMsgyString
retDatayJSONif retCode is SUCCESS, order detailed info returned

retData contains order information:

namerequiredtypesampledescription
payOrderIdyStringSUCCESS or FAIL
mchIdyString
mchOrderNonString
originalOrderIdnStringoriginal pay order id for refund
amountyInt100in cents
currencyyStringCAD
payTypeyStringpay or refund
statusyInt0,1,2,90 = pending order, 1 = unknown, 2 = success, 9 = fail
recurringIdyIntrecurring payment id this transaction belongs to ( 0 if non-recurring)
paySuccTimeyString2021-04-07 19:44:51
cardNumyString432567******2266
cardTypeyString
expiryDateyString
authNumyString
transNumyString
channelyStringCC_CARD or CC_ACHCC_CARD: card transactions, CC_ACH: ACH transactions
Last Updated:
Contributors: Grant, grant, Grant Yao