ShopeePay is an E-Money payment method by Shopee. Users will be redirected from the merchant app to pay using the Shopee app.

The steps to integrate with ShopeePay are given below.

  1. Send the charge API request to Midtrans.
  2. Open the redirect url in the response to get redirected to Shopee app.
  3. Handle the redirect from Shopee app back to merchant app via shopeepay JSON object or configure via Dashboard > Settings > Payments.
  4. Handle notifications.

Send a Charge API request with the details of the transaction such as payment_type, shopeepay, transaction_details, item_details, and customer_details. Successful request returns a redirect URL.

By default, Shopeepay JumpApp and QRIS's transaction expiry is 5 minutes (min 20s, max 5 days).

ShopeePay Charge API Request

    "payment_type": "shopeepay",
    "transaction_details": {
        "order_id": "test-order-shopeepay-001",
        "gross_amount": 25000
    "item_details": [
            "id": "id1",
            "price": 25000,
            "quantity": 1,
            "name": "Brown sugar boba milk tea"
    "customer_details": {
        "first_name": "John",
        "last_name": "Brandon",
        "email": "[email protected]",
        "phone": "0819323212312"
    "shopeepay": {
        "callback_url": ""
JSON AttributeDescriptionTypeRequired
payment_typeSet ShopeePay payment method. Value: shopeepayStringRequired
transaction_detailsThe details of the specific transaction such as order_id and gross_amount.ObjectRequired
item_detailsDetails of the item(s) purchased by the customer.ObjectRequired
customer_detailsDetails of the customer.ObjectRequired
shopeepayCharge details using ShopeePay.ObjectRequired

ShopeePay Charge Response and Notifications

    "status_code": "201",
    "status_message": "ShopeePay transaction is created",
    "channel_response_code": "0",
    "channel_response_message": "success",
    "transaction_id": "bb379c3a-218b-47c7-9b0b-25f71f0f1231",
    "order_id": "test-order-shopeepay-001",
    "merchant_id": "YON001",
    "gross_amount": "25000.00",
    "currency": "IDR",
    "payment_type": "shopeepay",
    "transaction_time": "2020-09-29 11:16:23",
    "transaction_status": "pending",
    "fraud_status": "accept",
    "actions": [
            "name": "deeplink-redirect",
            "method": "GET",
            "url": ""
  "transaction_time":"2020-09-29 11:16:23",
  "status_message":"midtrans payment notification",
  "transaction_time":"2020-09-29 11:22:38",
  "status_message":"midtrans payment notification",
  "settlement_time":"2020-09-29 11:23:44",
  "shopeepay_reference_number": "103995032913255264",
  "reference_id": "DL-dduIy7XtGtvxJtNNpOfbAt"
  "transaction_time":"2020-09-29 11:24:57",
  "status_message":"midtrans payment notification",
JSON AttributeDescriptionType
status_codeStatus code of transaction charge result.String
status_messageDescription of transaction charge result.String
actionsActions which can be performed with this transaction. Use deeplink-redirect action to redirect to Shopee apps.Array(Object)
channel_response_codeResponse code from payment channel provider.String
channel_response_messageResponse message from payment channel provider.String
transaction_idTransaction ID given by Midtrans.String
order_idOrder ID specified by you.String
gross_amountTotal amount of transaction in IDR.String
payment_typeTransaction payment method.String
transaction_timeTimestamp of transaction in ISO 8601 format. Time Zone: GMT+7.String
transaction_statusStatus of ShopeePay transaction. Possible values are
pending, settlement, expire, deny.
signature_keyCombination of parameters such as order_id, status_code, gross_amount, server_key to verify integrity of payload/response.String
currencyISO-4217 representation of three-letter alphabetic currency code. Value: IDR.
Note: Currently only IDR is supported.
shopeepay_reference_numberReference number given by ShopeePay.String
reference_idReference id given by ShopeePay.String



Possible error codes are 400, 401, 402, 406, 410

Implementing ShopeePay Deeplink Callback

In addition to the standard mobile apps flow, you can implement deeplink callback to redirect customer back from ShopeePay to your app.

To implement it, please set callback_url with the deeplink URL redirecting to your app (look at ShopeePay Charge API Request for sample implementation), or configure it via Dashboard > Settings > Payments in Finish URL.