Skip to main content
POST
Create an order checkout
Coming soon – this endpoint isn’t available yet. Until it ships, it returns 501 Not Implemented with the error code NOT_IMPLEMENTED.
This is the first request of the BNPL checkout when the buyer is present. It replaces the separate requests for the buyer, its contacts, the order and the checkout session. Redirect the buyer to the returned URL, or pass the token to the Tilta JS SDK. The order fields sit at the top level of the body, as in Create an order. If you already know the payment option, preselect it with payment_term and payment_method; the buyer can still change it in the checkout. Otherwise, leave both out and the buyer chooses. For a buyer you already created, send its buyer_external_id. For a new buyer, send the full buyer and its contacts instead. The order is OPEN until the buyer submits the checkout. Tilta then checks it against the buyer’s credit and moves it to AUTHORIZED. Confirm the order within 24 hours, or capture it straight away, which confirms it implicitly.
When the buyer is not present, use Create and confirm an order instead.

Authorizations

Authorization
string
header
required

Your Tilta API key, sent as Bearer <key>.

Body

application/json

The order to create for a hosted checkout, with the fields of POST /v1/orders. payment_term and payment_method are an optional preselection. Reference an existing buyer with buyer_external_id, or send the buyer and its contacts.

external_id
string
required

Unique identifier of the order to create. It must not belong to an existing order.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9-_]+$
ordered_at
integer
required

Order creation date (unix time in seconds). It cannot be in the future

amount
object
required
buyer_external_id
string

Unique identifier of an existing buyer. Tilta uses the buyer as stored, without comparing or updating its details, and never creates a buyer. If no buyer with this external_id exists, Tilta rejects the request with 404 and NOT_FOUND. Send exactly one of buyer_external_id and buyer.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9-_]+$
merchant_external_id
string

Unique identifier of a merchant. Optional only for Single-merchant platforms.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9-_]+$
payment_method
enum<string>

Preselected payment method for the hosted checkout, which the buyer can still change. Send it together with payment_term, or neither. If omitted, the order's payment method is null until the buyer chooses.

Available options:
CASH,
CARD,
TRANSFER,
DEBIT
Example:

"TRANSFER"

payment_term
enum<string>

Preselected payment term for the hosted checkout, which the buyer can still change. Send it together with payment_method, or neither. If omitted, the order's payment term is null until the buyer chooses.

Available options:
PREPAYMENT,
DEFER_3D,
DEFER_7D,
DEFER_14D,
DEFER_21D,
DEFER_30D,
DEFER_45D,
DEFER_60D,
DEFER_75D,
DEFER_90D,
DEFER_120D,
SPLIT_3M,
SPLIT_6M
Example:

"DEFER_30D"

comment
string | null

Additional order comment added below the order summary in related communication with the buyer.

Example:

"For Daniel without tomatoes"

delivery_address
object | null

Delivery or shipping address for orders of goods.

custom_data
object | null

Free-form metadata for storing integration-specific data alongside this order.

line_items
object[]

Order line items. Please do not merge line items but provide them individually to allow for subsequent correlation with invoices.

buyer
object

Buyer of the order. Tilta creates the buyer, or uses the existing buyer with this external_id without updating it. An existing buyer must match the request in its legal name (ignoring case and spacing), its legal form, the value of each business identifier that both have for the same type and country, and the country and postcode of its business address. Otherwise Tilta rejects the request with 409 and BUYER_DETAILS_MISMATCH. Other fields, such as trading_name and delivery_address, are not compared. Send exactly one of buyer_external_id and buyer. With buyer, contacts are required.

contacts
object[]

Contacts of the buyer. Required with buyer, and then at least one contact must have an email. Optional with buyer_external_id; if you omit them, Tilta uses the buyer's stored contacts. Tilta matches each contact by external_id, then by email among the buyer's contacts, and creates it otherwise.

Minimum array length: 1
success_url
string<uri>

URL that the hosted checkout redirects the buyer to on success.

error_url
string<uri>

URL that the hosted checkout redirects the buyer to when the checkout does not succeed.

Response

The order has been created with a hosted checkout session.

order
object
required
token
string
required

Short-lived JWT that authenticates the buyer in the hosted checkout.

url
string<uri>
required

Hosted checkout URL to redirect the buyer to.