API reference

Factures

An invoice bills one named customer for a fixed amount. Unlike a charge it has no timer: it stays open until it is paid or you void it, and the exchange rate is only locked when the customer opens its page and chooses a coin. Every attempt to pay is a charge with invoice set, so the usual charge events and webhooks apply; the invoice becomes paid when one of its charges does.

The invoice object

Field Type Description
id string Public code, the last path segment of hosted_url.
number string Sequential per account, e.g. INV-0042.
status "open" | "paid" | "void" Open until one of its charges is paid or you void it.
overdue boolean Open and past due_at. Overdue invoices can still be paid.
customer_name, customer_email string Who is billed. The receipt goes to this email.
memo string|null Shown on the invoice page and in the email, 500 characters max.
amount, currency string What is owed, in your currency.
due_at string|null Date as YYYY-MM-DD.
items array The lines of an itemised invoice: description, quantity, unit_amount, total. Empty when the invoice carries a single amount.
hosted_url string The page the customer pays on.
document_url string A printable version of the invoice, which the customer can save as a PDF.
charges array Payment attempts, newest first: id, status, asset.
sent_at, viewed_at, paid_at, voided_at, created_at string|null ISO 8601 timestamps in UTC.

Endpoints

  • GET /v1/invoices List invoices, newest first. Filter with ?status=.
  • POST /v1/invoices Create an invoice. Body: customer_name, customer_email, currency, memo, due_at, send_email and either amount or items (description, quantity, unit_amount each; the amount is then their sum).
  • GET /v1/invoices/{id} Retrieve an invoice with its payment attempts.
  • POST /v1/invoices/{id}/send Email the invoice to the customer, e.g. as a reminder. 409 unless it is open.
  • POST /v1/invoices/{id}/void Withdraw an open invoice. 409 when it is not open or a payment for it is confirming.