Create an invoice

Create an invoice

Body Params

Creates an invoice, or a credit or debit note.

  • Invoices (invoice_type debit, purchase, payment, transport, payroll or withholding): buyer is required.
  • Credit and debit notes (document_type credit note, debit note and their variants): send reason plus one of original_invoice_id, original_invoice_external_id or referenced_invoice, or send without_invoice: true.

Amounts and totals are calculated by Brinta from items; top-level amount and final_amount are not accepted.

string
enum
required

The type of invoice. It can be "debit", "credit" (for credit notes), "support_document" (for purchasing invoices), "transport" (for transport invoices), "payment" for (Payment Invoices, e.g.: "Complementos de Pago in MX")

Allowed:
buyer
object

Information of the buyer. Only one of company_id, company_external_id, company can be sent.

string

Document type as named by the tax authority or provider, e.g. "FACTURA A" (AR) or "RPS" (BR).

string
required

Type of the invoice document. See possibles values in Invoice document types

boolean
Defaults to false

Boolean to indicate if the invoice will be processed electronically through the tax authority. If not sent, default to TRUE

date

Start of the billing period the invoice covers. Format: YYYY-MM-DD.

date

End of the billing period the invoice covers. Format: YYYY-MM-DD.

string

Alternative invoice serie, e.g. the RPS serie for an NFS-e in Brazil.

string

Alternative invoice number, e.g. the RPS number for an NFS-e in Brazil.

date

Date the invoice was created in the client's system. Format: YYYY-MM-DD.

date

Date the invoice was last updated in the client's system. Format: YYYY-MM-DD.

string

Reason for creating the document. See possibles values in Invoice reasons

string

When the document_type is export, credit note exports, or debit note exports. See values in Invoice reasons

string
enum

Language of the invoice in ISO 639 code. Whenever local regulations allow it, the invoice will be created with sent language. If not sent, it will use the default language of buyer's country.

Allowed:
string

Company id of the supplier in Brinta's system. Create a new company in the company section. If not sent, the supplier will be Brinta's client.

string

Company id of the supplier in the Client's system.

string

When sending INBOUND, OUTBOUND base types. The key number of the invoice on the tax authority's system (CHAVE, CUFE, etc)

string

Id of the accounting account on the client's system. See the Accounts API.

string

Id of the cost or profit center on the client's system.

string

ID of the invoice being referenced.

string

ID of the invoice being referenced in client's system

string

Identifier of an original invoice that was not issued through Brinta. For credit and debit notes, an alternative to original_invoice_id and original_invoice_external_id.

string

Date of the invoice (UTC by default)

date

Payment date of the invoice. Format: YYYY-MM-DD.

date

In Accounting, entry date of the invoice. Format: YYYY-MM-DD.

date

The invoice due date (UTC by default). Format: YYYY-MM-DD.

string
required

The currency code of the invoice amount. It can be the local currency or international_currency set for the supplier. See possible values in Country Coverage and currencies

float

The exchange rate from the currency to the international currency set for the supplier.

string

The ID of the transaction in the client's system.

string

Additional information regarding the invoice.

string

For Mexico, used for 'objetoImpuesto'.

number

Amount already paid on the invoice.

number

Discount applied to the overall invoice

boolean

Set to true to issue a credit or debit note that does not reference an original invoice.

payment_methods
array of objects

Array of payment methods used for the transaction.

payment_methods
payment_method
object

The payment method used for the transaction.

items
array of objects
length ≥ 1

Array of items of the invoice

items

Array of items of the invoice

string

Description of the item

number

Absolute value of discount applied to amount.

string
required

Name of the item.

number
required

Amount of the item after applying discounts excluding taxes.

number

Unit price of the item. If amount sent, unit_amount will exclude taxes. If final_amount is sent, unit_amount will include taxes.

number

FOR BRAZIL. Amount of the freight.

number

FOR BRAZIL. Amount of the insurance.

number

FOR BRAZIL. The amount of the product with ICMS included and BEFORE discount.

number

FOR BRAZIL. Amount for other expenses.

number

Unconditional discount amount of the item.

number

Conditional discount amount of the item.

number

Quantity of the item

string

ID of the item in client's system.

string

In Accounting, Account number associated with the invoice

string

ID of the item being referenced

string

ID of the item being referenced in client's system

taxes
array of objects
length ≥ 0

Array of taxes of the item.

taxes
cst
object

For Brazil, situação tributária

string

Additional information regarding the invoice.

number

Amount of the item after applying discounts including taxes.

string

FOR BRAZIL. Freight Indicator

categories
array of objects

Categories of the item, as code and list pairs. Check Product Categories - e-Invoicing. For Mexico transport documents (Carta Porte) it also carries item attributes; supported list values: weight unit, gross weight, net weight, tare weight, pieces, weight kg, sender id, beneficiary id.

categories
amounts
array of objects

Document-level payment amounts. Used for Mexico Payment Invoice (Complemento de Pago) Mode A, where the client calculates all totals. Not required for Mode B.

amounts
string

Company id in Brinta's system of the supplier of the original invoice. Only sent when the supplier of the original invoice is different from the company holder of the token.

relations
array of objects

Related documents. Used in two contexts: (1) MX Payment Invoice (Complemento de Pago) — links payment events to the original invoices being settled, with two levels of nesting (relations[].relations[]). (2) Peru transport (Guia de Remision) — references related invoices or transport documents from the same or different supplier. To reference an existing invoice, send only invoice_id or invoice_external_id plus relation_reason. To create the related invoice inline, send any other field: it accepts the same fields as the main request body.

relations
string

Company id in the Client's system of the supplier of the original invoice. Only sent when the supplier of the original invoice is different from the company holder of the token.

email_invoice
object

Email delivery options for the invoice.

string

Purchase order Number linked to the invoice

transportation_companies
array of objects

Information about the transport figures (drivers, owners, and carriers). Used for bill of lading (Carta Porte) and Peru transport documents.

transportation_companies
vehicle
object

Vehicle information for transport documents (bill of lading and Peru transport). Structure varies by transport type.

beneficiaries
array of objects

Information of the beneficiaries.

beneficiaries
senders
array of objects

Information of the senders.

senders
string
enum

When storing invoice and not issuing a new one. Possible values "inbound", "outbound"

Allowed:
string

The serie of the invoice. Also used for the point of sale.

string

The number of the invoice.

amounts
array of objects

Document-level payment amounts. Used for Mexico Payment Invoice (Complemento de Pago) Mode A, where the client calculates all totals. Not required for Mode B.

amounts
taxes
array of objects

Document-level taxes. Used for Mexico Payment Invoice (Complemento de Pago) Mode A. Includes both transferred and withheld tax totals. Not required for Mode B.

taxes
categories
array of objects

Categories of the invoice, as code and list pairs.

categories
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json