DOKU MCP Server
DOKU Model Context Protocol (MCP) capabilities and use cases
DOKU MCP Server is a robust platform designed to integrate DOKU’s payment APIs with AI-powered tools. By utilizing the Model Context Protocol (MCP), the server provides seamless communication between AI assistants and DOKU, allowing developers to build advanced, AI-enabled payment applications.
Introduction
Model Context Protocol (MCP) is a technical framework that empowers AI systems to communicate and interact with external platforms and services. Through MCP, AI models like ChatGPT can efficiently connect with payment systems, enabling tasks such as payment processing and transaction management via a unified protocol. This streamlined connection allows for the creation of automated payment flows with minimal configuration.
Integrating via MCP (vs only providing classic REST / SDK APIs) offers several advantages — especially as AI, agents, and intelligent assistants proliferate.
AI-Powered Payment Automation
Any AI system that supports MCP can immediately discover your tools and invoke them (no per-integration adapters).
Reduced Glue Logic & Error-prone Prompt Engineering
You avoid fragile “prompt → API call → parse” loops; the agent works with structured inputs/outputs.
Quick Setup
No custom wrappers needed; tools are discoverable and ready to use, cutting integration time.
Safer / Predictable Interaction
The schema defines valid parameters, types, and error responses, reducing the chance an agent miscalls your API.
Key Features
Below are the core tools your MCP server offers for payment operations. Each is exposed via MCP for AI agents and developers.
Create Checkout Link
Purpose: Instantly generate a checkout URL that accepts payments; the customer is redirected to the checkout and selects all available payment method(s).
Flow: Agent or system provides amount, currency, optional metadata, and return/callback URLs. MCP returns a checkout link.
Use Case(s): Web shops and marketplaces.
Create Payment Link
Purpose: Generate a payment link in which the customer first fills in customer data (name, email, address, etc.), then is redirected to a checkout page.
Flow: Agent submits amount, currency, required customer fields, metadata, and redirect URLs. MCP returns a link to a hosted payment form (or redirect to a form) which, upon completion, forwards to a checkout link.
Use Case(s): Custom quote flows.
Create Direct Payment via QRIS
Purpose: Generate a QRIS payment code (static or dynamic, e.g. dynamic QR) that customers scan via e-wallets / banking apps.
Flow: Agent provides amount, validity, optional metadata. MCP returns a QR code (in image or data format) + payment instructions.
Use Case(s): Indonesian domestic payments, “scan & pay” flows, physical / digital shops integrating into AI chat interface.
Create Direct Payment via Virtual Account
Purpose: Issue a virtual account number for a customer to complete payment.
Flow: Agent invokes with amount, customer, expiry, and bank selection. MCP returns a virtual account number + instructions.
Behavior: Payment status is polled / webhook notification delivered when funds arrive.
Use Case(s): Scenarios where merchants prefer virtual account to be the only available payment method.
Manage Customers
Purpose: Maintain a customer directory (e.g. profiles, metadata, payment methods) so future payment tools can be linked to a particular customer entity.
Flow: Agent may create a customer with name, email, external IDs; update attributes; delete or archive them.
Use Case(s): Reuse customer for repeat payments, track usage, issue refunds, attach virtual account payments to a customer, etc.
Use Cases
Create Payment Request with QRIS

Scenario
A merchant uses an AI chatbot to request payment from a user (customer).
The AI assistant understands the user’s intent (e.g. “buys a data package”)
The agent then calls your MCP tool to generate a QRIS payment, delivers the QR code, tracks status, and replies to the customer.
Step-by-step Flow
Customer: “I want to buy data package (IDR 450,000).”
Agent: parses intent, amount = 450,000, currency = IDR.
Agent → MCP: calls
CreateQRISPayment
with amount, optional metadata (e.g. user_id, order_id).MCP → Agent: returns a QR code (image / URL + instructions) + payment reference.
Agent → Customer: “Here’s your QRIS payment — scan it to pay.”
Customer scans it with mobile banking / e-Wallet, completes payment.
Agent polls / or receives webhook: agent calls MCP
GetPaymentStatus
with reference.MCP → Agent: returns status = “PAID” or “PENDING” or “FAILED”.
Agent → Customer: “Payment Successful — Thank you!”
Create Payment Request with Virtual Account
This flow is almost identical, but uses bank transfer via virtual account:
Customer: “I want to pay the invoice for order #123 (IDR 2,500,000).”
Agent: extracts amount, order id.
Agent → MCP: calls
CreateVirtualAccountPayment
with amount, bank (or let system choose), expiry.MCP → Agent: returns a VA number (e.g. 1234567890), account name, bank name, expiry, instructions.
Agent → Customer: “Please transfer to virtual account: 1234567890 (Bank ABC) before 2025-10-05 23:59. Reply ‘done’ when transferred.”
Customer performs bank transfer via mobile banking / teller / ATM.
Agent polls / webhook: calls
GetPaymentStatus
with VA reference.MCP returns status (“PAID” / “PENDING” / “EXPIRED”).
Agent → Customer: “Payment Successful — Thank you!”
This route works well where Virtual Account is heavily preferred by the customer.
Get Started
Please visit our API Reference to learn how to integrate with DOKU MCP Server, including authentication steps, available tool schemas, request/response formats, webhook event structures, error codes, and best practices. The API Reference also covers sandbox environments for testing, migration guidelines from traditional REST APIs, and code samples in multiple languages so your team can get started quickly.
FAQ
Last updated
Was this helpful?