Skip to main content
POST
Create an invoice

Authorizations

Authorization
string
header
required

A store API key, sent as Authorization: Bearer <key>.

A key looks like tbrn_live_ followed by 48 hex characters, e.g. tbrn_live_4f2a...c91b. Mint one in the Taberna dashboard under Developers → API Keys, tick the scopes the integration needs, and copy it there and then — the full value is shown once and only its hash is stored, so a lost key is replaced rather than recovered.

One key belongs to one store and carries a fixed scope set. Send it from a server, never from a browser: it can create orders and invoices and read every order the store has.

Headers

Idempotency-Key
string

Optional replay guard, 1–255 characters. Retrying a create with a key already used by this store returns the original resource instead of making a second one.

Required string length: 1 - 255

Body

application/json
items
object[]

The billed lines, 1–100 of them. Required unless templateId is given; sending both replaces the template's lines wholesale rather than merging.

Required array length: 1 - 100 elements
templateId
string<uuid>

A saved invoice template to build from — its items, memo and expiry are copied unless this request sets its own. Formatted as a UUID, e.g. 3f1a9c2e-7b04-4d8e-9a6f-2c5b1e0d7a83.

Example:

"3f1a9c2e-7b04-4d8e-9a6f-2c5b1e0d7a83"

currency
enum<string>

The fiat currency every amount on this resource is priced in. Crypto is quoted against it at payment time. Defaults to usd when omitted.

Available options:
usd,
eur
Example:

"usd"

customerName
string

Who the invoice is addressed to. Shown on the payment page.

Maximum string length: 255
Example:

"Acme GmbH"

customerEmail
string<email>

The address the send endpoint will email. Creating an invoice never sends anything; without this, the invoice can never be emailed at all.

Example:

"billing@acme.example"

memo
string

Free-text note shown to the customer on the payment page.

Maximum string length: 5000
Example:

"Net 14. Thanks!"

metadata
object

Arbitrary JSON to carry your own reference. Stored verbatim, returned on reads and on webhooks, and never shown to the customer.

Example:
successUrl
string<uri>

Where the payment page sends the customer once the invoice is paid. http/https only, up to 2048 characters.

Maximum string length: 2048
Example:

"https://example.com/thanks"

cancelUrl
string<uri>

Where the payment page sends the customer if they back out. http/https only, up to 2048 characters.

Maximum string length: 2048
Example:

"https://example.com/billing"

expiresIn
integer

How long the invoice stays payable, in minutes (10–129600). Falls back to the templateId template's own expiry, and to 1440 when there is none.

Required range: 10 <= x <= 129600
Example:

1440

Response

The invoice. A replayed Idempotency-Key returns the original invoice with this same status.

An invoice as the merchant API reports it.

id
string
required

The invoice's id. Base58 short id, 21–22 characters (never 0, O, I or l), e.g. 7Kq2mVn8pRt3XwYz5Bd4L — the value that appears in checkout and invoice links, and the one this API takes as a path id.

Example:

"7Kq2mVn8pRt3XwYz5Bd4L"

number
integer
required

Human-facing invoice number, counting up per store from 1. Distinct from id, which is what the API and the payment link use.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1042

status
enum<string>
required

Where the invoice is in its lifecycle. open — issued and payable. paid — settled in full. partial — funds arrived but fell short. expired — the payment window closed unpaid. voided — cancelled by the merchant, no longer payable.

Available options:
open,
paid,
partial,
expired,
voided
Example:

"open"

url
string
required

The hosted payment page for this invoice — what a customer opens to pay it.

Example:

"https://taberna.io/invoice/7Kq2mVn8pRt3XwYz5Bd4L"

items
object[]
required

The billed lines, in the order they were entered.

totalAmount
string
required

Sum of every line. Decimal string in the resource's fiat currency, e.g. "49.99" — a string, never a JSON number, so no precision is lost in transit.

Example:

"49.99"

currency
enum<string>
required

The fiat currency every amount on this resource is priced in. Crypto is quoted against it at payment time.

Available options:
usd,
eur
Example:

"usd"

customerName
string | null
required

Who the invoice is addressed to, shown on the payment page. Null when unset.

Example:

"Acme GmbH"

customerEmail
string | null
required

The only address the send endpoint will email; it cannot be overridden per send. Null when unset, which also makes the invoice unsendable.

Example:

"billing@acme.example"

memo
string | null
required

Free-text note shown to the customer on the payment page. Null when unset.

Example:

"Net 14. Thanks!"

metadata
object | null
required

The arbitrary JSON object you attached at creation, returned untouched. Merchant-only: it never reaches the customer's payment page.

Example:
successUrl
string | null
required

Where the payment page sends the customer once the invoice is paid. Null when none was set.

Example:

"https://example.com/thanks"

cancelUrl
string | null
required

Where the payment page sends the customer if they back out. Null when none was set.

Example:

"https://example.com/billing"

createdVia
enum<string>
required

Where the invoice came from. api — this API. dashboard — a human created it in the Taberna dashboard.

Available options:
api,
dashboard
Example:

"api"

expiresAt
string<date-time>
required

When the invoice stops accepting payment. UTC timestamp in ISO 8601, e.g. 2026-07-29T14:30:00.000Z.

Example:

"2026-07-29T14:30:00.000Z"

paidAt
string<date-time> | null
required

When the invoice was settled in full. Null until it is. UTC timestamp in ISO 8601, e.g. 2026-07-29T14:30:00.000Z.

Example:

"2026-07-29T14:30:00.000Z"

voidedAt
string<date-time> | null
required

When the merchant voided the invoice. Null unless voided. UTC timestamp in ISO 8601, e.g. 2026-07-29T14:30:00.000Z.

Example:

"2026-07-29T14:30:00.000Z"

createdAt
string<date-time>
required

When the invoice was issued. UTC timestamp in ISO 8601, e.g. 2026-07-29T14:30:00.000Z.

Example:

"2026-07-29T14:30:00.000Z"

email
object
required

The invoice's remaining email allowance.