[PE] Factura (01)
What is a Factura Electrónica?
A Factura Electrónica (SUNAT code 01) documents a sale to a buyer identified with a RUC. It's the document a business buyer uses to support tax credit and expenses.
| Field | Value |
|---|---|
document_type | invoice |
invoice_type | debit |
invoice_serie | 4 characters starting with F (e.g. FABC) |
invoice_number | Correlative, 1 to 8 digits, no leading zeros |
e_invoice | true |
currency | PEN, or another currency with exchange_rate |
Field by Field
Root Level
invoice_serie and invoice_number
invoice_serie and invoice_numberThe series (F + 3 alphanumeric characters) and the correlative number. Together they form the document ID, e.g. FABC-12346. See Series and Numbering.
invoice_date
invoice_dateIssue date, YYYY-MM-DD.
SUNAT date windowThe issue date can't be more than 3 calendar days before the day the document reaches SUNAT, and can't be more than 2 days in the future.
reason
reasonThe operation type (Tipo de operación). If you don't send it, the document is issued as 0101 (Venta interna). The operation type decides which buyers are accepted and whether a percepción block is required.
reason | Use it for |
|---|---|
0101 | Domestic sale (the usual case) |
0112 | Domestic sale supporting deductible expenses of an individual |
0200 – 0208 | Exports of goods or services |
0401 | Sales to non-residents that don't qualify as exports |
2001 | Operation subject to percepción. See Percepciones |
Full list in Invoice reasons → PE.
payment_model and invoice_due_date
payment_model and invoice_due_dateDecide whether the factura is Contado (cash) or Crédito (credit): payment_model.type (cash or credit) if you send it, otherwise invoice_due_date compared with invoice_date. See Payment Terms.
currency and exchange_rate
currency and exchange_ratePEN by default. For any other currency (e.g. USD) also send exchange_rate. Percepción amounts are always in soles (PEN), whatever the document currency.
additional_info
additional_infoAdds a legend (Leyenda) and a free-text note to the document. Format: the 4-digit legend code, a space, a dash, a space, then the note.
"additional_info": "2004 - Paquete turístico Cusco 5 días"- The legend codes are in Reference Codes → Legends.
- Brinta adds the amount-in-words legend (
1000), and the free-transfer legend (1002) on its own. Don't send those. - Legend
2007is required when an item is under IVAP. - The note can be up to 200 characters, with no line breaks or tabs.
purchase_order_number
purchase_order_numberThe buyer's purchase or service order number (Orden de compra). Up to 20 alphanumeric characters. Informative only.
payment_methods[]
payment_methods[]How the buyer pays and, for credit sales, the installments. See Payment Terms.
buyer
buyer| Field | What to send |
|---|---|
buyer.company.name | Buyer's name. |
buyer.company.legal_name | Buyer's legal name (Razón social). Printed on the document. |
buyer.company.type | business |
buyer.company.email | Optional. Buyer's email. |
buyer.company.tax_registrations[] | { "type": "RUC", "number": "<11 digits>", "level": "country", "location": "PE" } |
buyer.company.address.address_line_1 | Street and number. |
buyer.company.address.address_line_2 | Optional. Urbanization or additional address line. |
buyer.company.address.neighborhood | Optional. District. |
buyer.company.address.city | City or province. |
buyer.company.address.state | Department, as an ISO 3166-2 code (e.g. PE-LIM). |
buyer.company.address.municipality_code | Optional. Ubigeo: the 6-digit INEI district code (e.g. 150132). Not a postal code. |
buyer.company.address.country | PE, or the buyer's country for exports. |
Which ID the buyer can have
Operation type (reason) | Accepted buyer ID |
|---|---|
Most operations, including 0101 | RUC only |
0112 (deductible expenses of an individual) | DNI or RUC |
0200 – 0208, 0401 (exports, non-residents) | Any identity document, or none |
A RUC is exactly 11 digits and must exist in SUNAT's taxpayer registry. A DNI is exactly 8 digits.
items[]
items[]| Field | What to send |
|---|---|
name | Item name. |
description | Optional. Added after the name on the document (name - description). |
quantity | Quantity. |
unit_amount | Unit value before taxes, discounts and charges. |
amount | Line value before taxes (quantity × unit_amount). |
external_item_id | Optional. Your product code. |
categories[] with list: "unit" | Required. Unit of measure code, e.g. ZZ for services, NIU for units. See Units of Measure. |
categories[] with list: "SUNAT code" | Optional. SUNAT product code, 8 digits. Required by SUNAT for some goods. |
categories[] with list: "gtin" | Optional. GTIN / barcode. |
taxes[] | IGV and, when they apply, ISC and ICBPER. See Taxes: IGV, ISC and ICBPER. |
amounts[] | Optional. Item discounts and charges. See Discounts and charges. |
Brinta calculates the line subtotal, the unit price with taxes and the document totals from the items.
Discounts and charges
Send each discount or charge as an entry in amounts[], on the item (applies to that line) or at the root of the request (applies to the whole document).
| Field | What to send |
|---|---|
name | discount or charge |
type | Discount or charge code. Item level: 00, 01, 47, 48. Document level: 02, 03, 45, 46, 49, 50. |
rate | Factor applied, e.g. 0.10 for 10%. |
amount | The discount (negative) or charge (positive) amount. |
taxable_amount | Optional. Base the factor was applied to. |
adds_to_final_amount | true |
"amounts": [
{ "name": "discount", "type": "00", "rate": 0.10, "amount": -100, "taxable_amount": 1000, "adds_to_final_amount": true }
]relations[] — Guías de Remisión
relations[] — Guías de RemisiónTo reference the Guía de Remisión that moved the goods, add one entry per guía:
| Field | What to send |
|---|---|
document_type | transport |
invoice_type | transport |
invoice_id | The Brinta ID of the guía, if it was issued through Brinta. |
invoice_serie, invoice_number | The guía's series and number, if it wasn't issued through Brinta. |
e_invoice | true for an electronic guía (Guía de remisión remitente), false for a printed guía. |
Examples
Domestic sale on credit
{
"supplier_company_id": "{{company_id}}",
"invoice_type": "debit",
"invoice_date": "2026-11-03",
"invoice_due_date": "2026-11-06",
"document_type": "invoice",
"invoice_serie": "FABC",
"invoice_number": 12351,
"reason": "0101",
"currency": "PEN",
"e_invoice": true,
"payment_model": {
"type": "credit"
},
"buyer": {
"company": {
"name": "DEMO COMP",
"legal_name": "DEMO COMPANY 1",
"external_id": "123456789",
"type": "business",
"address": {
"address_line_1": "Las Gaviotas Avenue 2110",
"city": "LIMA",
"state": "PE-LIM",
"country": "PE",
"postal_code": "3500"
},
"tax_registrations": [
{
"number": "20123456678",
"type": "RUC",
"level": "country",
"location": "PE"
}
]
}
},
"items": [
{
"name": "Item Service 1",
"amount": 1000,
"unit_amount": 1000,
"quantity": 1,
"external_item_id": "external_123",
"taxes": [
{
"name": "IGV",
"type": "VAT",
"rate": 0.18,
"rate_type": "percentage",
"amount": 180,
"level": "country",
"location": "PE",
"adds_to_final_amount": true
}
],
"categories": [
{
"code": "ZZ",
"list": "unit"
}
]
}
]
}Credit sale in two installments
Same as above, with:
"invoice_due_date": "2026-12-03",
"payment_model": { "type": "credit" },
"payment_methods": [
{ "installments": 1, "amount": 590, "due_date": "2026-11-18" },
{ "installments": 2, "amount": 590, "due_date": "2026-12-03" }
]Cash sale
Same as the first example, with "payment_model": { "type": "cash" } (or invoice_due_date equal to invoice_date).
Updated 3 days ago
