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

Environment
Endpoint

HTTP Method

POST

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:

POST Generate QRIS

post
Header parameters
X-PARTNER-IDstringRequired

Client Id for merchant that generated by DOKU

Example: 82150823919040624621823174737537
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (Request Id)

Example: 41807553358950093184162180797837
X-SIGNATUREstringRequired

Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp

Example: ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
AuthorizationstringRequired

String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Body
partnerReferenceNostringRequired

Transaction ID from partners

Example: a98757c8dbc6434ab5dd4c55d9092d9a
merchantIdstringRequired

Credential mall ID from DOKU

Example: 2115
terminalIdstring · min: 3 · max: 16Required

Terminal Identification alphanumeric

Example: k45
validityPeriodstringOptional

Expired Time QRIS using ISO 8601 Format, if not sent will use Default value 30 days

Example: 2023-11-08T17:38:42+07:00
Responses
200
OK
application/json
post
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
  }
}
200

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

Environment
Endpoint

HTTP Method

POST

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:

POST Query QRIS

post
Header parameters
X-PARTNER-IDstringRequired

Client Id for merchant that generated by DOKU

Example: 82150823919040624621823174737537
X-TIMESTAMPstringRequired

Client's current local time with format YYYY-MM-DDTHH:mm:ssZD

Example: 2020-12-21T14:56:11+07:00
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (Request Id)

Example: 41807553358950093184162180797837
X-SIGNATUREstringRequired

Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp

Example: ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
AuthorizationstringRequired

String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Body
originalReferenceNostringRequired

Transaction ID from DOKU when Generate QRIS

Example: 7d054649f9ba4c19ae5f95950c99be4d
originalPartnerReferenceNostringRequired

Transaction ID from partners when Generate QRIS

Example: 7d054649f9ba4c19ae5f95950c99be4d
serviceCodestring · max: 2Required

Unique service API “47”

Example: 47
merchantIdstring · max: 64Required

Merchant ID registered in DOKU

Example: 2997
Responses
200
OK
application/json
post
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
}
200

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

Environment
Endpoint

HTTP Method

POST

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:

POST Refund QRIS

post
Header parameters
X-PARTNER-IDstringRequired

Client Id for merchant that generated by DOKU

Example: 82150823919040624621823174737537
X-TIMESTAMPstringRequired

Client's current local time with format YYYY-MM-DDTHH:mm:ssZD

Example: 2020-12-21T14:56:11+07:00
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (Request Id)

Example: 41807553358950093184162180797837
X-SIGNATUREstringRequired

Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp

Example: ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
AuthorizationstringRequired

String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Body
merchantIdstring · max: 64Required

Credential mall ID from DOKU

Example: 2115
originalPartnerReferenceNostring · max: 32Required

Transaction ID from DOKU when Generate QRIS

Example: originalPartnerReferenceNo
originalReferenceNostringOptional

Transaction ID from DOKU when Generate QRIS

Example: 7d054649f9ba4c19ae5f95950c99be4d
partnerRefundNostring · max: 64RequiredExample: partnerRefundNo
reasonstring · max: 256RequiredExample: refund reason
Responses
200
OK
application/json
post
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"
  }
}
200

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

Environment
Endpoint

HTTP Method

POST

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:

POST Decode QRIS

post
Header parameters
X-PARTNER-IDstringRequired

Client Id for merchant that generated by DOKU

Example: 82150823919040624621823174737537
X-TIMESTAMPstringRequired

Client's current local time with format YYYY-MM-DDTHH:mm:ssZD

Example: 2020-12-21T14:56:11+07:00
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (Request Id)

Example: 41807553358950093184162180797837
X-SIGNATUREstringRequired

Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp

Example: ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
AuthorizationstringRequired

String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Body
partnerReferenceNostringRequired

Transaction ID from partners

Example: 75a98757c8dbc6434ab5dd4c55d9092d9a
qrContentstringRequired

QRIS content. QRIS generated by DOKU or other PJSP. Can be dynamic or static QRIS.

Example: 00020101021226530012COM.DOKU.WWW0118936008990000002997020429970303UMI51440014ID.CO.QRIS.WWW0215ID20200622029970303UMI52045411530336054071200.255502025606500.525802ID5911Green Pages6007Jakarta61051312062430703K455032a98757c8dbc6434ab5dd4c55d9092d9a6304F6EA
scanTimestringRequired

The time when the QRIS scanned by the User, ISO 8601 Format

Example: 2023-11-08T17:38:42+07:00
Responses
200
OK
application/json
post
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"
}
200

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

Environment
Endpoint

HTTP Method

POST

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:

POST Payment QRIS

post
Header parameters
X-PARTNER-IDstringRequired

Client Id for merchant that generated by DOKU

Example: 82150823919040624621823174737537
X-TIMESTAMPstringRequired

Client's current local time with format YYYY-MM-DDTHH:mm:ssZD

Example: 2020-12-21T14:56:11+07:00
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (Request Id)

Example: 41807553358950093184162180797837
X-SIGNATUREstringRequired

Symmetric Signature with Get Token (Default)HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp

Example: ieNOENDdN4MnectGytx5UvmOfASZ2oGWMCJ8gVqkw3tB98ofgY9cbxSeY4IYoYeoKs+0QP4h8BTBhemlfeXp1w==
AuthorizationstringRequired

String starts with keyword “Bearer ” followed by token B2B (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization-CustomerstringRequired

String starts with keyword “Bearer ” followed by token B2B2C (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)

Example: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Body
partnerReferenceNostringRequiredExample: 91cbe52caf27471482d3430c37d174fc
Responses
200
OK
application/json
post
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"
  }
}
200

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

Here is the sample request header, request body and response body for notify QRIS:

post

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.

Query parameters
WORDSstringRequired

A unique identifier for the transaction

Example: fce4964b179b0d4ee1393613d0e1017860831fef
ACQUIRERstringRequired

The acquirer code

Example: DOKU
CUSTOMERPANstringRequired

Customer's primary account number

Example: 9360050110001187249
INVOICEstringRequired

Invoice number

Example: 10093868
TRANSACTIONIDstringRequired

Transaction ID

Example: INVtestaccount07
CONVENIENCEFEEstringRequired

Convenience fee code

Example: C00000000
TERMINALIDstringRequired

Terminal ID

Example: A01
ORIGINstringRequired

Origin of the transaction

Example: INBOUND
AMOUNTstringRequired

Transaction amount

Example: 2000.00
TXNDATEstringRequired

Transaction date and time

Example: 20241107195933
MERCHANTPANstringRequired

Merchant's primary account number

Example: 936008990000047435
REFERENCEIDstringRequired

Reference ID

Example: 17etne368279
CUSTOMERNAMEstringRequired

Customer's name

Example: YURI PRAMANA
TXNSTATUSstringRequired

Transaction status

Example: S
ISSUERNAMEstringRequired

Issuer name

Example: QRIS BCAD
ISSUERIDstringRequired

Issuer ID

Example: 9360050110001187249
Body
transactionIdstring · max: 16RequiredExample: DK0018353
activityCodestringRequired

Specific notification code

Example: 200
messagestringRequired

Notification message “Transaction is Success” or “Transaction is Failed”

Example: Transaction is Refunded
processDatestringRequired

Update time in yyyy-MM-ddTHH:mm:ss format

Example: 2024-01-12'T'07:30:12
Responses
200
Notification processed Successfully
application/json
ResponsestringExample: CONTINUE
post
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"
}
200

Notification processed Successfully

CONTINUE

Last updated

Was this helpful?