Payments

Record full or partial invoice payments and expense payments, and check outstanding balances.

Billora tells apart invoice payments (money you receive for your invoices) and expense payments (money you pay for your expenses). Both use the payments:read and payments:write scopes.

Invoice payments

POST/api/v1/payments/payments:write
{
  "invoice": 5120,
  "amount": "500.00",
  "currency": "EUR",
  "date": "2026-11-15",
  "payment_method": 3,
  "reference": "Transferencia 88231",
  "notes": "First instalment"
}
JSON
FieldDescription
invoiceIssued invoice being paid. Required except for advances (kind: "advance").
kindinvoice (default), advance (customer advance, no invoice) or advance_application (read-only: created by /payments/{id}/apply/).
customerCustomer of the advance (kind: "advance").
amountAmount received (decimal string) in the invoice's currency.
amount_eur, exchange_rateInvoices in another currency: euros actually received or the rate applied (see below).
datePayment date (YYYY-MM-DD).
currencyCurrency: the invoice's, or EUR to give amount in euros.
payment_methodPayment method (/invoice-payment-methods/, with invoices:read).
reference, notesFree text: bank reference, remarks…

Read-only: is_refund (refund to the customer, negative amount, created when cancelling a paid invoice), applied_from (advance applied) and remaining_advance (advances: amount not yet applied). List filters: invoice, customer, kind, is_refund.

After a payment is recorded, the invoice recomputes its balance:

  • Payments not covering the total → partially_paid.
  • Payments (plus corrective invoices) covering the total → paid.

The invoice detail (GET /invoices/{id}/) includes payments (with refunds, negative, and advance applications), paid_amount, credited_amount and remaining_amount.

Invoices in another currency

amount goes in the invoice's currency. Three ways to state what was received:

  1. { "amount": "40.00", "currency": "USD", "amount_eur": "37.00" }: 37 € received; the difference with the booked amount (40 × invoice rate) goes to 768/668 and exchange_rate is computed.
  2. { "amount": "40.00", "currency": "USD", "exchange_rate": "0.925" }: amount_eur = 37.00.
  3. { "amount": "52.00", "currency": "EUR" }: amount in euros; Billora computes the foreign-currency amount (the invoice's outstanding amount if it settles it within ±10 %, or amount / rate), stores currency = invoice currency and amount_eur = 52.00.

Without amount_eur or exchange_rate the payment is booked at the invoice rate, with no difference. A currency other than the invoice's or EUR returns 400.

Customer advances

POST/api/v1/payments/payments:write
{ "customer": 318, "kind": "advance", "amount": "300.00", "date": "2026-11-02", "payment_method": 3 }
JSON

A payment on account without an invoice (debit 572 / credit 4380xxxx). It is later applied to one or more invoices:

POST/api/v1/payments/{id}/apply/payments:write
{ "invoice": 5120, "amount": "200.00", "date": "2026-11-20" }
JSON

Creates a kind: "advance_application" payment (debit 4380xxxx / credit 4300xxxx) for amount (by default, the smaller of the advance's remaining amount and the invoice balance; 400 if it exceeds either, if the invoice belongs to another customer, another currency or is not collectable) and reduces the invoice balance; answers 201 with the payment. DELETE of an advance with applications → 409. Applications and refunds cannot be edited (400): delete them and apply again.

OperationEndpoint
List payments (of an invoice)GET /payments/?invoice=5120
Fix a paymentPATCH /payments/{id}/
Delete a paymentDELETE /payments/{id}/ (the invoice becomes outstanding again)
Settle the whole outstanding amountPOST /invoices/{id}/mark-paid/

Only issued invoices can be paid. Draft, cancelled or fully rectified invoices return an error. To cancel a paid invoice the payment must be refunded first: see cancelling an invoice.

Use an Idempotency-Key derived from your bank reference (payment-<transaction id>) so a rerun of your reconciliation never records the same payment twice.

Expense payments

POST/api/v1/expense-payments/payments:write
{ "expense": 880, "amount": "121.00", "date": "2026-11-10", "payment_method": 2, "reference": "Tarjeta ****4421" }
JSON

Same behavior: the expense becomes paid when payments cover its total. Expense payment methods are at /expense-payment-methods/. amount is always stored in euros; kind tells apart expense (payment), advance (supplier advance), advance_application and credit_note_application (offsetting a supplier credit note, with credit_note). The "payment" of a credit note is the refund received.

  • Expense in another currency: { "expense": 881, "amount": "100.00", "currency": "USD", "amount_eur": "95.00" } (or exchange_rate) stores amount = 95.00 and takes the difference with the booked amount (100 × expense rate) to 668/768. Foreign-currency payments may exceed the expense total by up to 10 % (exchange difference). A currency other than EUR or the expense's → 400.
  • Supplier advances: { "supplier": 45, "kind": "advance", "amount": "500.00", "date": "2026-11-02" } (no expense, EUR only; debit 4070xxxx / credit 572). Apply them with POST /expense-payments/{id}/apply/ and { "expense": 880, "amount"?, "date"? } → advance_application payment (debit 4x supplier / credit 4070xxxx). DELETE of an applied advance → 409. List filters: expense, supplier, kind.

Payments recorded before reconciling

A payment created without a bank_account is not lost when the bank statement arrives: bank reconciliation proposes it as an existing_payment suggestion and, on acceptance, links it to the transaction (it takes its bank account and the real bank date) instead of duplicating it. To mark many old expenses as paid at once, see paying overdue expenses in bulk.

Events

payment.created, payment.deleted (may carry invoice: null for advances, plus kind, is_refund, customer, amount_eur and exchange_rate), invoice.partially_paid, invoice.paid and expense.paid. See webhooks.