[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.

FieldValue
document_typeinvoice
invoice_typedebit
invoice_serie4 characters starting with F (e.g. FABC)
invoice_numberCorrelative, 1 to 8 digits, no leading zeros
e_invoicetrue
currencyPEN, or another currency with exchange_rate

Field by Field

Root Level

invoice_serie and invoice_number

The 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

Issue date, YYYY-MM-DD.

⚠️

SUNAT date window

The 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

The 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.

reasonUse it for
0101Domestic sale (the usual case)
0112Domestic sale supporting deductible expenses of an individual
0200 – 0208Exports of goods or services
0401Sales to non-residents that don't qualify as exports
2001Operation subject to percepción. See Percepciones

Full list in Invoice reasons → PE.

payment_model and invoice_due_date

Decide 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

PEN 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

Adds 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 2007 is required when an item is under IVAP.
  • The note can be up to 200 characters, with no line breaks or tabs.

purchase_order_number

The buyer's purchase or service order number (Orden de compra). Up to 20 alphanumeric characters. Informative only.

payment_methods[]

How the buyer pays and, for credit sales, the installments. See Payment Terms.


buyer

FieldWhat to send
buyer.company.nameBuyer's name.
buyer.company.legal_nameBuyer's legal name (Razón social). Printed on the document.
buyer.company.typebusiness
buyer.company.emailOptional. Buyer's email.
buyer.company.tax_registrations[]{ "type": "RUC", "number": "<11 digits>", "level": "country", "location": "PE" }
buyer.company.address.address_line_1Street and number.
buyer.company.address.address_line_2Optional. Urbanization or additional address line.
buyer.company.address.neighborhoodOptional. District.
buyer.company.address.cityCity or province.
buyer.company.address.stateDepartment, as an ISO 3166-2 code (e.g. PE-LIM).
buyer.company.address.municipality_codeOptional. Ubigeo: the 6-digit INEI district code (e.g. 150132). Not a postal code.
buyer.company.address.countryPE, or the buyer's country for exports.

Which ID the buyer can have

Operation type (reason)Accepted buyer ID
Most operations, including 0101RUC 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[]

FieldWhat to send
nameItem name.
descriptionOptional. Added after the name on the document (name - description).
quantityQuantity.
unit_amountUnit value before taxes, discounts and charges.
amountLine value before taxes (quantity × unit_amount).
external_item_idOptional. 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).

FieldWhat to send
namediscount or charge
typeDiscount or charge code. Item level: 00, 01, 47, 48. Document level: 02, 03, 45, 46, 49, 50.
rateFactor applied, e.g. 0.10 for 10%.
amountThe discount (negative) or charge (positive) amount.
taxable_amountOptional. Base the factor was applied to.
adds_to_final_amounttrue
"amounts": [
  { "name": "discount", "type": "00", "rate": 0.10, "amount": -100, "taxable_amount": 1000, "adds_to_final_amount": true }
]

relations[] — Guías de Remisión

To reference the Guía de Remisión that moved the goods, add one entry per guía:

FieldWhat to send
document_typetransport
invoice_typetransport
invoice_idThe Brinta ID of the guía, if it was issued through Brinta.
invoice_serie, invoice_numberThe guía's series and number, if it wasn't issued through Brinta.
e_invoicetrue 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).


Did this page help you?