Paying a supplier invoice: /transfers with "payment from invoice"

When you pay a supplier, you may have to withhold taxes and pay them to the authority instead of to the supplier. Examples: income-tax withholdings, VAT withholdings, provincial gross-income withholdings. A payment from invoice transfer tells Brinta you are paying an invoice. Brinta returns the withholdings that apply to that payment.

📘

Key things to know

  • type is spelled exactly "payment from invoice": lowercase, with spaces.
  • You are the account holder, the company that pays. The supplier is the counterpart.
  • Withholdings are calculated on the gross amount of each invoice line, taxes included. That's why you send the invoice's own taxes with it.
  • There are two ways to send it:
    • From an invoice already in Brinta: send only its invoice_id.
    • Full payload: describe the invoice yourself.
  • A payment from invoice cannot be changed with PUT after it is created.

Option A: from an invoice already in Brinta

Reference: Create a transfer from an invoice.

If the supplier invoice is already in Brinta, for example received as an inbound e-invoice, you only need its ID:

curl -X POST https://api.brinta.com/transfers/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -H "x-idempotency-key: 5b3f0e1a-2b8d-4c7e-9f61-7a2e4d3c1b00" \
  -d '{
    "type": "payment from invoice",
    "invoice_id": "ab1b381d-a8e3-4d59-9cf4-deb9b5fd92c0"
  }'

Brinta reads the invoice and fills in the rest:

  • Account holder (payer). The invoice's buyer.
  • Supplier (counterpart). Found in this order:
    1. counterpart.company_id, if you send it;
    2. counterpart.company_external_id;
    3. a company with the supplier's tax ID;
    4. otherwise Brinta creates the supplier from the invoice.
  • Lines and taxes. Copied from the invoice. Withholdings and perceptions already printed on the invoice keep their type.

To pin the supplier to a company you already have, add "counterpart": { "company_id": "9a7d41f5-faae-4617-bc52-abaa5f3cae36" }.


Option B: full payload

Reference: Create a transfer.

Use this when the invoice isn't in Brinta.

curl -X POST https://api.brinta.com/transfers/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -H "x-idempotency-key: 1d2e3f40-5a6b-4c7d-8e9f-0a1b2c3d4e5f" \
  -d '{
    "type": "payment from invoice",
    "status": "created",
    "currency": "ARS",
    "transaction_date": "2026-07-10",
    "transaction_external_id": "PAY-2026-0712",
    "document_type": "invoice",
    "invoice_number": "0003-00001234",
    "account_holder_company_id": "82238834-db8c-4d87-b16e-2bd2b4fa473e",
    "counterpart": { "company_id": "9a7d41f5-faae-4617-bc52-abaa5f3cae36" },
    "items": [
      {
        "name": "Consulting services - June",
        "amount": 1000000,
        "categories": [{ "code": "out" }, { "code": "94", "list": "rg_830" }],
        "taxes": [
          { "name": "IVA", "tax_type": "VAT", "rate": 0.21, "tax_rate_type": "percentage",
            "taxable_amount": 1000000, "amount": 210000,
            "tax_level_type": "country", "location": "AR", "adds_to_final_amount": true }
        ]
      }
    ]
  }'

Fields

FieldRequiredNotes
typeYes"payment from invoice".
statusYesNormally created. Also accepted: pending, rejected, completed, paid.
currencyYesISO 4217.
counterpartYesThe supplier. Send exactly one of company_id, company_external_id or company (inline: type, address.country, tax_registrations[]).
items[]YesOne entry per invoice line. See below.
account_holder_company_id / account_holder_company_external_idNoThe paying company. Defaults to the company that owns the token. Send only one.
transaction_dateNoPayment date. It decides which rates are in force and which month counts toward cumulative thresholds. Defaults to today.
transaction_external_idNoYour payment ID.
document_type, invoice_numberNoDetails of the paid invoice.
exchange_rateNoFor non-local currency.
payment_methodNoSame shape as on /sales.

Items

FieldNotes
amountNet line amount as it appears on the invoice.
taxes[]The taxes printed on the invoice, for example its VAT. Brinta needs them: some withholdings are calculated on the invoice's VAT, and the payment line is built from the gross amount. Each entry needs name and amount. Use tax_type: "VAT" for VAT.
categories[{ "code": "out" }] marks money leaving the account holder. Add the categories your withholding regimes need, such as a service or concept code (see the Argentina guide) or a location category.
name, descriptionA line named taxes is treated as a tax summary line and gets no withholdings.
⚠️

use_tax_engine, match_draft_taxes and original_transaction_id are ignored on payment from invoice. Brinta always determines withholdings for this type.


What Brinta does with the request

Each request creates two linked transactions:

  1. base payment from invoice (status base). This is a snapshot of the invoice exactly as you sent it, lines and taxes included. Nothing is recalculated. Its external ID is your transaction_external_id plus -base- and a random suffix.
  2. payment from invoice. This is the payment, and it is what the API returns.
    • It has one line per invoice line.
    • Each line's amount is the gross amount of the invoice line (net plus its taxes).
    • The line is linked to the base line, so calculators can read the invoice's VAT.
    • The withholdings due at payment time are determined here.

Response: 200 OK (not 201), abridged:

{
  "id": "c1d2e3f4-0000-4a5b-8c9d-112233445566",
  "type": "payment from invoice",
  "status": "created",
  "account_holder_company_id": "82238834-db8c-4d87-b16e-2bd2b4fa473e",
  "transaction_date": "2026-07-10",
  "currency": "ARS",
  "amount": 1210000,
  "final_amount": 1170000,
  "counterpart": { "company_id": "9a7d41f5-faae-4617-bc52-abaa5f3cae36", "...": "..." },
  "items": [
    {
      "name": "Consulting services - June",
      "amount": 1210000,
      "final_amount": 1170000,
      "taxes": [
        { "name": "Retención Ganancias - RG 830", "type": "CIT", "rate": -0.02,
          "taxable_amount": 1000000, "amount": -20000, "level": "country", "location": "AR",
          "withholding_type": "WITHHOLDING", "adds_to_final_amount": true },
        { "name": "Retención IIBB - CABA - Régimen General", "type": "GIT", "rate": -0.02,
          "taxable_amount": 1000000, "amount": -20000, "level": "state", "location": "AR-C",
          "withholding_type": "WITHHOLDING", "adds_to_final_amount": true }
      ]
    }
  ]
}

These figures are illustrative. The withholdings that appear depend on the account holder's agent registrations and on the supplier's status and padrón data.

Reading the result

  • withholding_type: "WITHHOLDING" marks a tax you withhold and pay to the authority.
  • Withholdings carry a negative rate and amount. When adds_to_final_amount is true, they are already subtracted from final_amount. That final_amount is what you transfer to the supplier.
  • taxable_amount is the base actually used. It can be lower than the line: in this example RG 830 was applied to the net amount, and cumulative regimes only count what is above the monthly non-taxable minimum. It can also be 0 when a threshold isn't reached; the line is still returned so you can see why.
  • Retrieve the payment later with GET /transfers/{id}. The base payment from invoice is also readable there.

Which withholdings can apply

Withholdings depend on the country, on which agent registrations the paying company holds, and on the supplier's status. Examples configured for payment from invoice:

CountryRegimes
ArgentinaGanancias RG 830, IIBB withholdings (CABA, Córdoba, Santa Fe and others), SUSS, IVA
ColombiaRetefuente, ReteICA, ReteIVA
MexicoRetención ISR, Retención IVA
PeruDetracciones, Retención de renta, Retención IVA
BrazilISS, IRRF, PIS, CSLL

Ask your account manager to enable the regimes for which your company is an agent.


Common mistakes

MistakeFix
"type": "payment_from_invoice" or "PaymentFromInvoice"Use "payment from invoice".
Swapping the partiesYou (the payer) are account_holder_company_id. The supplier is counterpart.
Sending lines without the invoice's VATAdd the invoice's taxes in items[].taxes. Without them the gross amount and VAT-based withholdings are wrong.
Sending invoice_id and a full body togetherUse one shape or the other.
Expecting 201/transfers returns 200.
Trying to PUT a payment from invoiceNot supported. Create a new payment instead.
Splitting one payment into several requests to stay under thresholdsCumulative regimes (RG 830) add up every payment to the same supplier in the calendar month anyway.

Did this page help you?