Notify Transaction Status

Notify Transaction Status

Use notifications to receive timely status updates for successful payment transactions. Merchant will need to provide a callback URL that can receive requests from ShopeePay notification server during onboarding.

Each callback request will contain a HMAC signature in the request header that should be verified to ensure authenticity of the callback content. This signature is generated using the ShopeePay issued secret key, assigned to the Merchant receiving the callback request.

It is essential for the merchant to validate that payment amount andpayment_reference_id matches the original /qr/create request before considering the payment as successful.

Note: merchants are highly recommended to implement Check Transaction Status endpoint to query the updated status of the transaction.

Common Fields

amountint64

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_snstring

Transaction identifier in ShopeePay system.

payment_methoduint32

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

user_id_hashstring

Unique identifier of the customer making the payment.

merchant_ext_idstring

Unique identifier of the merchant in merchant's system.

store_ext_idstring

Unique identifier of the store in merchant's system.

terminal_idstring

This field is present when there is terminal_id in merchant's MPM or CPM API request

payment_channeluint32

Indicates the source of fund used. Refer to Payment Channels for the respective source of fund.

payment_method_typestring
Indicates the type of payment method used. Refer to Payment Method Type.

Note: This field is present when the product flow is Link & Pay (API-Based).
co_fundingobject

Will return empty if no co-funding involved.Note: This field is currently used in Thailand and Vietnam only.

Additional Fields for Indonesia, Malaysia, Philippines and Singapore

APIFieldTypeDescription
  • CPM
  • MPM
  • Checkout
payment\_reference\_idstringUnique identifier of payment transaction generated by merchant.
  • CPM
  • MPM
  • Checkout
payment\_statusuint32

Successful payment: payment\_status = 1

Refer to Payment Status for the respective payment status.

  • Link & Pay
  • Subscription
reference\_idstring A new field introduced to generalise the notify callback for all types of transactions. This could be either payment\_reference\_id or capture\_reference\_id.
transaction\_typeuint32

A new field introduced to generalise the notify callback for all types of transactions.

Refer to Transaction Types for specific transaction types.

transaction\_statusuint32

A new field introduced to generalise the notify callback for all types of transactions.

Refer to Transaction Status for specific transaction statuses.

Additional Fields for Thailand and Vietnam

APIFieldTypeDescription
  • CPM
  • MPM
  • Checkout
  • Link & Pay
  • Subscription
reference\_idstringA new field introduced to generalise the notify callback for all types of transactions. This could be either payment\_reference\_id or capture\_reference\_id.
transaction\_typeuint32

A new field introduced to generalise the notify callback for all types of transactions.

Refer to Transaction Types for specific transaction types.

transaction\_statusuint32

A new field introduced to generalise the notify callback for all types of transactions.

Refer to Transaction Status for specific transaction statuses.

Response Parameters

  • In Indonesia, Malaysia, the Philippines, and Singapore, merchants are advised to respond with code=0 to acknowledge the notification. ShopeePay will send the notification only once.
  • In Thailand and Vietnam, if a merchant does not respond with code=0, ShopeePay will resend the notification up to 2 times at 5-minute intervals.
errcodeint32Required

Error code to specify the error returned0: success

debug_msgstringOptional

Debug message to provide more information

Sample Callback for MPM, CPM and Checkout Payment Transaction

Sample Callback for Link & Pay or Subscription Payment Transaction