API Issuing

Issue invoices programmatically by integrating Brinta with your system or ERP — automated, real-time, and scalable.

API invoice creation is used when you need to issue invoices programmatically by integrating Brinta with your system or ERP.

This option is ideal when you:

  1. Want to automate invoice issuance
  2. Issue invoices in real time from your own system
  3. Work with large or continuous invoice volumes
  4. Need a scalable and fully integrated solution

With API invoice creation, you can:

  1. Send invoice data directly to Brinta via API
  2. Issue invoices without using the dashboard
  3. Handle multiple document types programmatically
  4. Receive real-time responses and validation results

This method follows the same validation rules as manual and bulk invoicing, including country-specific electronic invoicing requirements.


How it works

All invoice creation goes through a single endpoint:

POST https://api.brinta.com/invoices

The payload structure is the same across all countries and document types. What changes is which fields are required depending on the country and document type you're issuing.

The general flow is:

  1. Authenticate — include your API key in the request header.
  2. Build the payload — set invoice_type, document_type, and the fields required for your country.
  3. Send the request — Brinta validates, stamps, and returns the signed document.
  4. Handle the response — check the status and store the invoice ID and fiscal UUID returned.

Payload structure

Every request shares the same root structure:

FieldTypeRequiredDescription
supplier_company_idstringYesUUID of the issuing company registered in Brinta.
invoice_typestringYesType of document. Possible values: debit, payment, transport.
document_typestringYesSpecific document format. Varies by country — see Invoice Document Types.
invoice_datestringYesIssuance date in YYYY-MM-DD format.
invoice_seriestringVariesInvoice series or prefix.
invoice_numberstringVariesInvoice number or folio.
currencystringYesISO 4217 currency code (e.g. MXN, PEN, COP).
exchange_ratenumberVariesRequired when currency is not the country's local currency.
e_invoicebooleanYesSet to true to issue as an electronic invoice.
reasonstringVariesUsage or transport reason code. Country-specific SAT/SUNAT catalog.
export_reasonstringVariesExport or transfer reason. Required for MX transport documents.
fiscal_statusstringVariesFiscal object code. Required for MX payment invoices (SAT c_ObjetoImp).
additional_infostringNoFree-text field appended to the document. Used for PE transport.
payment_methodobject or arrayVariesPayment method(s). Required for MX payment invoices. Send a single object, or an array of objects to split payment across multiple methods — see payment_method structure below.
buyerobjectYesBuyer information including tax registrations and address.
itemsarrayVariesLine items. Required for standard invoices.
sendersarrayVariesOrigin locations. Required for MX and PE transport documents.
beneficiariesarrayVariesDestination locations. Required for MX and PE transport documents.
transportation_companiesarrayVariesDrivers, owners, and carriers. Required for MX and PE transport documents.
vehicleobjectVariesVehicle information. Required for all transport documents.
amountsarrayVariesDocument-level payment amounts. Required for MX Payment Invoice Mode A.
taxesarrayVariesDocument-level taxes. Required for MX Payment Invoice Mode A.
relationsarrayVariesRelated documents. Used for MX payment invoices and PE transport.

payment_method structure

payment_method accepts either a single object (as before) or an array of objects with the same shape, to split an invoice's payment across multiple methods (e.g. part bank transfer, part credit card).

FieldTypeRequiredDescription
typestringVariesType of payment method. Possible values: credit card, debit card, digital wallet, bank transfer, cash.
namestringNoName of the payment method.
binintegerNoBIN of the credit/debit card used for the transaction.
last4integerNoLast 4 digits of the credit/debit card used for the transaction.
installmentintegerVariesSAT NumParcialidad — installment number being paid (e.g. "this is installment #3"). Used for MX Payment Invoice (Complemento de Pago).
bank_accountobjectNoBank account details (bank_name, account_number, account_number_alt, address.country).
payment_modelobjectNotype (credit or cash) and terms (e.g. net 30) describing how the transaction is settled.
codestringNoCode of the payment method.
amountnumberNoAmount paid with this payment method.
due_datestringNoDue date for this payment method.
installmentsintegerNoTotal number of installments for this payment method (e.g. a card paid in 2 installments). Not the same as installment above.
bank_account_beneficiaryobjectVaries (if object present)Bank account of the payment beneficiary: account_id, account_number (required), bank_name, account_type, account_number_alt, swift_code, address.country, and beneficiary.company (required) — type, address (country, state, city, all required), name, legal_name, email, external_id, tax_registrations[], physical_address.
bank_account_senderobjectVaries (if object present)Same shape as bank_account_beneficiary, for the sender's bank account (sender.company instead of beneficiary.company).

Example — single payment method (unchanged):

"payment_method": {
  "type": "credit card",
  "name": "Visa",
  "bin": 400344,
  "last4": 5563
}

Example — multiple payment methods:

"payment_method": [
  {
    "name": "bank account",
    "type": "bank transfer",
    "code": "03",
    "amount": 1000,
    "due_date": "2026-08-20",
    "installments": 1,
    "bank_account_sender": {
      "bank_name": "aaa",
      "account_number": "123456"
    }
  },
  {
    "name": "VISA",
    "type": "credit card",
    "code": "03",
    "amount": 2000,
    "due_date": "2026-08-20",
    "installments": 2
  }
]

Authentication

Include your API key in every request:

curl --request POST \
  --url https://api.brinta.com/invoices \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{...}'

Document types by country

CountryDocumentinvoice_typedocument_type
ALLStandard Invoicedebitinvoice
MXPayment Complementpaymentpayment invoice
MXBill of Lading — Roadtransportbill of lading road
MXBill of Lading — Airtransportbill of lading air
MXBill of Lading — Seatransportbill of lading sea
MXBill of Lading — Railtransportbill of lading rail
PETransport (Guia de Remision)transporttransport

For a complete list see Invoice Document Types.


Response

A successful request returns 201 with the created invoice object, including:

  • id — Brinta invoice UUID
  • invoice_key — Fiscal UUID (folio fiscal) stamped by the tax authority
  • status — Current invoice status
  • xml / pdf — Signed document links (where applicable)

For error codes and status descriptions see Invoice Status Codes and Invoice Errors.


Useful Links

Response

A successful request returns 201 with the created invoice object: id (Brinta UUID), invoice_key (fiscal UUID / folio fiscal), status, and xml/pdf signed document links where applicable.

Credit Notes (all countries)

Credit notes follow the same logic across all countries Brinta supports. A credit note is created by sending invoice_type: "credit" and referencing the original invoice being credited via original_invoice_id or original_invoice_external_id. See Credit Notes for the full field reference, including the multi-company origin_company_id case.

Country specifics

CountryWhat exists today
MexicoStandard invoice, payment invoice, 4 bill-of-lading (carta porte) transport modes, withholding invoice, ClaveProdServ, full CFDI 4.0 testing reference
PeruTransport (guía de remisión), standard invoice, credit notes
ColombiaAPI issuing guide
ArgentinaStandard invoices, credit/debit notes (FCE MiPyme), export invoice (Factura E)
UruguayWithholding codes, ticket / invoice / e-Resguardo payload examples
BrazilNFSe (prefeitura-based), full Reforma Tributária sub-tree (API/bulk/manual changes, CST/cClassTrib codes, operation indicator codes, NBS codes)
ChileInvoice and ticket payload examples
PanamáInvoice and export invoice payload examples
Dominican Republic

Did this page help you?