QRIS

QRIS is a QR payment standard in Indonesia, developed by Bank Indonesia (BI). Users can scan and pay the QR from any payment providers registered as the issuer here.

For QRIS, we are currently integrated with the acquirers given below.

  1. GoPay
  2. AirPay Shopee (ShopeePay)

The steps to integrate with QRIS are given below.

  1. Send the charge API request to Midtrans with the selected acquirer.
  2. Show the rendered QR string to the users.
  3. Handle notifications.

Send a Charge API request with the details of the transaction such as payment_type, qris, transaction_details, item_details, and customer_details. Successful request returns a QR code image URL.




QRIS Charge API Request


{
  "payment_type": "qris",
  "transaction_details": {
    "order_id": "order03",
    "gross_amount": 275000
  },
  "item_details": [
    {
      "id": "id1",
      "price": 275000,
      "quantity": 1,
      "name": "Bluedio H+ Turbine Headphone with Bluetooth 4.1 -"
    }
  ],
  "customer_details": {
    "first_name": "Budi",
    "last_name": "Utomo",
    "email": "[email protected]",
    "phone": "081223323423"
  },
  "qris": {
    "acquirer": "gopay"
  }
}
JSON AttributeDescriptionTypeRequired
payment_typeSet QRIS payment method. Value: qrisStringRequired
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.ObjectOptional
customer_detailsDetails of the customer.ObjectOptional
qrisCharge details using QRIS.ObjectOptional



QRIS Charge Response and Notifications


{
    "status_code": "201",
    "status_message": "QRIS transaction is created",
    "transaction_id": "0d8178e1-c6c7-4ab4-81a6-893be9d924ab",
    "order_id": "order03",
    "merchant_id": "M099098",
    "gross_amount": "275000.00",
    "currency": "IDR",
    "payment_type": "qris",
    "transaction_time": "2020-09-29 11:46:13",
    "transaction_status": "pending",
    "fraud_status": "accept",
    "acquirer": "gopay",
    "actions": [
        {
            "name": "generate-qr-code",
            "method": "GET",
            "url": "https://api.midtrans.com/v2/qris/0d8178e1-c6c7-4ab4-81a6-893be9d924ab/qr-code"
        }
    ]
}
{
  "transaction_time":"2020-09-29 11:18:06",
  "transaction_status":"pending",
  "transaction_id":"ce0a3584-5a0c-4049-ad88-5590a96be4fe",
  "status_message":"midtrans payment notification",
  "status_code":"201",
"signature_key":"b1798748303cf0817733c1e312d630793b84d8125a96af0cb7251f8266d5c5256285084ba3ffbfae1f264a031d41927124fba0b552f249ee68180e9c7566448e",
  "payment_type":"qris",
  "order_id":"order03",
  "merchant_id":"M099098",
  "gross_amount":"275000.00",
  "fraud_status":"accept",
  "currency":"IDR",
  "acquirer":"gopay"
}
{
  "transaction_type":"on-us",
  "transaction_time":"2020-09-29 11:27:33",
  "transaction_status":"settlement",
  "transaction_id":"9f07920a-6145-4d1e-9fc2-66e6fd6bc6fc",
  "status_message":"midtrans payment notification",
  "status_code":"200",
"signature_key":"155b03b554092326ad9d2ed936f5765fe759b6bc491c0161a26e4340978fb6e8f07683bf012552a9498bfc919abab834aade57eda01f7a18a3490a515cf17632",
  "settlement_time":"2020-09-29 11:30:44",
  "payment_type":"qris",
  "order_id":"order03",
  "merchant_id":"M099098",
  "issuer":"gopay",
  "gross_amount":"275000.00",
  "fraud_status":"accept",
  "currency":"IDR",
  "acquirer":"gopay",
  "shopeepay_reference_number": "144854469038383602",
  "reference_id": "QR-ZbbffKucJPEksDmXMFChZa"
}
{
  "transaction_time":"2020-09-29 11:31:39",
  "transaction_status":"expire",
  "transaction_id":"9728e0fd-a49c-4c25-8c88-404ef1c45e0e",
  "status_message":"midtrans payment notification",
  "status_code":"202",
"signature_key":"4580d8fc6c4a8dca3319efc1f629b8b33e923ec62b2e6ad7254ed6230ef0e57977b2f6124ba8f2a7a71c53ac7368f3f795ffbdecac3b5cf23e82f1ca5440ad1a",
  "payment_type":"qris",
  "order_id":"order03",
  "merchant_id":"M099098",
  "gross_amount":"275000.00",
  "fraud_status":"accept",
  "currency":"IDR",
  "acquirer":"gopay"
}
JSON AttributeDescriptionType
status_codeStatus code of transaction charge result.String
status_messageDescription of transaction charge result.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 QRIS transaction. Possible values are
pending, settlement, expire, deny.
String
transaction_typeTo determine how the transaction is being acquired. Possible values are on-us or off-us.String
issuerThe provider that is making the payment over the QR.String
actionsActions which can be performed with this transaction. Use generate-qr-code action to render the QR code image (PNG format).Array(Object)
acquirerThe provider creating the QR and accepting the payment. The value is the same as the one set in the charge request.String
merchant_idMerchant ID given by Midtrans.String
currencyISO-4217 representation of three-letter alphabetic currency code. Value: IDR.
Note: Currently only IDR is supported.
String
signature_keyCombination of parameters such as order_id, status_code, gross_amount, server_key to verify integrity of payload/response.String
shopeepay_reference_numberReference number given by ShopeePay. Only available for acquirer airpay shopeeString
reference_idReference id given by payment provider. Only available for acquirer airpay shopeeString

📘

Note

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

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!