Authorize invoice

Allows an application server to define invoice line items and other invoice-related information that will be stored in Tilia's system for retrieval when a client calls create invoice with the returned ID.

Request
Security:
tilia_auth (write_invoiceswrite_user_tokens)
Request Body schema: application/json

Authorize invoice request object

required
Array of objects (LineItemsRequest)

The line items to be purchased.

account_id
required
string <UUID4>

The buyer's Tilia Account ID.

invoice_mechanism
required
string

Defines how the invoice will be sent to the user. One of the following values: api, widget.

Value Description
api Used by non-browser/non-widget flows.
widget Used only in the widget transaction flow.
is_escrow
boolean

If this invoice is intended to be an escrow invoice, this should be set to true

reference_type
string

A type for your reference_id.

reference_id
string

Your own reference ID.

description
string

A user-facing description for this invoice. May be used in receipts and transaction history pages, and viewed by support agents.

metadata
string

An arbitrary data structure associated with this invoice. POSTed back to your webhook upon invoice completion.

Responses
200

Successfully authorized invoice.

400

Validation errors

401

Unauthorized access.

403

Disallowed from transacting.

500

Service unavailable or server error.

post/v2/authorize/invoice
Request samples
application/json
{
  • "line_items": [
    ],
  • "account_id": "b2ba9a0f-3d75-44e0-968d-be299cda5d80",
  • "invoice_mechanism": "string",
  • "is_escrow": true,
  • "reference_type": "Acme order number",
  • "reference_id": "8987749",
  • "description": "Digital product order",
  • "metadata": {
    }
}
Response samples
application/json
{}