[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:
| Document | MH code | document_type | invoice_type | Buyer |
|---|---|---|---|---|
| Factura | 01 | ticket | debit | Final consumer or business. Prices include VAT. |
| Comprobante de Crédito Fiscal (CCF) | 03 | invoice | debit | Taxpayer 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
NITand yourNRC. - Economic activity:
category_code, the MH activity code (for example62090). Brinta sends its description. - Address:
address_line_1,stateandmunicipality_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 exampleP001) asinvoice_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" }terms | Sent to Tax Authority |
|---|---|
net 30 | 30 days |
net 2 months | 2 months |
net 1 year | 1 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.
type | MH code | Use |
|---|---|---|
NIT | 36 | Companies and taxpayers. Required on a CCF. |
DUI | 13 | Salvadoran individuals. |
passport | 03 | Foreign individuals. |
resident card | 02 | Foreign residents. |
other | 37 | Final 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.type | MH condition |
|---|---|
cash | 1 (contado) |
credit | 2 (crédito) |
payment_methods[].type | MH code |
|---|---|
cash | 01 |
debit card, digital wallet | 02 |
credit card | 03 |
bank transfer | 05 |
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
| Field | Notes |
|---|---|
amount | Line amount before discount and without VAT, on both documents. |
quantity | Defaults to 1. |
categories[] with list = type | goods or services. |
categories[] with list = unit | MH unit of measure code, for example 59 (unit) or 99 (other). |
taxes[] | VAT 13%: type = VAT, rate = 0.13. |
item_external_id | Your 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:
| Field | What it is |
|---|---|
id / uuid | Brinta's ID. In upper case it is the DTE's código de generación. |
invoice_key | MH control number, for example DTE-03-M001P001-000000500000008. |
| The printable representation. | |
| JSON file | The signed DTE that MH received. In El Salvador this JSON is the legal document; there is no XML. |
| Verification URL | MH'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
| Reason | Fix |
|---|---|
Missing payment_model | Send payment_model.type. |
| CCF to a final consumer | Use a Factura, or send the buyer's NIT and NRC. |
| Missing distrito | Send a 4-digit municipality_code. |
| Credit sale without a term | Send payment_model.terms, for example net 30. |
| Buyer ID type not recognized | Use a type from Buyer ID type. |
Updated 1 day ago
