Invoices
Customers can download their issued invoices and complete missing billing details through the customer portal.
Payware issues an invoice for every payment you take. You are the supplier: invoices carry your legal name, tax id,
VAT status and number series, and Payware generates and delivers them on your behalf. Invoicing is off until you save an
issuer profile, and a test account issues sample invoices marked fiscal: false.
Invoicing covers the issuer profile (also in the dashboard under Settings, with an Invoices page to browse, download and resend them), number series, billing details, an invoice issued for each succeeded payment, and its PDF
(the exact PDF is stored when the invoice is issued and served unchanged afterwards; its SHA-256 is pdf_sha256).
| Method & path | Description |
|---|---|
POST /v1/invoicing/profile | Save the issuer profile (legal_name, country, city, address, tax_id; optional vat_payer, default_vat_rate_bp, registration_number, iban, invoice_prefix, …). invoicing_enabled defaults to true |
GET /v1/invoicing/profile | Retrieve it (your own company details). Agent keys with invoices:read can read it, also as the MCP tool get_company_profile; saving it stays with you |
GET /v1/invoicing/lookup?tax_id= | Company details from ANAF (v9) for a Romanian CUI, in the profile's field names, to prefill it: legal_name, address, registration_number, vat_payer (and tax_id with the RO prefix when so), active. 404 if unknown, 502 lookup_unavailable if ANAF does not answer |
GET /v1/invoicing/collection · POST /v1/invoicing/collection | How receivable invoices are collected and chased: retry_days (default 0, 3, 5, 7 after issue), reminder_offsets around the due date (default -3, 0, 7) and final_action (leave_open default, uncollectible or void) |
POST /v1/invoicing/series · GET /v1/invoicing/series | Number series; a default one is created from invoice_prefix at the first invoice |
GET /v1/invoices | List; filters status, customer, payment, subscription, number, `created[gt |
POST /v1/invoices | Create a draft receivable: customer_id, currency, lines[] (description, quantity, unit_amount net, optional tax_rate_bp, default your issuer rate), optional days_until_due, description, footer, metadata. collection_method is send_invoice (the default: the payer pays on a hosted page) or charge_automatically (the customer's default saved card is charged when the invoice is issued and retried on your schedule; issuing fails with instrument_required when the customer has no card that can be charged). Emits invoice.created |
PATCH /v1/invoices/:id · DELETE /v1/invoices/:id | Change or retire a draft (lines are replaced as a whole). 409 invoice_not_editable once issued. A deleted draft becomes void with no number: fiscal records are never erased |
POST /v1/invoices/:id/finalize | Issue the draft: number, frozen issuer and billing copies, and a hosted pay page returned as pay_url. Missing billing details leave it needs_details (with missing_fields). Does not email it |
POST /v1/invoices/:id/void · /mark-uncollectible · /mark-paid | Void an unpaid invoice (closes the pay page), give up collecting (the payer can still pay), or record a payment made elsewhere (required note, optional paid_at; the event carries paid_out_of_band: true). 409 invoice_payment_pending while a card payment on it is in progress |
POST /v1/invoices/:id/pay | Charge the saved card of an open charge_automatically invoice now, instead of waiting for the next attempt: the answer reports paid, or open after a decline (next attempt scheduled). Refused without charging: 409 invoice_not_open, invoice_not_charge_automatically, invoice_payment_in_progress, invoice_busy, no_chargeable_instrument. Not available to agent keys |
GET /v1/invoices/:id | Retrieve, with the frozen issuer and billing copies and pay_url |
GET /v1/invoices/:id/pdf | The invoice as an A4 PDF (application/pdf), Romanian or English, the exact file issued, stored on first render and served unchanged from then on; 409 invoice_not_issued before it has a number |
POST /v1/invoices/:id/send | Email the invoice with its PDF (or the request for billing details) and return the signed link; limited to 60 emails per hour per account (429); with email in the body, send it to that address instead (a corrected one after a bounce) |
GET /v1/invoices/:id/emails | The emails sent for the invoice, with their status and events (bounce reason, who replied; never the reply text) |
POST /v1/invoices/:id/billing | Supply billing details for an invoice in needs_details |
Receivable invoices. Besides the invoice issued for a payment you took, you can bill a customer first: create a draft, finalize it
(pay_url is the hosted page, a payment link of kind: "invoice" that belongs to the invoice and is not listed under
/v1/payment-links), and send it by email, which carries a "Pay online" button next to the PDF. The page shows no amount to edit and no invoice-details
form (they are frozen on the invoice). When the payer pays, the invoice becomes paid once (a repeated notification changes nothing), amount_due drops to
0 and invoice.paid is emitted; no second invoice is made for that payment. A late payer can still pay an open or uncollectible invoice until you
void it. void, mark-uncollectible, mark-paid and pay are not available to agent keys; creating, changing, finalizing and sending are (invoices:write).
How an invoice is issued. When a payment succeeds, one invoice is created in the same transaction as the settlement; a
repeated callback never creates a second. A payment held for review (a late success on a closed subscription) is not
invoiced automatically. An invoicing problem never undoes a settlement. The invoice total equals the amount charged: the
default_vat_rate_bp of a VAT payer is treated as included in it, and a merchant that is not a VAT payer charges no VAT.
Billing details. Set billing on a customer (type person or company, country, city, address, and name, or
company_name with tax_id). A Romanian tax_id is checked as a CUI (checksum), another EU country's as a VAT id (format
only). No national id (CNP) is accepted. The details are stored encrypted, and a copy is frozen onto
each invoice when it is issued, so later edits never change an invoice. On a payment link, the payer can give their details on the payment page. An invoice
for a payment is always issued, with a number, as soon as the payment succeeds and invoicing is on: when the payer gave no
details, or too few to address it, it is issued to an anonymous person (Anonymous, or Anonim for a Romanian issuer), keeping the
name and email the payer did give, with no address or tax id. An issued invoice is not changed afterwards. An invoice you create
yourself (POST /v1/invoices) and finalize with missing details waits in needs_details without a number until you call
POST /v1/invoices/:id/billing, or the payer does it themselves through the emailed link (valid 90 days) to /invoice/<token>.
A payment is never held back for missing details.
Email. Once an invoice is issued, it is emailed to the billing email (the billing details' email, else the customer's
or payer's) in Romanian or English, with the PDF attached and a link to the hosted copy; sent_at is recorded. Mail problems
never affect a payment or an invoice; call POST /v1/invoices/:id/send to send again. The invoice's email_status is
sent, then bounced if the address does not exist or refuses the message, or complained if the payer reports it as spam;
invoice.email_bounced and invoice.email_complained tell you, so you can correct the address: GET /v1/invoices/:id/emails shows what happened to each message, and POST /v1/invoices/:id/send with email sends it to the corrected address (the issued invoice keeps its billing details; the dashboard does the same from the invoice's Email history). An invoice email is sent only when the issuer profile has an email address (POST /v1/invoices/:id/send answers 409 issuer_email_required without one; an invoice issued before it was set uses the current address). A payer's reply to the email is
forwarded to your issuer email address (text only, with the payer as Reply-To, so you can answer it directly) and announced by
invoice.email_replied; Payware does not keep the text.
Retention. Issued invoices, their lines, their stored PDFs and number series are fiscal records: Payware keeps them for the legal period (10 years in Romania) and no purge touches them. Deleting a customer clears the customer's stored billing details, but every invoice already issued keeps the issuer and billing details it was issued with. The 24-hour idempotency replays and the delivered-webhook window are removed as before; they are logs, not the invoice.
Numbers. Each series is strictly increasing and gap-free per account (INV000001, INV000002, …). A number is only
taken when an invoice is issued, so invoices waiting for details have none.
Reverse charge. When you are VAT-registered in the EU, an EU company in another member state whose VAT number carries its member-state prefix (a Romanian CUI without RO does not count) is invoiced without VAT for the same
total, and reverse_charge is true.
{ "object":"invoice", "id":"01…", "status":"paid", "number":"INV000042", "fiscal":true, "reverse_charge":false,
"currency":"RON", "subtotal":10000, "tax_total":1900, "total":11900, "amount_due":0, "amount_paid":11900,
"payment_id":"01…", "lines":[{ "description":"Consulting", "quantity":1, "unit_amount":10000, "tax_rate_bp":1900, "tax_amount":1900, "total":11900 }],
"issuer":{ "legal_name":"Exemplu SRL", "tax_id":"RO2816464" }, "billing":{ "type":"person", "name":"Ana Pop", "country":"RO" } }
Automatic collection and reminders. A charge_automatically invoice is charged to the customer's default saved card by the request that issues it (POST /v1/invoices/{id}/finalize answers with the outcome: paid, or open after a decline), and again on your retry_days (default days 0, 3, 5 and 7 after issue) while the charge is declined; those later attempts are made by an hourly job. Each decline emits invoice.payment_failed with next_payment_attempt and emails the payer; a charge still waiting for NETOPIA Payments is never repeated. When the attempts run out your final_action runs (default: the invoice stays open and can still be paid or marked paid). A paid invoice is emailed to the payer with its PDF. For a send_invoice invoice, invoice.overdue is emitted once after the due date and the payer is reminded at your reminder_offsets (default 3 days before, on, and 7 days after the due date), each once, and not while a payment on its pay page is in progress. Set the rules with /v1/invoicing/collection.
Agent keys read invoices, their email history, and GET /v1/invoicing/profile (also exposed as the MCP tool get_company_profile) with the invoices:read scope; changing billing details or resending an invoice needs invoices:write, and an agent can resend only to the invoice's own billing address, never to another one (403 agent_not_allowed). Saving the issuer
profile, the collection settings, managing number series, and CUI lookup are never reachable by agent keys. Events: invoice.created, invoice.finalized, invoice.paid, invoice.voided, invoice.marked_uncollectible, invoice.needs_details, invoice.payment_failed, invoice.overdue, invoice.email_bounced, invoice.email_complained, invoice.email_replied.