The technical heart of BIR e-invoicing compliance for small businesses is the JSON invoice payload — the structured data format that every covered taxpayer’s system must produce and transmit to the Electronic Invoicing/Receipting System. Understanding the JSON schema is essential for developers building EIS integrations, finance managers reviewing system outputs, and anyone responsible for ensuring that their business’s e-invoices will be accepted by the BIR’s validation engine. E-Invoicing for Small Businesses helps organisations understand the technical requirements, prepare their systems, and maintain accurate digital invoicing records while meeting applicable compliance obligations.
This article provides a practical guide to the BIR’s JSON invoice format as specified in RMC 98-2026: what JSON is and why the BIR uses it, the structure of the schema, a field-by-field walkthrough of mandatory and conditional fields, common validation errors and what causes them, and best practices for testing your implementation against the schema before going live. It is designed for technical staff and developers working on EIS integration, as well as finance managers who need to understand what their system is actually transmitting.
Key Takeaways
- The BIR JSON schema is precise — field names are case-sensitive, date formats must be ISO 8601 (YYYY-MM-DD), and amount fields must use exactly two decimal places; a single formatting deviation causes the entire submission to be rejected by the BIR validation engine.
- Mandatory fields must be present in every submission regardless of transaction type; conditional fields are required only when certain conditions are met (e.g., the buyer TIN field is mandatory for VAT invoices but handled differently for cash sales without buyer identification).
- The invoice type code field is one of the most error-prone — using the wrong code (e.g., submitting an official receipt as a sales invoice, or a zero-rated transaction as a standard 12% VAT invoice) is a compliance error that cannot be corrected retroactively in the original submission.
- Pre-submission validation — checking your payload against the schema before the API call — is the single most effective quality control step in an EIS integration; implement it as a required step in your integration pipeline.
- The BIR updates the JSON schema through RMC addenda; your integration must be updated whenever the schema changes — a schema mismatch between your system and the current BIR specification causes systematic rejection of all submissions.
What Is JSON and Why Does the BIR Use It?
JSON (JavaScript Object Notation) is a lightweight, human-readable data format widely used for data exchange between systems over APIs. It organizes data as key-value pairs (similar to a two-column table of field name and value) nested inside curly braces, with arrays (lists of items) enclosed in square brackets. The BIR uses JSON for EIS submissions because it is the universally supported standard for REST API data exchange, is readable by both machines and humans, and can represent the hierarchical structure of an invoice (header fields at the top level, line items as an array of nested objects) clearly and consistently. E-invoicing software for Cebu City businesses can use structured JSON data to support accurate invoice submissions and integration with the BIR EIS.
For developers, the BIR JSON schema is a JSON Schema document — a specification that defines the exact structure, field names, data types, required fields, and validation rules for a valid EIS submission. Validating a candidate payload against the JSON Schema before submission catches format errors before they reach the BIR’s API.
High-Level Schema Structure
A BIR EIS JSON payload has three main sections: the invoice header (top-level fields that apply to the whole invoice), the line items array (one object per line item in the invoice), and the VAT summary (aggregated VAT amounts by rate, computed from the line items). A simplified structural outline:
1. Invoice Header
The invoice header contains fields that identify the invoice as a whole: the issuing taxpayer (seller TIN, name, address), the buyer (TIN, name, address), the invoice metadata (invoice number, date, invoice type code), and the invoice totals (total amount before VAT, total VAT amount, total amount due). These fields appear once per invoice, at the root level of the JSON object.
2. Line Items Array
The line items array contains one object for each line item on the invoice. Each line item object includes: a description of the goods or services, the quantity, the unit of measure, the unit price, the line amount (quantity multiplied by unit price), the VAT classification for that line item (standard-rated, zero-rated, or exempt), and the VAT amount for the line. An invoice with five distinct line items has five objects in the line items array.
3. VAT Summary
The VAT summary aggregates the line item amounts and VAT by VAT rate category. A standard business invoice has three possible VAT rate buckets: standard-rated (12%), zero-rated (0%), and VAT-exempt. The VAT summary shows the total taxable amount and total VAT amount for each applicable bucket, and the grand total. The sum of the VAT summary amounts must exactly equal the corresponding totals in the invoice header — a mismatch causes validation rejection. FreshBooks e-Invoicing in the Philippines can help businesses manage invoice records and organise financial data for their e-invoicing workflows.
Mandatory Fields: A Field-by-Field Guide
| Field Name | Data Type | Format / Constraints | Description |
|---|---|---|---|
| invoiceNumber | String | From PTI-authorized series; no duplicates | The invoice’s unique identifier within the authorized series |
| invoiceDate | String | ISO 8601: YYYY-MM-DD | The date the invoice is issued |
| invoiceType | String | BIR-defined type code (e.g., “SI” for Sales Invoice) | Classifies the invoice type for BIR processing |
| sellerTIN | String | Philippine TIN format (9–12 digits) | The issuing taxpayer’s BIR TIN |
| sellerName | String | Must match BIR-registered business name | The issuing taxpayer’s registered name |
| sellerAddress | String | Must match registered business address | The issuing taxpayer’s registered address |
| buyerTIN | String | Philippine TIN or foreign tax ID with country code | The buyer’s BIR TIN (required for VAT invoices) |
| buyerName | String | Buyer’s registered or legal name | The buyer’s name as it appears in their registration |
| lineItems | Array | At least one line item object | Array of line item objects (see below) |
| totalAmountDue | Number | Exactly 2 decimal places | Total amount payable including VAT |
| totalVATAmount | Number | Exactly 2 decimal places | Total VAT amount across all line items |
Line Item Object Fields
| Field Name | Data Type | Format | Notes |
|---|---|---|---|
| description | String | Free text, max 255 chars | Description of the goods or service |
| quantity | Number | Positive number, up to 6 decimal places | Quantity sold or billed |
| unitOfMeasure | String | BIR-defined UOM code | Unit of measure code from the BIR UOM reference list |
| unitPrice | Number | Exactly 2 decimal places | Price per unit before VAT |
| lineAmount | Number | Exactly 2 decimal places; = quantity × unitPrice | Total line amount before VAT |
| vatClass | String | “SR” (standard-rated), “ZR” (zero-rated), “EX” (exempt) | VAT classification for this line item |
| vatAmount | Number | Exactly 2 decimal places | VAT amount for this line item; must equal lineAmount × applicable rate |
Invoice Type Codes
The invoiceType field uses BIR-defined codes that classify each invoice for BIR processing and reporting. Using the wrong code is one of the most common EIS submission errors and creates regulatory misclassification that is difficult to correct retroactively. Businesses in the Automotive & Auto Components sector should ensure their invoicing systems apply the correct invoice classifications and maintain accurate transaction records.
| Invoice Type Code | Description | When to Use |
|---|---|---|
| SI | Sales Invoice | Sale of goods to any buyer |
| OR | Official Receipt | Sale of services to any buyer |
| SI-ZR | Zero-Rated Sales Invoice | Export sale of goods at 0% VAT |
| OR-ZR | Zero-Rated Official Receipt | Export sale of services at 0% VAT |
| SI-EX | Exempt Sales Invoice | Sale of VAT-exempt goods |
| CN | Credit Note | Reduction of a previously issued invoice |
| DN | Debit Note | Increase to a previously issued invoice |
| CA | Cancellation | Full cancellation of a previously issued invoice |
Common Validation Errors and Root Causes
1. Field Name Case Mismatch
JSON field names are case-sensitive. The BIR schema uses camelCase (e.g., “invoiceNumber”, “sellerTIN”, “vatAmount”). A submission using “InvoiceNumber”, “seller_tin”, or “VatAmount” will fail validation because these are treated as different fields from the expected field names. Review every field name in your integration mapping against the exact specification in RMC 98-2026.
2. Date Format Errors
The invoiceDate field must use ISO 8601 format: YYYY-MM-DD (e.g., “2026-10-15”). Common errors include using MM/DD/YYYY format (“10/15/2026”), DD-MMM-YYYY (“15-Oct-2026”), or including a time component. Any date format other than YYYY-MM-DD fails validation. Ensure your system’s date-to-string conversion produces ISO 8601 output.
3. Amount Rounding Errors
All amount fields require exactly two decimal places. A value of “1500” or “1500.1” is rejected — the correct format is “1500.00” or “1500.10”. Floating-point arithmetic in many programming languages can produce values like “1500.0000000001” due to binary representation imprecision. Use a decimal arithmetic library (not floating-point) for all invoice amount calculations, and explicitly round to two decimal places before serializing to JSON.
4. VAT Arithmetic Mismatch
The totalVATAmount in the header must exactly equal the sum of all vatAmount values across line items. The totalAmountDue must exactly equal the sum of all lineAmount values plus totalVATAmount. Any arithmetic mismatch — even one centavo — causes validation rejection. Compute all totals from the line item values; do not allow header totals to be entered independently of line items.
5. Missing Buyer TIN for VAT Invoice
For VAT sales invoices and official receipts, the buyerTIN field is mandatory. Retail transactions where the buyer’s TIN is not known require special handling: the BIR schema provides a mechanism for “walk-in” buyer transactions where buyer identification is not collected. Use the correct code for this scenario rather than leaving the buyerTIN field empty — an empty mandatory field fails validation.
Conclusion
The BIR JSON schema is not forgiving of approximate compliance — a single formatting deviation in a mandatory field causes the entire submission to be rejected. Developers must implement exactly specified field names, data types, and formats, and must test every invoice type against the schema in the sandbox environment before requesting EIS certification. Finance managers should understand the schema at a high level so they can interpret EIS rejection reports intelligently when integration issues arise after go-live. France Advintek helps businesses streamline e-invoicing operations and adapt to evolving digital invoicing requirements in France.
Nexright provides JSON schema implementation review, integration testing, and EIS certification preparation for covered taxpayers. Contact us for a technical consultation before your integration goes live.
Frequently Asked Questions
1. Where can I get the official BIR JSON schema file?
The official BIR JSON schema is published through your accredited provider as part of the EIS API documentation package. The BIR has made the schema available to accredited providers, who distribute it to their clients. Request the current version of the JSON schema document from your accredited provider along with the API integration guide. The schema version number should match the version referenced in the latest RMC addendum — confirm that your provider’s schema is current.
2. How do I handle line items that are a mix of VAT-exempt, zero-rated, and standard-rated on the same invoice?
Mixed-VAT invoices are fully supported by the schema — each line item carries its own vatClass code, and the VAT summary section aggregates the amounts by rate bucket. The totalVATAmount includes only the standard-rated VAT; the zero-rated and exempt amounts are summarized separately in the VAT summary but do not contribute to the VAT total. Ensure your integration handles the per-line vatClass assignment correctly and that the VAT summary aggregation logic correctly separates the three buckets.
3. Does the JSON schema change frequently? How do we keep our integration current?
The BIR has indicated that schema updates will be published through RMC addenda, with advance notice before implementation. Your accredited provider is responsible for monitoring BIR schema updates and updating their platform and pre-built connectors accordingly. For custom integrations, your development team must subscribe to BIR RMC notifications and update the integration mapping whenever the schema changes. A schema version mismatch that is not caught before it goes live causes systematic rejection of all submissions.
4. Can I add custom fields to the JSON payload for my own internal purposes?
Additional fields beyond the BIR specification are tolerated by some EIS API implementations (they are typically ignored by the BIR’s validation engine) but are not formally supported and carry risk. If an additional field happens to conflict with a field name the BIR adds in a future schema update, a submission that was previously accepted may fail. Best practice is to keep the EIS payload strictly to the BIR-specified fields and maintain any additional internal data in your own records, keyed by invoice number.
5. Our product descriptions contain special characters (ampersands, accented characters, etc.). Are these handled in JSON?
JSON natively supports Unicode and handles standard special characters correctly when the JSON is properly UTF-8 encoded. Ampersands (&), accented characters (é, ñ, etc.), and standard punctuation are all valid in JSON string fields. Ensure your system encodes the JSON payload as UTF-8 and that the API client sets the Content-Type header to “application/json; charset=utf-8”. Characters that require JSON escaping (such as double quotes within a string) must be properly escaped with a backslash (“description”: “100ml \”Premium\” Grade A”).
6. For a credit note, which fields reference the original invoice?
A credit note (invoiceType: “CN”) must include a reference to the original invoice being credited. The schema includes a relatedInvoiceNumber field for this purpose. Additionally, include the relatedInvoiceDate. The line items in the credit note should mirror the lines being credited (with negative amounts representing the credit), and the VAT amounts should be the corresponding negative values. An unlinked credit note — one without a valid relatedInvoiceNumber — is accepted by the EIS but is harder to reconcile during an audit.
7. How do I test my integration against the BIR schema before going live?
Your accredited provider operates a sandbox environment that uses the same JSON schema and validation engine as the production EIS. Transmit representative samples of every invoice type your business issues through the sandbox — sales invoices, official receipts, credit notes, mixed-VAT invoices, zero-rated invoices, and cancellations. Review the sandbox acceptance and rejection responses for each submission type. Fix all rejection errors before requesting EIS certification — certification testing uses the same validation, and a schema error that fails in sandbox will fail in certification.
Source by:
Image by Pexels

