Coretax DJP for Developers: e-Faktur, e-Bupot & NPWP Integration

Photo by Government of Russia via Wikimedia Commons (Public domain)
Coretax DJP is Indonesia's new core tax administration system from the Direktorat Jenderal Pajak, launched on 1 January 2025. It consolidates taxpayer registration, e-Faktur (VAT invoicing), e-Bupot (withholding certificates), payments, and SPT filing into a single platform, replacing DJP Online and the separate legacy applications.
The 15-digit NPWP is superseded by a 16-digit format under PMK-136/PMK.03/2023. For resident individuals the 16-digit NPWP is the NIK on the KTP. For entities and old NPWPs, you convert by adding a single '0' in front to reach 16 digits. Store it as a string so the leading zero is never lost.
NSFP is now auto-generated by Coretax when an invoice is successfully submitted and electronically signed, so you no longer request numbers in advance via e-Nofa. The format is 17 digits: a 2-digit transaction code, 2-digit status code, and a 13-digit serial. The number only exists after a successful server response, not at draft time.
Coretax uses a new XML scheme for bulk import of output invoices, withholding certificates, and SPT attachments. The old legacy import formats are no longer accepted. DJP publishes official XML templates and an Excel-to-XML converter on pajak.go.id, and your ERP export must conform to that schema and validate before upload.
DJP is building API interoperability with external entities, but the realistic day-one options for most SMEs are manual XML upload, the Excel-to-XML converter, or automating through a licensed DJP partner (PJAP/ASP). Start with a well-built DJP XML export and move to a partner API once your invoice volume justifies the recurring cost.

Photo by Government of Russia via Wikimedia Commons (Public domain)
Key Takeaway
Coretax DJP is Indonesia's single core tax platform that replaced DJP Online, e-Faktur, and e-Bupot from January 2025. For developers the big shifts are: NPWP is now a 16-digit ID (NIK for individuals), tax invoice numbers are auto-generated as 17 digits, and all imports use a new XML schema. Build your ERP export to match that XML, not the legacy format.
If you build or maintain ERP, accounting, or fintech software for the Indonesian market, Coretax DJP is the single biggest tax-integration change in a decade. Rolled out by the Direktorat Jenderal Pajak (DJP) on 1 January 2025, it merges taxpayer registration, VAT invoicing (e-Faktur), withholding certificates (e-Bupot), payments, and SPT filing into one system. The old separate applications you may have integrated against are being phased out.
I recently helped an Indonesian client migrate their invoicing pipeline off legacy e-Faktur onto Coretax, and the pain was almost never conceptual — it was data format, tax IDs, and timing. This post walks through what actually changed and what you must handle in code.
The most fundamental schema change is the tax ID itself. Under PMK-136/PMK.03/2023, the 15-digit NPWP is replaced by a 16-digit format. For resident individuals, the 16-digit NPWP IS the NIK (the national ID number on the KTP). For companies, government bodies, and non-resident individuals still on the old 15-digit NPWP, you migrate by simply prefixing a '0'. That sounds trivial until you realise every foreign-key column, unique index, validation regex, and printed document in your system assumed 15 digits.
Do not store the NPWP as an integer or trim leading zeros anywhere. A 16-digit NPWP built from an old 15-digit one always starts with '0', and a NIK can too. Treat it as a fixed-length string end to end, or your leading zeros silently vanish on the first JSON round-trip.
// Normalise a legacy 15-digit NPWP to the 16-digit Coretax format
// Individuals: use the 16-digit NIK directly.
// Entities / old NPWP: left-pad with a single "0".
function toCoretaxTaxId(raw: string): string {
const digits = raw.replace(/\D/g, ""); // strip dots, dashes, slashes
if (digits.length === 16) return digits; // already NIK / new NPWP
if (digits.length === 15) return "0" + digits; // legacy NPWP -> 16 digit
throw new Error(`Unexpected tax ID length: ${digits.length}`);
}
// ALWAYS keep it a string. Never: parseInt(npwp)
const TAX_ID_COLUMN = "VARCHAR(16) NOT NULL";In the legacy world you requested a batch of Nomor Seri Faktur Pajak (NSFP) up front via e-Nofa, stored them, and consumed one per invoice. That workflow is gone. Under PER-11/PJ/2025 (effective 22 May 2025), Coretax auto-generates the serial number when an invoice is successfully submitted and electronically signed. The number is now 17 digits: a 2-digit transaction code, a 2-digit status code, then a 13-digit serial (2-digit year plus an 11-digit sequence).
For developers this is actually simpler — you stop managing an NSFP inventory and reconciling unused numbers. But it inverts your flow: the tax number no longer exists at draft time, only after a successful server round-trip. If your UI or PDF template printed the NSFP before submission, that assumption is now broken.
Also note e-Faktur Desktop numbers are auto-adjusted: DJP inserts a '9' at the 5th digit position to convert a legacy 16-digit NSFP into the Coretax 17-digit form. If you cross-reference invoices between old and new records, store both representations rather than trying to transform on read.
Coretax uses a new XML scheme for bulk import of output invoices (faktur keluaran), withholding certificates (bukti potong), and SPT attachments. The old CSV/import formats from legacy e-Faktur are no longer accepted. DJP publishes the official XML templates plus an Excel-to-XML converter on pajak.go.id, and this is the contract your ERP export must satisfy.
The pragmatic pattern most Indonesian ERP teams have landed on: keep your internal invoice model as-is, add a serialiser that maps it to the DJP XML template, and treat Coretax as an outbound integration target. Validate against DJP's schema before upload — a single malformed field rejects the whole batch, and Coretax error messages during 2025 were notoriously terse.
<!-- Simplified shape of a Coretax output-invoice XML row.
Get the authoritative template + XSD from pajak.go.id before coding. -->
<TaxInvoice>
<TaxInvoiceDate>2026-07-10</TaxInvoiceDate>
<TrxCode>04</TrxCode> <!-- 2-digit transaction code -->
<BuyerTin>0012345678901234</BuyerTin> <!-- 16-digit NPWP / NIK -->
<BuyerDocument>TIN</BuyerDocument>
<GoodService>A</GoodService>
<ItemName>Jasa konsultasi</ItemName>
<Qty>1</Qty>
<Price>10000000</Price>
<TaxBase>10000000</TaxBase>
<VATRate>12</VATRate> <!-- rate is explicit: 11 or 12 -->
<VAT>1200000</VAT>
</TaxInvoice>
<!-- NSFP is NOT sent here; Coretax assigns it on successful sign. -->Coretax's early-2025 launch was rough — login failures, tax-invoice save errors, and facial-validation problems for digital certificates delayed real invoicing. In response DJP issued KEP-54/PJ/2025, keeping the legacy systems live alongside Coretax so taxpayers could fall back to the more stable path during the transition. For integrators this means you cannot assume a single source of truth for part of 2025-2026: some counterparties issue from Coretax, some still from legacy.
DJP is building API interoperability with dozens of external entities to exchange standardised data — but a general-purpose public host-to-host API you can freely self-serve is not the realistic day-one path for most SME builders. The three practical routes, from cheapest to most automated:
| Approach | How it works | Best for |
|---|---|---|
| Manual XML upload | Export from ERP to DJP XML template, upload in Coretax UI | Low volume, minimal dev budget |
| Excel-to-XML converter | Map ERP output to DJP's Excel template, convert to XML, upload | Mid volume, finance-team driven |
| DJP-partner API (PJAP/ASP) | Third-party licensed provider automates submission from your app | High volume, real-time invoicing |
For most Indonesian SMEs I advise starting with the DJP XML export and moving to a licensed PJAP/ASP partner only once invoice volume justifies the recurring cost. Build the XML serialiser well and it becomes reusable whichever partner you pick later.
The bottom line for developers: Coretax is not just a new URL. It changes your tax-ID data type, removes your NSFP inventory logic, and swaps your export format to XML. Handle those three correctly and the migration is manageable; ignore any one and you will ship silently wrong invoices.