API Explanation

Request Type

POST

Request URI

/api/v1/payment/local-card/refund

Request

ParameterTypeRequiredSample dataDescription
oriPaymentIdStringYes4000620000000007Original Payment ID. Unique identifier for the payment transaction. This value represents the original payment transaction ID, essential for tracking and processing refund requests.
refundAmountStringYes10000Refund amount requested by the merchant to be refunded/processed. Cent is the unit, “100” means a dollar

Request Example:

{
  "oriPaymentId": "1694723098440266",
  "refundAmount": 5000
}

Response

ParameterTypeSample dataDescription
refundIdStringREF17044844361839544The refund transaction ID. A unique identifier associated with the refund transaction. This value helps track and manage individual refund requests.
refundAmountString10000Refund amount. The requested refund amount being refunded. Cent is the unit, “100” means a dollar.
refundStatusStringprocessingRefund status indicates the current status of the refund: 1) init : Refund initiated; 2) success: Refund Success; 3) failure: Refund Failed
tradeTimeStringrefund timeRefund time. The timestamp when the refund was initiated by the client. Time zone is always calculated/displayed in EST irrespective of the merchant location
exchangeRateStringexchange reateThe exchange rate used for currency conversion. Exchange rate is not applicable for local card payment. The exchange rate is applied only for Chinese Wallet Payment refund transaction.

Response Example:

{
  "status": "SUCCESS",
  "result": {
    "refundId": "REF187814130359",
    "refundAmount": "10",
    "refundStatus": "success",
    "tradeTime": "2003-09-30 12:00:04",
    "exchangeRate": ""
  }
}

API Response error code

codemessagedescription
10005Invalid parameterParameter format incorrect
10200Gateway errorOTT gateway’s error response.
20004Database errorTransaction data induced database error.
20007Insufficient balance1) Card balance is insufficient to cover the payment, or 2) not enough funds for refund
20008Unsupported cardThe card type was not recognized, or The card was removed too quickly and the approval process was interrupted POS terminal was unable to encrypt the message and process the transaction
20014Refund amount greater than the amount paidThe requested Refund amount exceeds the original/remaining transaction amount.
20019Original payment not existOriginal transaction/payment ID you provided cannot be found
20021Original payment does not support revocationRefund a non-captured transaction
20034Other caseAny other errors that not include in the list
20041The payment cannot be refundedThe payment has been fully refunded, it cannot be refunded any more.
50001FailurePayment Failed
50002TimeoutYour request has been declined due to a timeout OR The authorization message is approved. The error occurs if: 1) the transaction was declined by the card afterwards, or 2) timeout on the terminal. As a result, the transaction is reversed.
50003System errorNo response received for the sent request
90000UnauthorizedThe entered access token is invalid