Collect and Route
Smart revenue routing for platforms. Accept payments, deduct commissions, and distribute funds to partners instantly with automated splitting.
How It Works
Accept Payments
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:
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.
Note: 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.
Omit split_rule_id to route the full payment amount directly into the specified sub-account. No splitting occurs.
Best for: Direct payments to a single party — where the full amount belongs to one sub-account and you'll handle distribution later via the Transfer API.
If you omit additionalInfo.account entirely, the payment is not routed to any sub-account. DOKU will auto-settle the funds directly to the merchant's main bank account at H+1. This is normal non-SAC payment behavior.
Warning: If you send an invalid
account.id(e.g., account number instead of profileId), the API will NOT return an error. The payment succeeds but the transaction needs to be resolved manually by the ops team. Always validate thataccount.idis a valid profileId (format:SAC-xxxx-xxxxxxxxxxxxx) before sending.
Split Rules
Split rules automate how incoming funds are distributed. Once configured, every qualifying transaction is split at settlement — when funds move from Pending IDR to Merchant IDR.
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
Important: The split is calculated on the net amount after PG fees, not the gross customer payment.
Setup:
Add rules — specify the type (percentage or flat), the value, and the destination account
Call the Split Rules API — DOKU saves the rule and returns a
splitRuleIdPass
splitRuleIdinadditionalInfowhen accepting payments
The payment first lands in DOKU_MERCHANT_PENDING_IDR, held and not yet split. At settlement the PG fee is deducted, the rule is applied to the net amount, and each destination receives a SPLIT_TRANSACTION credit into DOKU_MERCHANT_IDR — where it becomes payable.
Split shares are not visible at payment time. Until settlement completes, the funds sit unsplit in Pending IDR, so a seller checking their balance right after a customer pays will not see their share yet.
Warning: If you pass an invalid
split_rule_id, the API will NOT return an error. The payment will land in the sub-account without any splitting applied. Always validate yoursplit_rule_idbefore sending.
Settlement: Funds from Checkout/Direct API land in
DOKU_MERCHANT_PENDING_IDRfirst. After settlement, they move toDOKU_MERCHANT_IDRand become available for payout.
Payout to Bank
Pay out funds to any of 100+ Indonesian bank accounts via Transfer Inquiry → Transfer Payment.
BI_FAST
Indonesia's real-time payment rail (default)
ONLINE
Standard online bank transfer
Step-by-Step Integration
Register a Sub-Account —
POST /sub-account/v2.0/register→ save theprofileIdCreate a Split Rule —
POST /sub-account/v2.0/split-rules→ save thesplitRuleIdAccept Payment — Include both IDs in
additionalInfowhen calling Checkout API or Direct APIWait for Settlement — Funds move from
DOKU_MERCHANT_PENDING_IDRtoDOKU_MERCHANT_IDR, split rule appliedPayout — Transfer Inquiry → Transfer Payment to bank account
Last updated
Was this helpful?
