API Reference (NEW)
ID - Indonesia
  • ID - Indonesia
  • GL - Global
DashboardProduct Docs
Resources
  • Github
  • Demo Site
  • Simulator
DashboardProduct Docs
Resources
  • Github
  • Demo Site
  • Simulator
ID - Indonesia
  • ID - Indonesia
  • GL - Global
  1. Direct API
  • Introduction
  • BI SNAP
  • Getting Started
    • Create Account
    • Authentication & API Keys
    • Make your first API call
  • Checkout API
    • Build a Checkout Page
      • Initiate Order
    • Additional Feature
      • Custom Callback URL
      • Custom Tenor for Credit Card
      • Tokenization
      • Recover Abandoned Cart
      • Custom Checkout Page
  • Direct API
    • Cards
      • Payment Form
        • Generate Payment Page
        • Authorize Capture
        • Online Refund
      • Host-to-host Payment
        • Get Token List
        • Check 3D Secure
        • Charge
      • Payment Notification
    • Bank Transfer
      • BCA Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BNI Virtual Account
        • DOKU Generated Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generated Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BRI Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BNC Virtual Account
      • BSI Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Delete Payment Code
          • Update Payment Code
      • Danamon Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • Mandiri Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token Copy
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • Maybank Virtual Account
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • Permata Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • DOKU Generate Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Merchant Generate Payment
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • Sinarmas Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • DOKU Generate Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Merchant Generate Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BJB Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • DOKU Generate Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Merchant Generate Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BPD Virtual Account
      • CIMB Virtual Account
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BSS Virtual Account
        • Doku Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token Copy
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • BTN Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
      • DOKU Virtual Account
        • DOKU Generate Payment Code
          • Get Token
          • Create Payment Code
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code
        • Merchant Generate Payment Code
          • Get Token
          • Create Payment Code
          • Update Payment Code
          • Payment Notification
          • Delete Payment Code
        • Direct Inquiry
          • Direct Inquiry
          • Payment Notification
          • Update Payment Code
          • Delete Payment Code Copy
    • Convenience Store
      • Alfa Group
        • Alfa - Generate Payment Code
      • Indomaret
        • How To Pay API
          • Get payment details and instructions
        • Indomaret - Generate Payment Code
    • e-Wallet
      • OVO
        • One Time Payment
          • Payment
          • Void
        • Account Binding
          • Account Binding
          • Balance Inquiry
          • Payment
          • Refund
          • Account Unbinding
      • ShopeePay
        • Payment
        • Refund
      • Payment Notification
    • Direct Debit
      • CIMB Direct Debit
        • Account Binding
        • Payment
        • OTP Verification
        • Refund
        • Account Unbinding
      • Allobank Direct Debit
        • Account Binding
        • Balance Inquiry
        • Payment
        • Refund
        • Account Unbinding
      • Mandiri Direct Debit
        • Card Binding
        • OTP Verification
        • Payment
        • Refund
        • Card Unbinding
      • BRI Direct Debit
        • Card Binding
        • OTP Verification
        • Payment
        • Refund
        • Card Unbinding
      • Payment Notification
    • PayLater
      • Generate Order
      • Cancellation
      • Refund
    • Kartu Kredit Indonesia
      • Get Token B2B
      • Binding Only
      • Payment AFP with Binding
      • Payment AFP
      • Payment with token
      • Payment without AFP
      • Refund
      • Unbinding
      • Online Refund
  • Webhooks
    • Setup Notification URL
    • Receive Notification
    • Best Practice
    • Retry Notification
    • Additional Features
      • Override Notification URL
  • Check Status API
    • Payment
      GET
    • Virtual Account
      POST
    • Direct Debit
      POST
    • E-Wallet X
      POST
    • Direct Debit Copy
      POST
  • Error Handling
    • Error Codes Glossary
  • Partner API
  • Payout API
    • Sub Account API
      • Money In
        • Accept Payment
      • Money Out
      • Balance
  • Technical Reference
    • Handling Idempotency
    • Postman Collection
    • Signature
  • Change Log
    • ID - Indonesia Version
  1. Direct API

Convenience Store

DOKU provides various payment channels. One of the most used by our merchants is Online to Offline. By using this payment channels, your customer can pay their order through offline counters and DOKU will notify you once the payment is completed by your customer. DOKU has partnered with various partners to help you provide many payment options for your customers.

Partnerships Model#

Each user may have different needs for the business and the way they receive funds. DOKU has 2 types of models for accepting payments, namely the Aggregator Model and the Direct Model. For full details, you can check the details here.
The following is a list of models in receiving your funds for each bank via Online to Offline.
NameAggregatorDirect
Alfa O2O✅✅
Indomaret❌✅

Features for Online to Offline#

Payment Code Component#

PAYMENT CODE COMPONENT
Payment Code which is displayed to customer, contains two parts.
The first part is the company code (BIN)
The second part is unique payment code.
There are 2 types of general features that can be used with Online to Offline:
1.
Register: The payment code will be registered to DOKU and Acquirer will inquiry to our side when the customer makes payment at the acquirer channel (Alfa Group, etc.)
Features TypeDescription
DOKU Generated Payment Code (DGPC)Merchants don’t need to generate payment code, just need to request from DOKU and DOKU will send a unique payment code. Component Payment Code: BIN and Unique payment code. Suitable for e-commerce business model.
Merchant Generated Payment Code (MGPC)Merchants can generate payment codes with their own rules, and send the code to DOKU and customers will use it for payment. Component Payment Code: BIN and Unique payment code. Suitable for top up business model.
2.
Direct Inquiry (DIPC): The payment code is registered on merchant side and DOKU will forward Acquirer inquiry request to merchant side when the customer makes payment at the acquirer channel (Alfa Group, etc.). Component Payment Code: BIN and Unique Payment Code.
Note
One transaction can't use 2 or 3 features at the same time.
By default, DOKU will register your business with DOKU Generate Payment Code feature which means BIN for payment code will be generated by DOKU side. But there is no limit for you to be able to use 2 features at the same time. What it can't do is that 1 transaction uses 2 features at the same time.
Tip
If you want to use MGPC or DIPC, then please contact the care team to get a BIN as a component for the payment code.

Billing Type#

Billing type is a type of feature used by merchants to determine the method of payment for their customers when they are in Inquiry. In case, the customer can input the amount according to their expected amount or the customer can also pay according to the amount that has been determined by the merchant.
Note
Online to Offline only supports FIX BILL

BIN Rules#

In accordance with the explanation regarding the payment code Component, BIN is one of the components to create a payment code. So, here's an explanation regarding BIN rules and adapt them to your needs.
Note
These rules only apply to Aggregator Partnership Models, which means merchants use DOKU's BIN.

Alfa Group#

Partnership ModelBIN TypeDescriptionVA Number ComponentFeature
AggregatorDOKU GeneralDOKU's BIN in Acquirer, that DOKU provide for merchants to useDOKU General BIN (1 digit) + DOKU Generated Payment Code (max: 19 digit)DOKU Generated Payment Code (DGPC)
AggregatorDOKU ExclusiveDOKU's BIN in Acquirer, that DOKU provides only for 1 merchant to use. Please contact sales team to get DOKU Exclusive BINDOKU Exclusive BIN (starting from 6 digit) + Free Digit (max. 14 digit)Merchant Generated Payment Code (MGPC), Direct Inquiry (DIPC)
DirectDirectMerchant’s Acquirer BIN. Please contact sales team to get Direct BIN from AcquirerMerchant’s Acquirer BIN (5 digit) + Free Digit (max. 20 digit)Merchant Generated Payment Code (MGPC), Direct Inquiry (DIPC)

Indomaret#

Partnership ModelBIN TypeDescriptionVA Number ComponentFeature
DirectDirectMerchant’s Acquirer BIN. Please contact sales team to get Direct BIN from AcquirerMerchant’s Acquirer BIN (5 digit) + Free Digit (max. 20 digit)

Reusable Status#

Reusable Status is a parameter in API to indicate if Payment Code can be paid more than once, set this to true if merchants wish to enable it.
Here is a reusable status explanation. Set this value in the API, to implement reusable status.
ValueDescription
truePayment Code can be paid more than once
falsePayment Code can only be paid once
Note
By default, DOKU will set the value to false, if you don't send this parameter on request.

Integration steps#

Here is the overview of how to integrate with O2O:
1.
Generate payment code
2.
Display payment code
3.
Acknowledge payment result

Direct API - Convenience Store Sequence Diagram#


1. Generate payment code#

To generate payment code, you will need to hit this API through your Backend:
API Request
TypeValue
HTTP MethodPOST
API endpoint (Sandbox)https://api-sandbox.doku.com/{{channel-name}}/{{version}}/payment-code
API endpoint (Production)https://api.doku.com/{{channel-name}}/{{version}}/payment-code
You need to change the {{channel-name}} and {{version}} accordingly based on what payment channel you wish. Here is the list:
Name{{channel-name}}Current Version
Alfa Groupalfa-online-to-offlinev2
Indomaretindomaret-online-to-offlinev2

2. Display payment code#

You can display the payment code to your customer by using online_to_offline_info.payment_code that you retrieved from the API response.

3. Acknowledge payment result#

After the payment is being made by your customer, DOKU will send HTTP Notification to your defined Notification URL. Learn how to handle the notification from DOKU:
Handling DOKU HTTP Notification

What's next?#

You can learn more about how to integrate to each payment channels you wish by clicking the menu on the sidebar.
Modified at 2025-09-08 03:39:21
Previous
Delete Payment Code Copy
Next
Alfa Group
Built with