Create an invoice

Creates an invoice for your organization.

Set the customer via customerId (find candidates with GET /v1/customers), and one or more receiving accounts via paymentAccountIds (find candidates with GET /v1/payment-accounts?enabledForAR=true). Payment accounts are optional at create time but at least one is required before you can share the invoice.

Set denomination to fiat or token. A fiat-denominated invoice prices its lines in fiat and lists the token/network rails the payor may settle on in paymentOptions (e.g. a USD invoice payable in USDC or ETH on base). A token-denominated invoice prices its lines directly in tokens; for those lines you may set a per-line exchangeRate (USD per token), and when you omit it the server values the line at the close price of its currency on the line's date. The model is identical for single- and multi-currency invoices: the invoice's totals carry one entry per distinct line currency.

Every invoice is created as a draft (lifecycle: draft, settlement: unpaid) and is fully editable. It is not committed until you call POST /v1/invoices/{invoiceId}:issue or :share — see the Invoice lifecycle section. A draft is native to Bitwave and is never synced to external systems.

Idempotency: send an Idempotency-Key header so a network retry can't create a duplicate (see the API description). A new invoice returns 201; a replay of the same key returns the original invoice with 200.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Body for creating an invoice. Always creates a draft — commit it later with :issue or :share. For safe network retries, also send an Idempotency-Key header. version is not part of create — the server assigns it.

string
required

The customer this invoice is for. Discover via GET /v1/customers. The customer need not have a Bitwave account.

paymentAccountIds
array of strings

The receiving payment accounts the payor pays into (discover via GET /v1/payment-accounts?enabledForAR=true). One per settlement rail. Optional at create, but at least one is required before the invoice can be shared.

paymentAccountIds
string

Human-facing invoice number.

string

Optional invoice title.

string

Invoice description.

string
enum
required

How the invoice's line amounts are denominated. Extensible enum — tolerate unknown values.

  • fiat — lines are priced in a fiat currency (type: fiat); the payor
    settles on one of the invoice's paymentOptions rails, converted to the
    denomination currency at payment time.

  • token — lines are priced directly in on-chain tokens; the invoice carries
    one total per distinct token currency among the lines.

Allowed:
paymentOptions
array of objects

The settlement rails the payor may pay on, each a {ticker, network} currency. Required in practice for fiat-denominated invoices so the payor has a token/network to settle in (e.g. USDC or ETH on base); optional for token denomination, where it defaults to the line currencies.

paymentOptions
date-time

Date the invoice is issued. Defaults to now if omitted.

date-time
required

Date the invoice is due.

lines
array of objects

Initial line items.

lines
Headers
string
length ≤ 255

A unique key for this invoice (a UUID is ideal). If you retry with the same key within 24h, the original invoice is returned (200) instead of creating a duplicate. Strongly recommended on every create.

Responses

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