Payment Method: QRIS

📘

Both GoPay QRIS and ShopeePay QRIS are available on SNAP-based flow.

In QRIS flows, merchant will receive QRIS code which can be paid by users. Users can scan the QRIS code using e-wallet app that already is QRIS compatible, such as GoPay, ShopeePay, etc.

This section will explain how merchants can initiate GoPay QRIS transactions using SNAP-based CoreAPI specification.


Creating GoPay/ShopeePay QRIS transaction


Path/{version}/qr/qr-mpm-generate
HTTP MethodPOST
Versionv1.0
SNAP Service Code47

Request Header

Field NameField TypeMandatoryField Description
Content-typeStringMMedia type of the resource, i.e. application/json
X-TIMESTAMPStringMClient’s current local time in ISO-8601 format
X-SIGNATUREStringMCreated using symmetric signature HMAC_SHA512 algorithm
AuthorizationStringMRepresents access_token of a request; string starts with keyword “Bearer ” followed by access_token. Can get this token from Access Token B2B response.
X-PARTNER-IDStringMUnique identifier for caller (client_id)
X-EXTERNAL-IDStringMAlphanumeric string. We suggest merchant to use UUID format. The value should be unique.
In case of timeout, merchant can do:
1. Use this value in get status API to get status transaction
The value should also be the same as request_body.partnerReferenceNo
CHANNEL-IDStringMMandatory field from Bank Indonesia that can take any value with correct format 5 digits numeric string
Content-type:application/json
X-TIMESTAMP:2024-03-19T14:30:00+07:00
X-SIGNATURE:da1fa417c72d6b91c257e01e54fac824
Authorization:Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CupvIJbU1Mmu4a11MNDZ7Sg5u9a
X-PARTNER-ID:BMRI
X-EXTERNAL-ID:12345678901234567890
CHANNEL-ID:12345

Request Body

Field NameField TypeMandatoryField Description
partnerReferenceNoString(36)OAlphanumeric string. Preferably UUID. Reference number that should be unique across 3 months. This value should be filled with the same value as X-EXTERNAL-ID
amountObjectOAmount object
amount.valueString(16,2)MTransaction amount
amount.currencyString(3)MTransaction currency
merchantIdString(64)OMerchant identifier that is unique per each merchant
validityPeriodString(25)OThe time when the QRIS will automatically expire.
The time when the payment will be automatically expired. The format is defined by ISO 8601.
(Maximum value : 180 days from trx time, Minimum value : 20 second, default value : 15 min)
additionalInfoObjectOAdditional information
additionalInfo.acquirerStringOAcquirer name, possible value for now: GOPAY, AIRPAY SHOPEE. If not given, default value is GOPAY
{
  "partnerReferenceNo": "2020102900000000000001",
  "amount": {
    "value": "12345678.00",
    "currency": "IDR"
  },
  "merchantId": "00007100010926",
  "validityPeriod": "2009-07-03T12:08:56-07:00",
  "additionalInfo": {
    "acquirer": "gopay"
  }
}

Response Header

Field NameField TypeMandatoryField Description
Content-typeStringMMedia type of the resource, i.e. application/json
X-TIMESTAMPStringMClient’s current local time in ISO-8601 format
Content-type:application/json
X-TIMESTAMP:2024-03-19T14:30:00+07:00

Response Body

Field NameField TypeMandatoryField Description
responseCodeString (7)MResponse Code (HTTP status code + service code + case code)
responseMessageString (150)MDescription of charge result response.
referenceNoString (64)OTransaction identifier on service provider system.
partnerReferenceNoString (36)OpartnerReferenceNo from the request body
qrContentString(512)MQR String MPM.
qrUrlString(256)MQR URL for download QR Image
qrImageStringMbase64 from image QRIS.
Max length is unlimited.
additionalInfoObjectOAdditional information
additionalInfo.acquirerObjectOAcquirer chosen from request
{
  "responseCode": "2004700",
  "responseMessage": "Request has been processed successfully",
  "referenceNo": "2020102977770000000009",
  "partnerReferenceNo": "2020102900000000000001",
  "qrContent": "xxxxxxxxxxxxxxxx",
  "qrUrl": "https: //qrurl?img=12345",
  "qrImage": "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCAuLi4=",
  "additionalInfo": {
    "acquirer": "gopay"
  }
}

List of Response code

Response CodeHTTP StatusDescription
2004700200Successful
2024700202Transaction still on process
4004700400General request failed error, including message parsing failed.
4004701400Invalid format
4004702400Missing or invalid format on mandatory field
4014700401General unauthorized error (No Interface Def, API is Invalid, Oauth Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown Client, Key not Found)
4014701401Token found in request is invalid (Access Token Not Exist, Access Token Expiry)
4014703401Token not found in the system. This occurs on any API that requires token as input parameter
4034700403Transaction expired
4034701403This merchant is not allowed to call Direct Debit APIs
4034702403Exceeds Transaction Amount Limit
4034703403Suspected Fraud
4034704403Too many request, Exceeds Transaction Frequency Limit
4034705403Account or User status is abnormal
4034709403The account is dormant
4034715403Transaction Not Permitted
4034716403Suspend Transaction
4034718403Indicates inactive account
4034719403Merchant is suspended from calling any APIs
4034720403Merchant aggregated purchase amount on that day exceeds the agreed limit
4034722403The token limit desired by the merchant is not within the agreed range between the merchant and the Issuer
4034723403Account aggregated purchase amount on that day exceeds the agreed limit
4044700404Invalid transaction status
4044701404Transaction not found
4044702404Invalid Routing
4044704404Transaction is cancelled by customer
4044708404Merchant does not exist or status abnormal
4044710404Invalid API transition within a journey
4044713404The amount doesn't match with what supposed to
4044717404Terminal does not exist in the system
4044718404Inconsistent request parameter
4054700405Requested function is not supported
4054701405Requested operation to cancel/refund transaction Is not allowed at this time.
4094700409Cannot use same X-EXTERNAL-ID
4094701409Transaction has previously been processed indicates the same partnerReferenceNo already success
4294700429Maximum transaction limit exceeded
5004700500General Error
5004701500Unknown Internal Server Failure, Please retry the process again
5004702500Backend system failure, etc
5044700504timeout from the issuer

Additional APIs

  1. Refund API
  2. Cancel API
  3. Get Transaction Status API
  4. Payment Notification API