API Explanation

Request Type

POST

Request URI

/api/v1/payment/status-query-by-reference

Request

ParameterTypeRequiredSample DataDescription
referenceStringNoPTM3835286374203402The reference number from 3rd party. This can be used for order IDs that generated by merchant.

Request Example:

{
  "reference": "PTM3835286374203402"
}

Response

ParameterTypeSample DataDescription
paymentIdString17043939011796739Payment ID. A unique identifier associated with the payment transaction. This value helps track and manage individual refund requests.
totalAmountString10000Total Transaction Amount. Cent is the unit, “100” means a dollar.
receiptAmountString10000Merchant Receipt Amount. Total amount to be receipted by the merchant in cases when coupons or discounts are applied to the transaction amount. Cent is the unit, “100” means a dollar. This field is optional. May apply for cases related to Coupon Example: totalAmount ie total cost of the transaction is $100 and the customer has a $3 off from a coupon or discount applied and the merchant receipt ie. receiptAmount $97 ie. customer pays $97.
payAmountString10000User Payment Amount. Total amount including the fees/tax the customer agreed to pay the merchant. Cent is the unit, “100” means a dollar. Example: totalAmount ie total cost of the transaction is $100 and the customer has additional fees or tax of $1 applied on the transaction then the customer pays “payAmount” = $101 where the merchant will receive only receiptAmount of $100.
refundAmountString10000Refund Amount. Merchant refund amount being refunded. Cent is the unit, “100” means a dollar. Exists only in refund order queries
paymentStatusStringfully_refunded/partial_refundPayment Status. Please see Payment State Code and Status
stateCodeStringP00004Payment State Code. Please see Payment State Code and Status
tradeTimeStringTransaction Time. The timestamp when the transaction was initiated by the client. Time zone is always calculated/displayed in EST irrespective of the merchant location.
payInfoStringTransaction Additional Information, this only apply for Chinese Wallet Payment transaction.
referenceStringPTM3835286374203402The reference number from 3rd party. This can be used for order IDs that generated by integrate merchant.

Response Example:

{
    "status": "SUCCESS",
    "result": {
        "paymentId": "17042154774331718",
        "totalAmount": "6000",
        "receiptAmount": "6000",
        "payAmount": "6000",
        "refundAmount": "0",
        "paymentStatus": "success",
        "tradeTime": "2023-09-14 16:25:00 EDT",
        "payInfo": "",
        "stateCode": "P00003",
        "reference": "PTM3835286374203402"
    }
}

Payment State Code and Status

State CodePayment StatusDescription
P00001initPayment is initiated
P00002authorisedPayment is authorised
P00003successPayment is successfully captured
P00004fully_refundedPayment is fully refunded
P00005partial_refundedPayment is partially refunded
P00006orderclosedPayment is refused
P00007orderclosedPayment is voided
P00008orderclosedPayment is failed
P00009fully_reversalPayment is fully reversed (EMV transactions only)
P00010orderclosedPayment is expired, (not being captured for a long time)
P00011orderclosedPayment capture is failed
P00012successRefund transaction is successful
P00013initRefund transaction is initiated
P00014failureRefund transaction is failed
P00015initVoid request is initiated
P00016successVoid request is successful
P00017failureVoid request is failed

API Response error code

codemessagedescription
10005Invalid parameterParameter format incorrect
20004Database errorTransaction data induced database error.
20034Other caseAny other errors that not include in the list
90000UnauthorizedThe entered access token is invalid