For the complete documentation index, see llms.txt. This page is also available as Markdown.

Collect and Route

Smart revenue routing for platforms. Accept payments, deduct commissions, and distribute funds to partners instantly with automated splitting.


How It Works

Customer pays via Checkout API / Direct API


Payment request includes additionalInfo:
├── account.id        →  Which sub-account receives the payment
└── account.split_rule_id  →  Which split rule to apply


DOKU processes payment + applies split rule automatically
├── Seller gets 95%  →  Seller sub-account
└── Platform gets 5% →  Platform fee ledger


Seller requests payout → Transfer to bank account

Accept Payment

To use Collect & Route, you accept payments through DOKU Checkout API or DOKU Direct API and include additionalInfo to tell DOKU which sub-account and split rule to apply.

When creating a payment, add the additionalInfo object to your request body:

Field
Type
Required
Description

additionalInfo.account.id

string

Yes

The sub-account ID that receives the incoming payment. This is the profileId returned when you registered the sub-account.

additionalInfo.account.split_rule_id

string

No

The split rule to apply to this payment. This is the splitRuleId returned when you created the split rule.

The additionalInfo object works with DOKU Checkout API (POST /checkout/v1/payment) and DOKU Direct API (all payment methods). See Payment Channel Compatibility for which channels support Sub-Account routing.

Include split_rule_id to automatically split the payment across multiple sub-accounts based on your configured rule.

The split is calculated on the net amount after DOKU PG fees, not the gross payment. See How Splitting is Calculated for details.

Best for: Marketplaces, platforms with commission models — where every payment needs to be routed between multiple parties.


Split Rules

Split rules automate how incoming funds are distributed. Once configured, every qualifying transaction is split at the moment of payment.

Type
How It Works
Example

PERCENTAGE

Each party gets a percentage of the total

95% to seller, 5% to platform

FLAT

Each party gets a fixed amount

Rp 5,000 to platform, remainder to seller

The split is calculated on the net amount after PG fees, not the gross customer payment.

Setup:

  1. Add rules, specify the type (percentage or flat), the value, and the destination account

  2. Call the Split Rules API, DOKU saves the rule and returns a splitRuleId

  3. Pass splitRuleId in additionalInfo when accepting payments

Settlement: Funds from Checkout/Direct API land in DOKU_PENDING_IDR first. After settlement, they move to DOKU_MERCHANT_IDR and become available for payout.


Payout to Bank

Pay out funds to any of 100+ Indonesian bank accounts via Transfer InquiryTransfer Payment.

Channel
Description

BI_FAST

Indonesia's real-time payment rail (default)

ONLINE

Standard online bank transfer

Step-by-Step Integration

  1. Register a Sub-Account : POST /sub-account/v2.0/register → save the profileId

  2. Create a Split Rule: POST /sub-account/v2.0/split-rules → save the splitRuleId

  3. Accept Payment: Include both IDs in additionalInfo when calling Checkout API or Direct API

  4. Wait for Settlement: Funds move from DOKU_PENDING_IDR to DOKU_MERCHANT_IDR, split rule applied

  5. Payout: Transfer Inquiry → Transfer Payment to bank account

Last updated

Was this helpful?