Direct API

QRIS

Espay Payment Gateway provides QRIS services with QR MPM mode (Merchant Presented Mode), allowing you to display a QR code your customers can scan to make payments.

Before Integration

Make sure you have received the credentials from the Espay team.

Integration Steps

You can use the following steps to integrate with Direct API – QRIS.

1. Display Payment Method

Inquiry Merchant Info is a service that helps find active bank and product codes. This service allows you to customize the user interface (UI) when selecting a payment method. Learn Inquiry Merchant Info

2. Generate Signature Asymmetric

Every request you send will be validated by the Espay Payment Gateway using the signature parameters you have created. Learn how to make a Signature Asymmetric

3. Create Inquiry and Payment Services

You are required to provide a callback that the Espay Payment Gateway can access. Learn more about Inquiry and Payment.

  1. Generate QRIS
Type Value
Service Code
47
Name
QR MPM
HTTP Method
POST

Flow

You send the required parameters to make a request, and Espay Payment Gateway will respond in JSON format.

API URL

Environment URL
Sandbox
Port of HTTPS (443)
https://sandbox-api.espay.id/api/v1.0/qr/qr-mpm-generate
Production
Port of HTTPS (443)
https://api.espay.id/api/v1.0/qr/qr-mpm-generate

Headers

Name Type Mandatory Description
Content-Type
String
Y
Content of your request body.

Example:
application/json
X-TIMESTAMP
String (25)
Y
Customer's current local date and time.

Format:
yyyy-MM-ddThh:mi:ssTZD (ISO 8601)

Example:
2024-03-14T07:49:28+07:00
X-SIGNATURE
String (255)
Y
Code used to validate transactions. Learn Signatures Asymmetric
X-EXTERNAL-ID
String (32)
Y
Numeric String. Reference number that should be unique on the same day.
X-PARTNER-ID
String (50)
Y
Merchant Code from Espay team.

Example:
SGWYESSISHOP
CHANNEL-ID
String (5)
Y
Channel id.

Value:
Espay
Authorization-Customer
String (150)
C
Access Token B2B2C. Espay -> Bank
Y: Yes, O: Optional, C: Conditional

Request Parameters

Parameter Type Mandatory Description
partnerReferenceNo
String (64)
Y
Unique code to identify the order/billing/invoice.

Example:
Transaction number, invoice ID, etc.
merchantId
String (28)
Y
Merchant code from Espay team.

Example:
SGWYESSISHOP
amount
Object
Y
  value
String (16.2)
Y
Paid amount.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
  currency
String (3)
Y
Transaction currency code.

Format:
  • Rupiah: IDR
additionalInfo
Object
Y
  productCode
String (16)
Y
Product code. Click here.
validityPeriod
String(25)
O
Time and expiration date of the transaction.

Format:
yyyy-MM-ddThh:mi:ssTZD (ISO 8601)

Example:
2024-03-14T07:49:28+07:00
Y: Yes, O: Optional, C: Conditional

Response Parameters

Parameter Type Mandatory Description
responseCode
String (7)
Y
Response Code.

Format:
HTTP Code + Service Code + Error Code

Example:
200+47+00 = 2004700
responseMessage
String (150)
Y
Response description.
qrUrl
String (256)
Y
QR URL for download QR Image.
qrContent
String (256)
Y
QR content in String format.
qrImage
Base64
Y
QR image in Base64 format.
additionalInfo
Object
  referenceNo
String (64)
Y
Transaction ID from Espay.
  partnerReferenceNo
String (64)
Y
Unique code to identify the order/billing/invoice.

Example:
Transaction number, invoice ID, etc.
  merchantName
String (64)
Y
Merchant name.
  amount
String (16.2)
Y
Paid amount.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
Y: Yes, O: Optional, C: Conditional
5. After Payment
Espay Payment Gateway provides an optional API that you can use to support other payment needs.

Try It!

You can enter data using the input provided. After that, you submit and see the results!

Request

Value

Response

























































Sample Headers

Content-Type:application/json
X-TIMESTAMP:2024-03-14T07:49:28+07:00
X-SIGNATURE:SHwb9RwkUyxTV8uLv1MoGShUgZi1Of35GtB9GVmouSt2r8ePf/7Sy3zBuuBaUOhMcWJnojFtOuRhVR64uAES8H8R91kvAhW29l3QU9WO3LFDSp4PI8vwQVeHXOXlnNZa+HLXP8iYqnXRCIsoSTPTRQiBzpjQaUB1nGtEBEnDCMhRG7ijnMRtJQGiWUq2uT2Kfs23i64F8A2sVTojgnB4oPFMaeGuy0vhmtQqKAezBlKI9xhRAQz8cVHo1qcNNtakQjuWI/S0065lL0bDuY7SBY6iMTFzfGZkaxt8pzNLHbs4SbyjvzZnXt8of0ZUwEQxrMg5CLeACE8Tp7cyrgQ93w==
X-EXTERNAL-ID:d41e58d9-0e1d-4632-a9c1-df0eea578c0c
X-PARTNER-ID:SGWDIGALLERY
CHANNEL-ID:ESPAY
             





























Sample Request

{
  "partnerReferenceNo": "DIGSNAP000033",
  "merchantId": "SGWDIGALLERY",
  "amount": {
      "value": "10001.00",
      "currency": "IDR"
  },
  "additionalInfo": {
      "productCode": "SALDOMUQR"
  },
  "validityPeriod": "2024-03-20T07:44:11+07:00"
}
             






























Sample Positive Response

{
    "responseCode": "2004700",
    "responseMessage": "Successful",
    "qrUrl": "https://sandbox-api.espay.id/rest/digitalnotify/qr/?trx_id=ESP1710414240U8GO",
    "qrContent": "00020101021226710019ID.CO.CIMBNIAGA.WWW01189360002200006573970",
    "qrImage": "data:image/png;base64,",
    "additionalInfo": {
      "referenceNo": "ESP1710414240U8GO",
      "partnerReferenceNo": "DIGSNAP000033",
      "amount": "890000"
  }
}
              


Sample Negative Response

    
{
  "responseCode": "4094700",
  "responseMessage": "Duplicate X-EXTERNAL-ID"
}

              


CURL

curl --location 'https://sandbox-api.espay.id/api/v1.0/qr/qr-mpm-generate' \
--header 'X-TIMESTAMP: 2024-03-14T07:49:28+07:00' \
--header 'X-SIGNATURE: SHwb9RwkUyxTV8uLv1MoGShUgZi1Of35GtB9GVmouSt2r8ePf/7Sy3zBuuBaUOhMcWJnojFtOuRhVR64uAES8H8R91kvAhW29l3QU9WO3LFDSp4PI8vwQVeHXOXlnNZa+HLXP8iYqnXRCIsoSTPTRQiBzpjQaUB1nGtEBEnDCMhRG7ijnMRtJQGiWUq2uT2Kfs23i64F8A2sVTojgnB4oPFMaeGuy0vhmtQqKAezBlKI9xhRAQz8cVHo1qcNNtakQjuWI/S0065lL0bDuY7SBY6iMTFzfGZkaxt8pzNLHbs4SbyjvzZnXt8of0ZUwEQxrMg5CLeACE8Tp7cyrgQ93w==' \
--header 'X-EXTERNAL-ID: d41e58d9-0e1d-4632-a9c1-df0eea578c0c' \
--header 'X-PARTNER-ID: SGWDIGALLERY' \
--header 'CHANNEL-ID: ESPAY' \
--header 'Content-Type: application/json' \
--data '{
  "partnerReferenceNo": "DIGSNAP000033",
  "merchantId": "SGWDIGALLERY",
  "amount": {
      "value": "10001.00",
      "currency": "IDR"
  },
  "additionalInfo": {
      "productCode": "SALDOMUQR"
  },
  "validityPeriod": "2024-03-20T07:44:11+07:00"
}'

           





Scroll to Top