Coming soon – the checkout, confirmation and capture endpoints in this guide aren’t available yet. Until they ship, they return
501 Not Implemented with the error code NOT_IMPLEMENTED. The guide and the API reference describe them ahead of their release so that you can build against them.Key concepts
Two windows apply:
- 24-hour confirmation window. You have 24 hours to confirm an
AUTHORIZEDorder. An order that is not confirmed in time moves toEXPIREDand releases the held amount. - 90-day capture window. You have 90 days to capture a
CONFIRMEDorder. An order that is not captured in time moves toEXPIREDand releases the held amount.
Happy path: checkout, then capture
1
Create the order checkout
Call
POST /v1/orders/checkout with the order fields of POST /v1/orders at the top level. payment_term and payment_method are optional: send both to preselect a payment option that the buyer can still change, or neither to let the buyer choose. Reference an existing buyer with its buyer_external_id, or send the full buyer with its contacts – exactly one of the two. With buyer_external_id, Tilta uses the buyer as stored, contacts are optional, and an unknown ID returns 404 with NOT_FOUND. With buyer, contacts are required and at least one contact must have an email. Tilta creates the buyer, or uses an existing buyer with the same external_id without updating it if its details match.The response contains the OPEN order and a hosted checkout session. Redirect the buyer to the returned url, or pass the token to the Tilta JS SDK.2
The buyer authorizes the order
The buyer chooses a payment term, or keeps the preselected one, and submits the checkout. Tilta checks the order against the buyer’s credit and holds the order amount. The order moves to
AUTHORIZED, and the 24-hour confirmation window starts.3
Capture the order
When the merchant fulfils the order, call
POST /v1/orders/{external_id}/capture with the invoice and its files. Capturing an AUTHORIZED order also confirms it, so you do not need a separate confirmation request. The order moves to CAPTURED.Separate confirmation
If you capture later than 24 hours after the buyer’s authorization, confirm the order first. CallPOST /v1/orders/{external_id}/confirm with an empty body while the order is AUTHORIZED. The order moves to CONFIRMED: Tilta keeps the held amount, replaces the 24-hour confirmation window with the 90-day capture window, and does not run a new credit check. Then capture the order within 90 days.
Buyer-absent path: confirm, then capture
When the buyer is not present for a checkout – for example for a phone order or a recurring delivery – confirm the order directly:1
Create and confirm the order
Call
POST /v1/orders/confirm with the same body as POST /v1/orders, including the payment_term and the payment_method. The buyer rules are the same as in the checkout request: send either buyer_external_id, with optional contacts, or the full buyer with its contacts, at least one of which has an email. Tilta creates the order, checks it against the buyer’s credit and confirms it in the same request. The order is CONFIRMED in the response and never becomes AUTHORIZED. The 90-day capture window starts.2
Capture the order
Call
POST /v1/orders/{external_id}/capture within 90 days.Payment links for an existing order
To send the buyer a payment link for an order that already exists, callPOST /v1/orders/{external_id}/checkout. It returns a hosted checkout session for the order, as the checkout request does. The order must be OPEN, CANCELLED or EXPIRED, and it must have no linked invoice.
Cancelling and confirming again
Cancel an order that has no linked invoice withPOST /v1/orders/{external_id}/cancel. Cancelling releases the held amount. A CAPTURED order cannot be cancelled – correct it with a credit note instead.
To reactivate a CANCELLED or EXPIRED order, either send the buyer a new checkout for it, or confirm it with POST /v1/orders/{external_id}/confirm. It uses the order’s stored payment_term and payment_method unless you send new ones – if the order has none stored, send both. Confirming it again runs a fresh credit check against the buyer’s current credit. If the check declines the order, the order keeps its status. Tilta sends ORDER.CONFIRMED each time an order is confirmed, so the event can arrive more than once for the same order.
Capture
POST /v1/orders/{external_id}/capture creates the invoice and uploads its files in one request. Send the files base64-encoded in the JSON body, at most five per request. Tilta creates the financing, collection and insurance services for the invoice, one each, so you don’t send any services. The response is the invoice without its services; to read them, call List services.
The captured amount moves from the order to the invoice, and the order moves to CAPTURED. Tilta keeps the buyer’s credit reserved from the authorization until the financing is booked.