Adocommerce Kit represents money as an integer amount plus an ISO currency code. For IDR, the currency exponent is 0: Money.of(125000n, "IDR") means Rp125.000, not Rp1.250,00.
Keep rupiah exact
import { Money } from "@adocommercekit/core"
const subtotal = Money.of(125_000n, "IDR")Use strings or integers at HTTP and database boundaries. Do not pass rupiah through binary floating-point arithmetic, divide by 100, or infer decimal precision from a generic frontend currency component. Format for display only after calculation.
The money and ledger model records discounts, shipping, tax, payment-specific charges, and other effects as ordered adjustments. PPN is therefore persisted evidence, not a total silently recomputed when an old order is read.
Register the PPN calculator
pnpm add @adocommercekit/id
node ace configure @adocommercekit/id
node ace migration:runimport { ppnCalculator } from "@adocommercekit/id"
taxes: {
calculators: {
indonesia_ppn: ppnCalculator(),
},
}The calculator returns no lines for a non-ID address. For Indonesian lines it records:
- the statutory rate and regulation label;
- ordinary or
ppn_luxurycategory; - DPP numerator and denominator;
- taxable net, computed DPP, and tax amounts;
- inclusive or exclusive price mode;
- half-up rupiah rounding; and
- an explicit
ppnbmIncluded: falseboundary.
The default ordinary-goods calculation uses the PMK 131/2024 statutory rate and DPP fraction implemented by the package. A ppn_luxury category changes the DPP fraction used for PPN evidence; it does not calculate PPnBM.
Inclusive and exclusive pricing
Choose one price mode deliberately for each host price list:
- Exclusive: tax is calculated from the line net amount and added as an adjustment.
- Inclusive: tax is extracted from the customer-facing amount and the persisted evidence records both taxable net and tax.
Do not switch modes during order display or invoice generation. The order adjustment is the historical result; changes to rates or catalog classification apply to a new calculation, not an already placed order.
Export monthly audit evidence
node ace commerce:id:ppn-audit --month 2026-08The CSV reconciles persisted tax adjustments by placed order and includes the schema version, order state, category, price mode, statutory rate, DPP fraction, computed DPP, tax amount, currency, and regulation. Generation fails if adjustment metadata does not reconcile with the stored tax amount.
Treat the export as engineering and accounting evidence, not a tax filing. The host remains responsible for taxable-person status, product classification, invoices, credits, returns, filing periods, certified e-Faktur/Coretax integration, and legal interpretation.
Launch checks
- Test representative inclusive and exclusive lines with the merchant’s accountant-approved expected results.
- Include discounts, shipping, returns, refunds, and rounding boundaries in reconciliation fixtures.
- Confirm every Indonesian amount is stored and serialized as exponent-0 IDR.
- Generate the audit CSV for a controlled month and reconcile it to persisted order adjustments.
- Document PPnBM and Coretax as host-owned integrations unless separately implemented and reviewed.
Continue
- Review the full money and adjustment ledger.
- Configure payments for Indonesia.
- Add shipping, regions, and address validation.
- Read stability and compatibility before depending on the audit schema.