API Explanation

Request Type

POST

Request URI

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

Request

Parameter Type Required Sample data Description
oriPaymentId String Yes 4000620000000007 Original Payment ID. Unique identifier for the payment transaction. This value represents the original payment transaction ID, essential for tracking and processing refund requests.
refundAmount String Yes 10000 Refund amount requested by the merchant to be refunded/processed. Cent is the unit, “100” means a dollar

Request Example:

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

Response

Parameter Type Sample data Description
refundId String REF17044844361839544 The refund transaction ID. A unique identifier associated with the refund transaction. This value helps track and manage individual refund requests.
refundAmount String 10000 Refund amount. The requested refund amount being refunded. Cent is the unit, “100” means a dollar.
refundStatus String processing Refund status indicates the current status of the refund: 1) init : Refund initiated; 2) success: Refund Success; 3) failure: Refund Failed
tradeTime String refund time Refund time. The timestamp when the refund was initiated by the client. Time zone is always calculated/displayed in EST irrespective of the merchant location
exchangeRate String exchange reate The 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

code message description
10005 Invalid parameter Parameter format incorrect
10200 Gateway error OTT gateway’s error response.
20004 Database error Transaction data induced database error.
20007 Insufficient balance 1) Card balance is insufficient to cover the payment, or 2) not enough funds for refund
20008 Unsupported card The 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
20014 Refund amount greater than the amount paid The requested Refund amount exceeds the original/remaining transaction amount.
20019 Original payment not exist Original transaction/payment ID you provided cannot be found
20021 Original payment does not support revocation Refund a non-captured transaction
20034 Other case Any other errors that not include in the list
20041 The payment cannot be refunded The payment has been fully refunded, it cannot be refunded any more.
50001 Failure Payment Failed
50002 Timeout Your 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.
50003 System error No response received for the sent request
90000 Unauthorized The entered access token is invalid