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.

Benefit
Description

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.

  • 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.

  • 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

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

  1. Customer: “I want to buy data package (IDR 450,000).”

  2. Agent: parses intent, amount = 450,000, currency = IDR.

  3. Agent → MCP: calls CreateQRISPayment with amount, optional metadata (e.g. user_id, order_id).

  4. MCP → Agent: returns a QR code (image / URL + instructions) + payment reference.

  5. Agent → Customer: “Here’s your QRIS payment — scan it to pay.”

  6. Customer scans it with mobile banking / e-Wallet, completes payment.

  7. Agent polls / or receives webhook: agent calls MCP GetPaymentStatus with reference.

  8. MCP → Agent: returns status = “PAID” or “PENDING” or “FAILED”.

  9. Agent → Customer: “Payment Successful — Thank you!”

Create Payment Request with Virtual Account

This flow is almost identical, but uses bank transfer via virtual account:

  1. Customer: “I want to pay the invoice for order #123 (IDR 2,500,000).”

  2. Agent: extracts amount, order id.

  3. Agent → MCP: calls CreateVirtualAccountPayment with amount, bank (or let system choose), expiry.

  4. MCP → Agent: returns a VA number (e.g. 1234567890), account name, bank name, expiry, instructions.

  5. Agent → Customer: “Please transfer to virtual account: 1234567890 (Bank ABC) before 2025-10-05 23:59. Reply ‘done’ when transferred.”

  6. Customer performs bank transfer via mobile banking / teller / ATM.

  7. Agent polls / webhook: calls GetPaymentStatus with VA reference.

  8. MCP returns status (“PAID” / “PENDING” / “EXPIRED”).

  9. 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.

Get Started Now


FAQ

Is using DOKU MCP Server free of charge?

Yes, there is no fee in using DOKU MCP.

Do I need AI to use DOKU MCP?

No. While MCP is designed to make it easier for AI agents and assistants to interact with payments, you don’t need AI to use it. You can call MCP tools directly from your backend systems, apps, or automation scripts just like a normal API. AI simply adds another layer of flexibility for conversational or autonomous payment flows.

What payment methods are supported currently with DOKU MCP?

For direct payments, we currently support Virtual Accounts and QRIS. If you want to offer other payment options (such as credit/debit cards, e-wallets, or paylater), you can use the Checkout Link tool. The checkout page will automatically display all payment methods you’ve activated on your merchant account.

How do I manage permissions / quotas on who can call MCP tools?

We support role-based access control (RBAC) at the tool level. You can designate which agents / users / applications can call which MCP methods. You can also enforce rate limits, quotas, and logging per API key.

What about refunds, voids, or transaction reversals with DOKU MCP?

These will be exposed as additional MCP tools (e.g. RefundPayment, CancelPayment). These are part of the extended version (coming soon) but can be enabled once needed.

Can I migrate existing payment flows to DOKU MCP without disruption?

Yes. Because your agents / systems will detect both MCP and REST interfaces, you can phase in MCP gradually, test it, and fall back to your existing flow until full cutover.

If I don’t have a technical team, can I still use DOKU MCP?

Yes. We will guide you through the setup, from creating checkout or payment links to enabling QRIS and Virtual Account payments. We can handle the technical configuration for you and make sure everything is working smoothly. Please contact our Sales team by filling the following form to get started.

Last updated

Was this helpful?