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

FieldTypeMandatoryDescription
request_idstringYUnique identifier of the request, accepts up to 64 characters.
reference_idstringYUnique identifier of the transaction merchant would like to query, which could be payment_reference_id, capture_reference_id or refund_reference_id.
transaction_typeuint32YSpecific Transaction Types that merchant would like to query.
merchant_ext_idstringYUnique identifier of merchant in merchant system.
store_ext_idstringYUnique identifier of store in merchant system.
amountint64YThis 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
}
arrow-svg

Copy

Response Parameters

FieldTypeDescription
request_idstringUnique identifier for request.
errcodeint32Error code to specify the error returned.
debug_msgstringDebug message to provide more information.
payment_methoduint32Indicates the product flows used. Refer to Point of Initiation for the respective product flows.Note: do not set this as default value for validation
transactionobjectWill return empty if no such transaction.
reference_idstringUnique 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.
amountint64Amount 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_snstringTransaction serial number of the transaction in ShopeePay system.
statusuint32Refer to Transaction Status for specific transaction statuses.
transaction_typeuint32Refer to Transaction Types Transaction Types for specific transaction types.
create_timeuint32Create time of the transaction.
update_timeuint32Update time of the transaction.
user_id_hashstringIdentifier for customer that made the payment.
merchant_ext_idstringUnique identifier of merchant in merchant system.
store_ext_idstringUnique identifier of store in merchant system.
terminal_idstringIf terminal ID info exists in transaction.
promo_id_appliedstringpromo_id applied to the payment transaction.
payment_channeluint32Indicates the source of fund used. Refer to Payment Channels for the respective source of fund.
co_fundingobjectWill return empty if no co-funding involved.Note: This field is currently used in Thailand and Vietnam only.
promotion_ext_namestringName of the promotion for merchant’s reference.
redeemed_promotion_amountint64Amount 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_typeuint32Refer to Promotion Types for specific transaction types.
co_funding_cost_amountint64Amount 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
}
}
arrow-svg

Copy

Response Code

ValueDescription
-2A server dropped the connection
-1A server error occurred
0Success
1The request parameters is invalid or a mandatory parameter is empty
2Permission denied, often due to invalid status
4Not found, often due to merchant/store/user/transaction not found
5Transaction is in processing status