Skip to main content

Confirmation Endpoint

Confirm basket​

POST baskets/{basketId}/confirm

Confirms a basket and creates the order in the source system. This is the point of no return. Your connector must commit the tickets in the source system and return the barcode the venue will scan for each one.

The request body is an empty JSON object:

{}

Response: 200 OK

{
"orderId": "23AEBCDF",
"tickets": [
{
"id": "21AEBCDF",
"barcode": "9501234567890"
}
]
}
FieldTypeDescription
orderIdstringYour id for the order created in the source system. You don't need to return the basket id, because Spektrix already knows it.
tickets[].idstringThe ticket id, as returned by get basket.
tickets[].barcodestringThe barcode the source system's venue will scan for this ticket. Spektrix prints it on the ticket.

When Spektrix confirms​

Spektrix confirms the basket in the source system after the customer has paid and the Spektrix order has been confirmed. Just before that, it sends the customer details with set agent customer.

Confirmation must be reliable

The customer has already paid by the time this request arrives. If it fails, the order exists in Spektrix but not in the source system, and someone has to resolve it manually. To keep this rare:

  • Make sure the basket can't expire while the customer is paying. See basket lifetime.
  • Respond well within the 5-second timeout.
  • Make sure confirming the same basket twice fails, rather than creating a second order.

Return a barcode for every ticket. If a ticket has no barcode, Spektrix still records the sale, but the ticket prints with Spektrix's own barcode and won't scan at the source system's venue. Staff are warned when this happens.