Check Transaction Status
Check Transaction Status
Use this endpoint to query the status of a transaction across all supported transaction types.
- URL: "/v3/merchant-host/transaction/check"
If Check Transaction Status API returns:
- If the response code is "Success", merchant can mark this transaction as successful.
- If the response code is "Failed", merchant can mark this transaction as failed.
- If the transaction is in a "Processing" status or there is no response, please retry the request at an incremental time range of every 5 seconds (e.g., 5 seconds, 10 seconds, 15 seconds, and so on) up to a maximum of 100 seconds. If there is no response after 100 seconds, please retry the request at an incremental time range of every 5 minutes up to 24 hours.
Request Parameters
Field | Type | Mandatory | Description |
---|---|---|---|
request_id | string | Y | Unique identifier of the request, accepts up to 64 characters. |
reference_id | string | Y | Unique identifier of the transaction merchant would like to query, which could be payment_reference_id, capture_reference_id or refund_reference_id. |
transaction_type | uint32 | Y | Specific Transaction Types that merchant would like to query. |
merchant_ext_id | string | Y | Unique identifier of merchant in merchant system. |
store_ext_id | string | Y | Unique identifier of store in merchant system. |
amount | int64 | Y | This amount must match the original transaction amount. |
Sample API Request
REQUEST
{"request_id": "input-unique-request-id-here","reference_id": "input-payment-reference-id","transaction_type": 13,"merchant_ext_id": "external-merchant","store_ext_id": "external-store","amount": 10000}
Copy
Response Parameters
Field | Type | Description |
---|---|---|
request_id | string | Unique identifier for request. |
errcode | int32 | Error code to specify the error returned. |
debug_msg | string | Debug message to provide more information. |
payment_method | uint32 | Indicates the product flows used. Refer to Point of Initiation for the respective product flows.Note: do not set this as default value for validation |
transaction | object | Will return empty if no such transaction. |
reference_id | string | Unique identifier of transaction generated by merchant. This value should match the reference_id sent in the request, which could be payment_reference_id, capture_reference_id or refund_reference_id. |
amount | int64 | Amount of the transaction, inflated by a factor of 100. A positive integer in the smallest currency unit, with no decimal point.Example:Smallest amount will be 1, which represents 0.01.For currencies that do not have denomination in cents, the smallest amount will be 100, which represents 1 IDR (Rp 1) or 1 VND (₫ 1). |
transaction_sn | string | Transaction serial number of the transaction in ShopeePay system. |
status | uint32 | Refer to Transaction Status for specific transaction statuses. |
transaction_type | uint32 | Refer to Transaction Types Transaction Types for specific transaction types. |
create_time | uint32 | Create time of the transaction. |
update_time | uint32 | Update time of the transaction. |
user_id_hash | string | Identifier for customer that made the payment. |
merchant_ext_id | string | Unique identifier of merchant in merchant system. |
store_ext_id | string | Unique identifier of store in merchant system. |
terminal_id | string | If terminal ID info exists in transaction. |
promo_id_applied | string | promo_id applied to the payment transaction. |
payment_channel | uint32 | Indicates the source of fund used. Refer to Payment Channels for the respective source of fund. |
co_funding | object | Will return empty if no co-funding involved.Note: This field is currently used in Thailand and Vietnam only. |
promotion_ext_name | string | Name of the promotion for merchant’s reference. |
redeemed_promotion_amount | int64 | Amount of the promotion benefit obtained by customer, inflated by a factor of 100. A positive integer in the smallest currency unit, with no decimal point.Note: for refund transaction types, this will be the amount of promotion benefit ShopeePay clawbacks from the customer in that refund transaction.Example:Smallest amount will be 1, which represents 0.01.For currencies that do not have denomination in cents, the smallest amount will be 100, which represents 1 IDR (Rp 1) or 1 VND (₫ 1). |
redeemed_promotion_type | uint32 | Refer to Promotion Types for specific transaction types. |
co_funding_cost_amount | int64 | Amount of cost borne by merchant for the promotion benefit, inflated by a factor of 100. A positive integer in the smallest currency unit, with no decimal point.Note: for refund transaction types, this will be the amount of co-funding amount that the merchant will no longer be charged for due to that refund transaction.Example:Smallest amount will be 1, which represents 0.01.For currencies that do not have denomination in cents, the smallest amount will be 100, which represents 1 IDR (Rp 1) or 1 VND (₫ 1). |
Sample API Response
RESPONSE
{"request_id": "input-unique-request-id-here","errcode": 0,"debug_msg": "success","payment_method": 16,"transaction": {"reference_id": "payment_abc12345","amount": 10000,"transaction_sn": "019703251690639893","status": 3,"transaction_type": 13,"create_time": 1647351920,"update_time": 1647351920,"user_id_hash": "15e455125fba426a4a2bb9145b3af2906813a7f222f6eab93b026ead62dc8d76","merchant_ext_id": "external-merchant","store_ext_id": "external-store","terminal_id": "A88","promo_id_applied": "1234567890, 0987654321","payment_channel": 1}}
Copy
Response Code
Value | Description |
---|---|
-2 | A server dropped the connection |
-1 | A server error occurred |
0 | Success |
1 | The request parameters is invalid or a mandatory parameter is empty |
2 | Permission denied, often due to invalid status |
4 | Not found, often due to merchant/store/user/transaction not found |
5 | Transaction is in processing status |