Introduction#
This documentation explains how merchants can integrate with DOKU APIs to validate and process transactions through acquirers (banks, e-wallets, etc.) using the Direct Inquiry flow.
The Direct Inquiry sequence ensures that every payment code entered by the customer is verified with DOKU before the transaction is confirmed. This guarantees that the order is valid, the details are correct, and the payment can be safely processed. The sequence diagram involves the following actors:1.
Customer: End user making a payment.
2.
Merchant: E-commerce platform or application integrating with DOKU.
3.
Acquirer: Bank or payment channel where the actual payment happens.
4.
DOKU: Payment gateway that provides secure access tokens, validates inquiries, and processes payments.
Step-by-Step Payment Flow#
Step 1. Customer Checkout & Payment Code#
The Customer shops online and proceeds to checkout.
The Merchant displays a payment page where the customer selects an Acquirer (ATM, Internet Banking, e-Wallet, etc.).
The Merchant generates a Payment Code and Payment Instructions and displays them to the customer.
The customer then inputs the Payment Code at the chosen acquirer’s channel.
Step 2. Acquirer Requests Access Token#
The Acquirer requests an Access Token from DOKU API using its credentials (public and private key).
DOKU validates the request and grants an Access Token, which will be used in the subsequent inquiry and payment requests.
Step 3. Direct Inquiry#
DOKU API validates the inquiry order request from acquirer and responds with an inquiry order response that includes:
The Acquirer passes this information back to the Merchant, who then displays the verified details to the Customer.
The Customer reviews and confirms the payment.
Step 4. Payment Invocation & Validation#
Once confirmed, the Merchant triggers a payment through the Acquirer.
The Acquirer checks the payment status and then calls DOKU API to validate the transaction.
DOKU API responds with a Payment Result indicating whether the payment was successful or failed.
Step 5. Notify Merchant#
The Acquirer may request another Access Token (if the previous one has expired).
After validation, DOKU API sends a Payment Notification to the Merchant’s system.
The Merchant updates the order status and displays the final Payment Result Page to the Customer.
Modified at 2025-08-26 03:14:29