QRIS
QRIS (Quick Response Code Indonesian Standard) is a QR code standard developed by Bank Indonesia and Indonesian Payment System Association (ASPI) for cashless payments in Indonesia.
Overview Steps
Overview of integration process with QRIS
1. Generate QRIS
After customer creates an order and choose QRIS as the payment method, merchant will hit this API to generate QRIS that will be shown to the customer. To generate QRIS, you need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Sandbox
API Production
Path
/snap-adapter/b2b/v1.0/qr/qr-mpm-generate
Here is the sample request header, request body and response body for generate QRIS:
Client Id for merchant that generated by DOKU
82150823919040624621823174737537
Numeric String. Reference number that should be unique in the same day (Request Id)
41807553358950093184162180797837
Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Transaction ID from partners
a98757c8dbc6434ab5dd4c55d9092d9a
Credential mall ID from DOKU
2115
Terminal Identification alphanumeric
k45
Expired Time QRIS using ISO 8601 Format, if not sent will use Default value 30 days
2023-11-08T17:38:42+07:00
POST /snap-adapter/b2b/v1.0/qr/qr-mpm-generate HTTP/1.1
Host: api-sandbox.doku.com
X-PARTNER-ID: text
X-EXTERNAL-ID: text
X-SIGNATURE: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 283
{
"partnerReferenceNo": "a98757c8dbc6434ab5dd4c55d9092d9a",
"amount": {
"value": "1000.00",
"currency": "IDR"
},
"feeAmount": {
"value": "500.00",
"currency": "IDR"
},
"merchantId": 2115,
"terminalId": "k45",
"validityPeriod": "2023-11-08T17:38:42+07:00",
"additionalInfo": {
"postalCode": 13120,
"feeType": 2
}
}
OK
{
"responseCode": "2004700",
"responseMessage": "Request has been processed successfully",
"referenceNo": "a98757c8dbc6434ab5dd4c55d9092d9a",
"partnerReferenceNo": "a98757c8dbc6434ab5dd4c55d9092d9a",
"qrContent": "00020101021226530012COM.DOKU.WWW0118936008990000002997020429970303UMI51440014ID.CO.QRIS.WWW0215ID20200622029970303UMI52045411530336054071200.255502025606500.525802ID5911Green Pages6007Jakarta61051312062430703K455032a98757c8dbc6434ab5dd4c55d9092d9a6304F6EA",
"terminalId": "K45",
"additionalInfo": {
"validityPeriod": "2023-11-08T17:38:42+07:00"
}
}
2. Query QRIS
To query QRIS, you need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Sandbox
API Production
Path
/snap-adapter/b2b/v1.0/qr/qr-mpm-query
Here is the sample request header, request body and response body for query QRIS:
Client Id for merchant that generated by DOKU
82150823919040624621823174737537
Client's current local time with format YYYY-MM-DDTHH:mm:ssZD
2020-12-21T14:56:11+07:00
Numeric String. Reference number that should be unique in the same day (Request Id)
41807553358950093184162180797837
Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Transaction ID from DOKU when Generate QRIS
7d054649f9ba4c19ae5f95950c99be4d
Transaction ID from partners when Generate QRIS
7d054649f9ba4c19ae5f95950c99be4d
Unique service API “47”
47
Merchant ID registered in DOKU
2997
POST /snap-adapter/b2b/v1.0/qr/qr-mpm-query HTTP/1.1
Host: api-sandbox.doku.com
X-PARTNER-ID: text
X-TIMESTAMP: text
X-EXTERNAL-ID: text
X-SIGNATURE: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 157
{
"originalReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
"originalPartnerReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
"serviceCode": 47,
"merchantId": 2997
}
OK
{
"responseCode": "2004700",
"responseMessage": "Request has been processed successfully",
"originalReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
"originalPartnerReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
"serviceCode": "47",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"paidTime": "2023-08-18T23:12:21+07:00",
"amount": {
"value": 1200,
"currency": "IDR"
},
"feeAmount": {
"value": 500,
"currency": "IDR"
},
"additionalInfo": {
"approvalCode": "328591",
"convenienceFee": "C00000000",
"issuerId": "93600014",
"issuerName": "BCA",
"terminalId": "A01 ",
"customerName": "JOHN DOE "
}
}
3. Refund QRIS
This endpoint is used to create refund request for previous successful payment, merchant can request a transaction refund to DOKU. To refund, you need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Sandbox
API Production
Path
/snap-adapter/b2b/v1.0/qr/qr-mpm-refund
Here is the sample request header, request body and response body for refund QRIS:
Client Id for merchant that generated by DOKU
82150823919040624621823174737537
Client's current local time with format YYYY-MM-DDTHH:mm:ssZD
2020-12-21T14:56:11+07:00
Numeric String. Reference number that should be unique in the same day (Request Id)
41807553358950093184162180797837
Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Credential mall ID from DOKU
2115
Transaction ID from DOKU when Generate QRIS
originalPartnerReferenceNo
Transaction ID from DOKU when Generate QRIS
7d054649f9ba4c19ae5f95950c99be4d
partnerRefundNo
refund reason
POST /snap-adapter/b2b/v1.0/qr/qr-mpm-refund HTTP/1.1
Host: api-sandbox.doku.com
X-PARTNER-ID: text
X-TIMESTAMP: text
X-EXTERNAL-ID: text
X-SIGNATURE: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 285
{
"merchantId": 2115,
"originalPartnerReferenceNo": "originalPartnerReferenceNo",
"originalReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
"partnerRefundNo": "partnerRefundNo",
"refundAmount": {
"value": 1200,
"currency": "IDR"
},
"reason": "refund reason",
"additionalInfo": {
"approvalCode": "328591"
}
}
OK
{
"responseCode": "2007800",
"responseMessage": "Request has been processed successfully",
"originalReferenceNo": "82367e5283b94a47a920859bcb4af4d6",
"originalPartnerReferenceNo": "82367e5283b94a47a920859bcb4af4d6",
"refundNo": "QRISR0001",
"partnerRefundNo": "QRISR0001",
"refundAmount": {
"value": 1200,
"currency": "IDR"
},
"refundTime": "2022-11-11T10:51:48+07:00"
}
4. Decode QRIS
To decode QRIS, you need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Sandbox
API Production
Path
/snap-adapter/b2b/v1.0/qr/qr-mpm-decode
Here is the sample request header, request body and response body for decode QRIS:
Client Id for merchant that generated by DOKU
82150823919040624621823174737537
Client's current local time with format YYYY-MM-DDTHH:mm:ssZD
2020-12-21T14:56:11+07:00
Numeric String. Reference number that should be unique in the same day (Request Id)
41807553358950093184162180797837
Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Transaction ID from partners
75a98757c8dbc6434ab5dd4c55d9092d9a
QRIS content. QRIS generated by DOKU or other PJSP. Can be dynamic or static QRIS.
00020101021226530012COM.DOKU.WWW0118936008990000002997020429970303UMI51440014ID.CO.QRIS.WWW0215ID20200622029970303UMI52045411530336054071200.255502025606500.525802ID5911Green Pages6007Jakarta61051312062430703K455032a98757c8dbc6434ab5dd4c55d9092d9a6304F6EA
The time when the QRIS scanned by the User, ISO 8601 Format
2023-11-08T17:38:42+07:00
POST /snap-adapter/b2b/v1.0/qr/qr-mpm-decode HTTP/1.1
Host: api-sandbox.doku.com
X-PARTNER-ID: text
X-TIMESTAMP: text
X-EXTERNAL-ID: text
X-SIGNATURE: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 368
{
"partnerReferenceNo": "75a98757c8dbc6434ab5dd4c55d9092d9a",
"qrContent": "00020101021226530012COM.DOKU.WWW0118936008990000002997020429970303UMI51440014ID.CO.QRIS.WWW0215ID20200622029970303UMI52045411530336054071200.255502025606500.525802ID5911Green Pages6007Jakarta61051312062430703K455032a98757c8dbc6434ab5dd4c55d9092d9a6304F6EA",
"scanTime": "2023-11-08T17:38:42+07:00"
}
OK
{
"responseCode": "2004800",
"responseMessage": "Request has been processed successfullys",
"referenceNo": "25571a62302c43a881c684cccc7ecbae",
"partnerReferenceNo": "25571a62302c43a881c684cccc7ecbae",
"merchantName": "Green Pages",
"transactionAmount": {
"value": 1200,
"currency": "IDR"
},
"feeAmount": {
"value": 500,
"currency": "IDR"
},
"additionalInfo": {
"pointOfInitiationMethod": 12,
"pointOfInitiationMethodDescription": "DYNAMIC",
"feeType": 2,
"feeTypeDescription": "FIX_TIPS"
}
}
5. Payment QRIS
You need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Sandbox
API Production
Path
/snap-adapter/b2b2c/v1.0/qr/qr-mpm-payment
Here is the sample request header, request body and response body for payment QRIS:
Client Id for merchant that generated by DOKU
82150823919040624621823174737537
Client's current local time with format YYYY-MM-DDTHH:mm:ssZD
2020-12-21T14:56:11+07:00
Numeric String. Reference number that should be unique in the same day (Request Id)
41807553358950093184162180797837
Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
String starts with keyword “Bearer ” followed by token B2B2C (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
91cbe52caf27471482d3430c37d174fc
POST /snap-adapter/b2b2c/v1.0/qr/qr-mpm-payment HTTP/1.1
Host: api-sandbox.doku.com
X-PARTNER-ID: text
X-TIMESTAMP: text
X-EXTERNAL-ID: text
X-SIGNATURE: text
Authorization: text
Authorization-Customer: text
Content-Type: application/json
Accept: */*
Content-Length: 429
{
"partnerReferenceNo": "91cbe52caf27471482d3430c37d174fc",
"amount": {
"value": 1200,
"currency": "IDR"
},
"feeAmount": {
"value": 500,
"currency": "IDR"
},
"additionalInfo": {
"qrContent": "0020101021226530012COM.DOKU.WWW0118936008990000002997020429970303UBE51440014ID.CO.QRIS.WWW0215ID20200622029970303UBE52045411530336054071200.005502025606500.005802ID5911Green Pages6007Jakarta61051312062430703K455032072435673f53496a9db872c8caa148996304F8EF"
}
}
OK
{
"responseCode": "2005000",
"responseMessage": "Request has been processed successfully",
"referenceNo": "91cbe52caf27471482d3430c37d174fc",
"partnerReferenceNo": "91cbe52caf27471482d3430c37d174fc",
"amount": {
"value": 1200,
"currency": "IDR"
},
"feeAmount": {
"value": 500,
"currency": "IDR"
},
"additionalInfo": {
"approvalCode": 328580
}
}
6. Notify QRIS
To notify with QRIS, you need to hit this API through your Backend:
API Endpoint
HTTP Method
POST
API Production
Here is the sample request header, request body and response body for notify QRIS:
This API is used to notify partners when a transaction occurs in the DOKU V2 system. KIRIMDOKU will notify partners with the URL that has been registered, and the notification will be done maximum 3 times or until the notification callback response is correct.
A unique identifier for the transaction
fce4964b179b0d4ee1393613d0e1017860831fef
The acquirer code
DOKU
Customer's primary account number
9360050110001187249
Invoice number
10093868
Transaction ID
INVtestaccount07
Convenience fee code
C00000000
Terminal ID
A01
Origin of the transaction
INBOUND
Transaction amount
2000.00
Transaction date and time
20241107195933
Merchant's primary account number
936008990000047435
Reference ID
17etne368279
Customer's name
YURI PRAMANA
Transaction status
S
Issuer name
QRIS BCAD
Issuer ID
9360050110001187249
DK0018353
Specific notification code
200
Notification message “Transaction is Success” or “Transaction is Failed”
Transaction is Refunded
Update time in yyyy-MM-ddTHH:mm:ss format
2024-01-12'T'07:30:12
CONTINUE
POST /{merchantUrlDirectNotification} HTTP/1.1
Host: {merchant-domain}
Content-Type: application/json
Accept: */*
Content-Length: 124
{
"transactionId": "DK0018353",
"activityCode": "200",
"message": "Transaction is Refunded",
"processDate": "2024-01-12'T'07:30:12"
}
Notification processed Successfully
CONTINUE
Last updated
Was this helpful?