API Reference
DOKU DocsChangelogDOKU Github
  • Getting Started with DOKU API
    • User Registration
    • Idempotency Request
    • Notification
      • Setup Notification URL
      • HTTP Notification Sample for SNAP
      • HTTP Notification Sample - Non SNAP
      • Best Practice
      • Retry Notification
      • Override Notification URL
    • Signature Component
      • Non-SNAP
        • Signature Component from Request Header
        • Signature Componen from Response Header
        • Signature from API Get Method
        • Sample Code
      • SNAP
        • Symmetric Signature
        • Asymmetric Signature
    • Response Code
      • HTTP Status and Case Code
    • Check Status API
      • Non-SNAP
      • SNAP
    • Retrieve Payment Credential
  • Accept Payment
    • DOKU Checkout
      • Integration Guide
        • Backend Integration
        • Frontend Integration
        • Simulate payment and Notification
      • Supported Payment Methods
      • Status Order
      • Additional Feature
        • Tokenization
        • Promo on DOKU Checkout Page
        • Track Campaign Source on Google Analytics
      • Checkout Settings
    • Direct API
      • Non-SNAP
        • Cards
          • Payment Page Integration Guide
          • Host-To-Host Integration Guide
          • Mastercard Automatic Billing Updater (ABU) Integration Guide
            • Backend Integration
        • e-Wallet
          • Overview
          • DOKU e-Wallet
          • OVO Push Payment
          • ShopeePay
          • LinkAja
        • Paylater
          • Akulaku
          • Kredivo
          • Indodana
        • Digital Banking
          • Jenius Pay
        • Convenience Store
          • Alfa Group
          • Indomaret
      • SNAP
        • Integration Guide
          • Get Token API
            • B2B
            • B2B2C
          • Virtual Account
            • CIMB Virtual Account
            • BSI Virtual Account
            • BCA Virtual Account
            • BNC Virtual Account
            • BNI Virtual Account
            • Mandiri Virtual Account
            • BRI Virtual Account
            • BTN Virtual Account
            • Permata Virtual Account
            • Danamon Virtual Account
            • BSS Virtual Account
          • E-Wallet
            • DOKU Wallet
            • DANA
            • OVO
            • ShopeePay
          • Direct Debit
            • Allo Bank Direct Debit
            • BRI Direct Debit
            • CIMB Direct Debit
            • Mandiri Direct Debit
          • Kartu Kredit Indonesia Cepat Secure(KKI CPTS)
            • Host to Host Integration
          • QRIS
    • Finance and Settlement
      • Split Settlement
      • Custom Settlement Report
      • Hold and Release Settlement
      • Bulk Registration Bank
    • Test on DOKU Demo Site
    • DOKU Payment Simulator
  • Developer Kit
    • Postman Collection
    • Libraries and SDK
  • Wallet As A Service
    • Sub Account
  • Partnership
    • Partner API
      • Check Requirements API
      • Generate Token API
      • Upload File API
      • Business Registration API
      • Create Business Lite API
      • Get Business Data API
  • Payout
    • Kirim DOKU
  • FLEXIBILL
    • Account Billing
      • Batch Upload
  • Archive
    • Non-SNAP
      • Tokenization V1
      • e-Wallet
        • OVO Recurring
        • OVO Open API
    • SNAP
      • Virtual Account
        • BCA v1.0
        • BRI v1.0
        • BNI v1.0
        • BNC v1.0
        • Mandiri v1.0
        • BTN v1.0
        • Permata v1.0
        • Danamon Virtual Account
      • e-Wallet
        • OVO Open API
        • DANA
        • ShopeePay
      • Direct Debit
        • CIMB Direct Debit
        • BRI Direct Debit
        • Allobank
Powered by GitBook

DOKU API

  • Legacy Documentation
On this page

Was this helpful?

  1. Accept Payment
  2. Direct API
  3. SNAP
  4. Integration Guide

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.

PreviousHost to Host IntegrationNextFinance and Settlement

Last updated 2 months ago

Was this helpful?

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 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:

2. Query QRIS

To query QRIS, you need to hit this API through your Backend:

API Endpoint

Environment
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:

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 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:

4. Decode QRIS

To decode QRIS, you need to hit this API through your Backend:

API Endpoint

Environment
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:

5. Payment QRIS

You need to hit this API through your Backend:

API Endpoint

Environment
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:

Generate QRIS
Query QRIS
Refund QRIS
Decode QRIS
Payment QRIS
https://api-sandbox.doku.com
https://api.doku.com
https://api-sandbox.doku.com
https://api.doku.com
https://api-sandbox.doku.com
https://api.doku.com
https://api-sandbox.doku.com
https://api.doku.com
https://api-sandbox.doku.com
https://api.doku.com

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"
  }
}

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"
}

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"
  }
}

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
  }
}
  • Overview Steps
  • 1. Generate QRIS
  • POSTPOST Generate QRIS
  • 2. Query QRIS
  • POSTPOST Query QRIS
  • 3. Refund QRIS
  • POSTPOST Refund QRIS
  • 4. Decode QRIS
  • POSTPOST Decode QRIS
  • 5. Payment QRIS
  • POSTPOST Payment 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 “51”

Example: 51
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": 51,
  "merchantId": 2997
}
200

OK

{
  "responseCode": "2005100",
  "responseMessage": "Request has been processed successfully",
  "originalReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
  "originalPartnerReferenceNo": "7d054649f9ba4c19ae5f95950c99be4d",
  "serviceCode": "51",
  "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                       "
  }
}