[SV] Factura and Crédito Fiscal Payload Examples

In El Salvador every sale is a DTE (Documento Tributario Electrónico) that the Ministerio de Hacienda (MH) certifies before it is valid. Brinta builds the DTE from your invoice, sends it for certification and returns the result in the same call. You don't need to poll or wait for a webhook.

This guide covers the two sale documents:

DocumentMH codedocument_typeinvoice_typeBuyer
Factura01ticketdebitFinal consumer or business. Prices include VAT.
Comprobante de Crédito Fiscal (CCF)03invoicedebitTaxpayer only, with NIT and NRC. Prices exclude VAT.

📚 API reference: Create a company · Create an invoice · Get an invoice

Before you start

Your company (the issuer) must be set up in Brinta with:

  • Tax registrations: your NIT and your NRC.
  • Economic activity: category_code, the MH activity code (for example 62090). Brinta sends its description.
  • Address: address_line_1, state and municipality_code (see Address).
  • Establishment and point of sale: your account manager registers your MH establishment code (for example M001). Send your point of sale (for example P001) as invoice_serie.
  • Email and phone: required by MH on the issuer.

Currency is always USD.

Factura (01)

On a Factura, items[].amount is still the line amount without VAT. Brinta adds the VAT to the price shown on the document, because a Factura shows prices with VAT included.

Cash sale to a business

{
  "e_invoice": true,
  "currency": "USD",
  "supplier_company_id": "{{company_id}}",
  "invoice_date": "2026-10-14T20:42:46Z",
  "invoice_serie": "P001",
  "document_type": "ticket",
  "invoice_type": "debit",
  "invoice_external_id": "{{invoice_external_id}}",
  "additional_info": "Order 1234",
  "payment_model": { "type": "cash" },
  "payment_methods": [{ "type": "cash" }],
  "buyer": {
    "company": {
      "type": "business",
      "legal_name": "Cliente Ejemplo, S.A. de C.V.",
      "email": "[email protected]",
      "category_code": "62010",
      "address": {
        "address_line_1": "Calle Principal 123",
        "state": "SV-SS",
        "municipality_code": "2005",
        "country": "SV"
      },
      "tax_registrations": [
        { "number": "06141811710015", "type": "NIT", "level": "country", "location": "SV" },
        { "number": "3328", "type": "NRC", "level": "country", "location": "SV" }
      ]
    }
  },
  "items": [
    {
      "name": "Consulting service",
      "item_external_id": "1",
      "quantity": 1,
      "amount": 100.00,
      "categories": [
        { "list": "type", "code": "services" },
        { "list": "unit", "code": "99" }
      ],
      "taxes": [
        { "name": "IVA", "type": "VAT", "rate": 0.13, "rate_type": "percentage", "amount": 13.00 }
      ]
    }
  ]
}

The DTE total is 113.00: the line shows 113.00 with VAT included, and the VAT (13.00) is reported on the line.

Final consumer (consumidor final)

Only a Factura (ticket) accepts a buyer without a real tax ID. Send the buyer with a tax registration of type other. legal_name is optional.

"buyer": {
  "company": {
    "type": "person",
    "email": "[email protected]",
    "address": {
      "address_line_1": "Calle Principal 123",
      "state": "SV-SS",
      "municipality_code": "2005",
      "country": "SV"
    },
    "tax_registrations": [
      { "number": "00000000", "type": "other", "level": "country", "location": "SV" }
    ]
  }
}

A CCF with this buyer is rejected.

Credit sale

Set payment_model.type to credit and the term in payment_model.terms. Without payment_methods, Brinta reports the whole total as a credit payment (MH code 13).

"payment_model": { "type": "credit", "terms": "net 30" }
termsSent to Tax Authority
net 3030 days
net 2 months2 months
net 1 year1 year

Comprobante de Crédito Fiscal (03)

A CCF is the document a taxpayer needs to deduct VAT. The buyer must have both NIT and NRC, and category_code. Line prices exclude VAT, and the VAT is shown once in the totals.

Cash sale

{
  "e_invoice": true,
  "currency": "USD",
  "supplier_company_id": "{{company_id}}",
  "invoice_date": "2026-10-14T20:43:07Z",
  "invoice_serie": "P001",
  "document_type": "invoice",
  "invoice_type": "debit",
  "invoice_external_id": "{{invoice_external_id}}",
  "payment_model": { "type": "cash" },
  "payment_methods": [{ "type": "cash" }],
  "buyer": {
    "company": {
      "type": "business",
      "name": "Cliente Ejemplo",
      "legal_name": "Cliente Ejemplo, S.A. de C.V.",
      "email": "[email protected]",
      "category_code": "62010",
      "address": {
        "address_line_1": "Calle Principal 123",
        "state": "SV-SS",
        "municipality_code": "2005",
        "country": "SV"
      },
      "tax_registrations": [
        { "number": "06141811710015", "type": "NIT", "level": "country", "location": "SV" },
        { "number": "3328", "type": "NRC", "level": "country", "location": "SV" }
      ]
    }
  },
  "items": [
    {
      "name": "Consulting service",
      "item_external_id": "1",
      "quantity": 1,
      "amount": 100.00,
      "categories": [
        { "list": "type", "code": "services" },
        { "list": "unit", "code": "99" }
      ],
      "taxes": [
        { "name": "IVA", "type": "VAT", "rate": 0.13, "rate_type": "percentage", "amount": 13.00 }
      ]
    }
  ]
}

Exempt sale

Send the VAT with rate and amount 0 and mark it exempt. Brinta reports the line under "ventas exentas" instead of "ventas gravadas".

"taxes": [
  { "name": "IVA", "type": "VAT", "rate": 0, "rate_type": "percentage", "amount": 0, "tax_treatment": "exempt" }
]

Split payment

Send one entry per payment method, each with its amount. The amounts must add up to the invoice total.

"payment_model": { "type": "cash" },
"payment_methods": [
  { "type": "cash", "amount": 13.00 },
  { "type": "credit card", "amount": 100.00 }
]

Field reference

Buyer ID type

tax_registrations[].type decides the MH ID type. There is no default: an unknown type makes the invoice fail.

typeMH codeUse
NIT36Companies and taxpayers. Required on a CCF.
DUI13Salvadoran individuals.
passport03Foreign individuals.
resident card02Foreign residents.
other37Final consumer without ID (Factura only).

Send NRC as an additional registration.

Payment condition and methods

payment_model is required on a Factura and a CCF. Without it, the invoice fails.

payment_model.typeMH condition
cash1 (contado)
credit2 (crédito)
payment_methods[].typeMH code
cash01
debit card, digital wallet02
credit card03
bank transfer05

Address

state is the ISO 3166-2 department code (for example SV-SS for San Salvador). Brinta translates it to the MH code.

municipality_code has 4 digits: the MH municipio (first 2) and the distrito (last 2). For example 2001 is municipio 20, distrito 01. MH rejects a document without the distrito, on both the issuer and the buyer.

Items

FieldNotes
amountLine amount before discount and without VAT, on both documents.
quantityDefaults to 1.
categories[] with list = typegoods or services.
categories[] with list = unitMH unit of measure code, for example 59 (unit) or 99 (other).
taxes[]VAT 13%: type = VAT, rate = 0.13.
item_external_idYour item code, up to 25 characters.

additional_info is sent as the document's observations (up to 500 characters).

Response

Certification is synchronous. When it succeeds the invoice status is created and Get an invoice returns:

FieldWhat it is
id / uuidBrinta's ID. In upper case it is the DTE's código de generación.
invoice_keyMH control number, for example DTE-03-M001P001-000000500000008.
PDFThe printable representation.
JSON fileThe signed DTE that MH received. In El Salvador this JSON is the legal document; there is no XML.
Verification URLMH's public lookup page for the document.

If MH or the provider rejects the document, the status is failed and the response carries the rejection reasons. Fix the data and send it again.

Common rejections

ReasonFix
Missing payment_modelSend payment_model.type.
CCF to a final consumerUse a Factura, or send the buyer's NIT and NRC.
Missing distritoSend a 4-digit municipality_code.
Credit sale without a termSend payment_model.terms, for example net 30.
Buyer ID type not recognizedUse a type from Buyer ID type.

Did this page help you?