API Explanation
Request Type
POST
Request URI
/api/v1/payment/status-query
Request
Parameter | Type | Required | Sample Data | Description |
---|---|---|---|---|
paymentId | String | No | 17043939011796739 | Payment ID. Unique identifier for the payment transaction. This value represents the payment transaction ID, essential for tracking, identifying, and processing requests for payments, cancelation, failure, reversal and refunds. |
Request Example:
{
"paymentId": "1678715489187336"
}
Response
Parameter | Type | Sample Data | Description |
---|---|---|---|
paymentId | String | 17043939011796739 | Payment ID. A unique identifier associated with the payment transaction. This value helps track and manage individual refund requests. |
totalAmount | String | 10000 | Total Transaction Amount. Cent is the unit, “100” means a dollar. |
receiptAmount | String | 10000 | Merchant 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. |
payAmount | String | 10000 | User 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. |
refundAmount | String | 10000 | Refund Amount. Merchant refund amount being refunded. Cent is the unit, “100” means a dollar. Exists only in refund order queries |
paymentStatus | String | fully_refunded/partial_refund | Payment Status. Please see Payment State Code and Status |
stateCode | String | P00004 | Payment State Code. Please see Payment State Code and Status |
tradeTime | String | Transaction Time. The timestamp when the transaction was initiated by the client. Time zone is always calculated/displayed in EST irrespective of the merchant location. | |
payInfo | String | Transaction Additional Information, this only apply for Chinese Wallet Payment transaction. |
Response Example:
{
"status": "SUCCESS",
"result": {
"paymentId": "17047520945735529",
"totalAmount": "2260",
"receiptAmount": "2260",
"payAmount": "2260",
"refundAmount": "2260",
"paymentStatus": "fully_refunded",
"tradeTime": "2024-01-08 17:13:59 EST",
"payInfo": "",
"stateCode": "P00004",
"reference": null
}
}
Payment State Code and Status
State Code | Payment Status | Description |
---|---|---|
P00001 | init | Payment is initiated |
P00002 | authorized | Payment is authorized |
P00003 | success | Payment is successfully captured |
P00004 | fully_refunded | Payment is fully refunded |
P00005 | partial_refunded | Payment is partially refunded |
P00006 | orderclosed | Payment is refused |
P00007 | orderclosed | Payment is voided |
P00008 | orderclosed | Payment is failed |
P00009 | fully_reversal | Payment is fully reversed (EMV transactions only) |
P00010 | orderclosed | Payment is expired, (not being captured for a long time) |
P00011 | orderclosed | Payment capture is failed |
P00012 | success | Refund transaction is successful |
P00013 | init | Refund transaction is initiated |
P00014 | failure | Refund transaction is failed |
P00015 | init | Void request is initiated |
P00016 | success | Void request is successful |
P00017 | failure | Void request is failed |
API Response error code
code | message | description |
---|---|---|
10005 | Invalid parameter | Parameter format incorrect |
20004 | Database error | Transaction data induced database error. |
20034 | Other case | Any other errors that not include in the list |
90000 | Unauthorized | The entered access token is invalid |