> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.todaytixgroup.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.todaytixgroup.com/_mcp/server.

# Place an order

POST https://stg.ttix.io/api/v3/orders
Content-Type: application/json

Check out a held cart. On success, tickets are issued and the cart is cleared.

Tickets are inside each `items[]` entry, not at the top level of the order. Fees are disclosed per item on `priceOption.fees`.

Reference: https://docs.todaytixgroup.com/api-reference/purchase/orders/place-order

## Authentication

- `X-TT-API-Key` header (required) — API Key authentication via header

## Servers

- `https://stg.ttix.io` (Staging Environment, default)
- `https://api.ttix.io` (Production Environment)

## Request

### Headers

- `X-TT-Device-Data` (string, optional) — JSON describing the device the shopper is buying on — `device_id`, `device_type` (`web` or `native`), and `device_os`. Adds signal to card fraud checks, so fewer genuine customers are declined. Omit it when no end-user device is in the request path.
- `X-TT-Platform` (enum, required) — Identifies the platform the request comes from.
  - Allowed values: `android`, `api`, `ios`, `web`
- `X-TT-Retailer` (string, required) — Your retailer identifier, provided during onboarding. It must be a retailer your API key was issued for.
- `Idempotency-Key` (string, optional) — Optional UUID v4 identifying an order placement attempt. An invalid key returns 400 INVALID_IDEMPOTENCY_KEY. Reusing a key with a different cart returns 409 IDEMPOTENCY_KEY_CART_MISMATCH.

### Body (application/json)

This endpoint expects an OrderPlacementRequest.

- `cartId` (string, required) — ID of the cart to buy, from `POST /carts`.
- `expectedTotal` (Money, required) — Total you expect to be charged — echo the total from a cart response read without a currency query parameter. The order settles in the currency the cart carries, so a total quoted with a currency parameter will not match. To pay in another currency, switch the cart with PATCH first.
- `contact` (OrderContactRequest, required) — Who the order is for.
- `payment` (PaymentRequest, required) — How the order is paid.
- `marketingConsent` (MarketingConsentRequest, optional) — Marketing messages the shopper agreed to at checkout. Leave it out when the shopper was not asked.
- `sendConfirmationEmail` (boolean, optional, nullable) — Whether to send the order confirmation email. True requests the email, false suppresses it, and omission uses the retailer default.

## Response

### 200

The Idempotency-Key already completed an order for this cart. The existing order is returned and nothing is charged or issued again.

- `data` (OrderResponse, required) — An order, with its items and tickets.

### 201

Order created and tickets issued.

- `data` (OrderResponse, required) — An order, with its items and tickets.

## Errors

### 400 Bad Request Error

Bad request — validation error, price mismatch or a payment method the cart cannot take. Common errors: EXPECTED_TOTAL_MISMATCH (expectedTotal doesn't match the cart total), and PAYMENT_METHOD_NOT_AVAILABLE (payment.method or payment.gateway is not one the cart can be paid with, INVOICE from a key that may not pay on account included; nothing is charged, and `details.availablePaymentMethods` lists the methods it can take). That list matches the cart's `options.paymentMethods`, except that it names KLARNA and AFTERPAY whenever the retailer offers them, where the cart lists them only when read with `country`. An empty list means the cart can't be paid for. Pay with a listed method under a new Idempotency-Key. An order with nothing to pay is never refused this way. Also INVALID_VOUCHER (a voucher on the cart can no longer be used; remove it and try again) and INVALID_IDEMPOTENCY_KEY (the `Idempotency-Key` header is not a UUID v4). MINIMUM_QUANTITY_NOT_MET: the cart holds fewer of an extra than its `minQuantityPerOrder`; `details` names the event, the minimum and the quantity held. Add more of the extra or remove it, then place the order under a new Idempotency-Key. EVENT_MINIMUM_NOT_MET: the cart holds fewer tickets than the event's `orderLimit.min`; `details` names the event, the minimum and the quantity held. Create a new cart with at least that many tickets, then place the order under a new Idempotency-Key.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 401 Unauthorized Error

`UNAUTHORIZED` — the API key is missing. `INVALID_API_KEY` — the API key is invalid. `INVALID_ACCESS_TOKEN` — the customer access token is invalid or has expired: refresh it and retry, or send none to continue as a guest.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 402 Payment Required Error

The payment did not go through, and the shopper needs to act. PAYMENT_AUTHENTICATION_REQUIRED means the payment provider needs the shopper before it can authorize: a card issuer asking them to authenticate, or a buy-now-pay-later provider waiting for them in its own widget or page. `details.action` holds the provider's action as a JSON string: parse it, then either hand it to your payment SDK to run it or, when its `type` is `redirect`, send the shopper to its `url`. Then place the order again with the same body plus the result in `payment.options.threeDSecure.details`, under a new `Idempotency-Key`: this 402 used up the first key, so resending it answers 409 `IDEMPOTENCY_KEY_FAILED`. Nothing was charged, and the cart is still held. A KLARNA order always takes these two calls. With `payment.klarna.flow` WIDGET, the default, the first answers this 402 with an action for the Klarna SDK, which shows Klarna's widget; when the shopper approves, the second call, under its own `Idempotency-Key`, sends the `authorization_token` and `paymentData` the SDK returns. With REDIRECT, the action's `type` is `redirect`, as for AFTERPAY: send the shopper to its `url`, and the second call sends the `redirectResult` they come back with. Both calls carry `payment.options.threeDSecure.returnUrl` and the same `payment.klarna.flow`. The first must also carry `payment.klarna.country`; the second is accepted without it. PAYMENT_DECLINED means the payment was refused — show the message and let the shopper try a different payment method, under a new `Idempotency-Key`.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 403 Forbidden Error

INSUFFICIENT_PERMISSIONS — this customer is not allowed to buy; show the message, which is written for the customer, and do not retry. RISK_CHECK_FAILED — the order was declined by risk checks. A risk decline is not a payment problem — retrying with the same or a different payment method will not succeed. Show the message and direct the shopper to customer support. Any request sent from a web page gets `ORIGIN_NOT_ALLOWED` when the page's origin is not one the API key allows. Add the origin to the key, or use a key that allows it. A request with no `Origin` header, such as one from your server, is never refused for this.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 404 Not Found Error

No cart exists for this `cartId`.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 409 Conflict Error

`CART_ALREADY_ORDERED` — the cart was already converted to an order (possibly since canceled); `details.orderId` names it, so fetch it via `GET /orders/{orderId}?cartId={cartId}` instead of buying again. `IDEMPOTENCY_KEY_ALREADY_PROCESSING` — an order with this `Idempotency-Key` is still being placed; wait, then send it again. `IDEMPOTENCY_KEY_FAILED` — the order placed with this key failed; try again under a new key. `IDEMPOTENCY_KEY_CART_MISMATCH` — this key was used with a different cart. `TICKET_LIMIT_EXCEEDED` — the venue's ticketing system limits how many tickets one customer can buy, counting earlier orders; `message` is the venue's own wording and says how many tickets the customer has left. Retrying the same order cannot succeed; a smaller order might. `INVENTORY_EXHAUSTED` — the venue's ticketing system took back seats held in the cart before the order was placed; nothing is charged. Retrying the same cart cannot succeed; create a new cart with other seats.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 410 Gone Error

The cart ran out of time, was deleted, or no longer holds inventory. Create a new cart to continue.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 429 Too Many Requests Error

Too many requests. Wait at most the number of seconds in the `Retry-After` header, then place the order again with the same Idempotency-Key.

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

### 500 Internal Server Error

Internal server error

- `error` (ErrorResponse, required) — What went wrong: `type` and `code` for your code to act on, `message` to display.

## Types

### Money

Monetary amount: an integer in minor units (cents for USD) with its currency code.

- `amount` (long, required) — Amount in minor units (cents for USD, pence for GBP, etc.)
- `currency` (string, required) — ISO 4217 currency code

### OrderContactRequest

Who the order is for.

- `name` (string, required) — Full name of the person the order is for.
- `email` (string, required) — Email address for the order confirmation. A venue that checks email addresses can refuse a well-formed one it cannot deliver to, with INVALID_FIELD_VALUE and details.reason ORDER_EMAIL_INVALID; ask the customer to correct it.
- `phone` (string, optional) — Phone number in E.164 format. Optional, unless your retailer needs a phone number on every order: then an order without one is refused with MISSING_REQUIRED_FIELD. A retailer that checks phone numbers can still refuse a well-formed number it cannot use, with INVALID_FIELD_VALUE and details.reason ORDER_PHONE_NUMBER_INVALID; ask the customer for another number.

### PaymentRequest

How the order is paid: the method, and the details that method needs.

- `method` (enum, required) — What the customer chose to pay with. Send NONE when the cart total is 0 — nothing is charged and no card details are needed. NONE is rejected when the total is above 0.
  - Allowed values: `AFTERPAY`, `APPLE_PAY`, `CARD`, `GOOGLE_PAY`, `INVOICE`, `KLARNA`, `NONE`
- `gateway` (enum, optional, nullable) — Which payment gateway produced the tokens. Required for card-based methods.
  - Allowed values: `ADYEN`
- `postalCode` (string, optional, nullable) — The shopper's billing postal code, accepted with every method. A TodayTix-owned retailer taking a fresh card through the ADYEN gateway refuses the order without one, with INVALID_FIELD_VALUE and details.reason ORDER_BILLING_POSTAL_CODE_REQUIRED. A saved card, wallet, Klarna or Afterpay never needs one, and neither does a partner retailer. Used in place of card.postalCode when both are sent.
- `card` (CardRequest, optional, nullable) — Encrypted card fields. Present when method is CARD.
- `applePay` (ApplePayRequest, optional, nullable) — Apple Pay token. Present when method is APPLE_PAY.
- `googlePay` (GooglePayRequest, optional, nullable) — Google Pay token. Present when method is GOOGLE_PAY.
- `klarna` (KlarnaRequest, optional, nullable) — Chooses Klarna and names the country the shopper is buying from. Present when method is KLARNA.
- `afterpay` (AfterpayRequest, optional, nullable) — Chooses Afterpay and names the country the shopper is buying from. Present when method is AFTERPAY.
- `options` (PaymentOptionsRequest, optional, nullable) — Processing directives such as 3D Secure. Not part of the payment instrument.

### MarketingConsentRequest

Marketing messages the shopper agreed to at checkout.

- `email` (boolean, optional) — When true, opt the shopper in to marketing emails. Defaults to false.
- `sms` (boolean, optional) — When true, opt the shopper in to marketing texts. Some retailers do not offer texts. Defaults to false.

### OrderResponse

An order, with its items and tickets.

- `id` (string, required) — Unique identifier for the order
- `confirmationNumber` (string, required) — Human-readable confirmation number for customer support and emails
- `customerId` (string, required) — Identifier for the customer who placed this order
- `contact` (OrderContactResponse, required) — Contact information for this order (pickup, delivery, confirmation)
- `items` (list of OrderItemResponse, required) — Items purchased in this order. By default, the purchaser sees all items in the order. An invited guest can access only the items to which they were invited.
- `receiptLines` (list of ReceiptLineResponse, required) — Lines to show on a receipt, in display order. Always includes the subtotal line; other lines appear only when they apply to the order.
- `total` (Money, required) — Total amount charged
- `status` (enum, required, nullable) — Current status of the order. PENDING means the order is placed but not yet paid for: it is charged once its tickets are confirmed, or cancelled if they cannot be. PROCESSING means the payment is still settling; FAILED means the payment did not complete. Null when the order has no payment status yet: treat it like PROCESSING and read the order again.
  - Allowed values: `COMPLETED`, `PENDING`, `PROCESSING`, `FAILED`, `CANCELLED`, `REFUNDED`, `VOUCHER_ISSUED`
- `createdAt` (datetime, required) — When the order was created (UTC)
- `delivery` (OrderDeliveryResponse, optional) — The order's delivery instructions. Omitted when it has none.
- `protection` (ProtectionResponse, optional, nullable) — Protection applied to this order. Null if the order has no protection.
- `totalTaxes` (Money, optional) — Taxes already included in total, shown for disclosure only. Omitted when the order carries no tax.
- `cancellationVoucher` (CancellationVoucherResponse, optional) — Credit voucher issued when this order was canceled or exchanged. Omitted when the order has no such credit.

### ErrorResponse

What went wrong: `type` and `code` for your code to act on, `message` to display.

- `type` (enum, required) — High-level error category.
  - Allowed values: `INVALID_REQUEST_ERROR`, `AUTHENTICATION_ERROR`, `PAYMENT_ERROR`, `PERMISSION_ERROR`, `NOT_FOUND_ERROR`, `METHOD_NOT_ALLOWED_ERROR`, `CONFLICT_ERROR`, `RESOURCE_GONE_ERROR`, `PRECONDITION_FAILED_ERROR`, `UNSUPPORTED_MEDIA_TYPE_ERROR`, `PRECONDITION_REQUIRED_ERROR`, `RATE_LIMIT_ERROR`, `API_ERROR`, `SERVICE_UNAVAILABLE`
- `code` (enum, required) — Machine-readable error code.
  - Allowed values: `METHOD_NOT_ALLOWED`, `UNSUPPORTED_MEDIA_TYPE`, `INVALID_FIELD_VALUE`, `ACCESS_CARD_NOT_VERIFIED`, `ACCESS_CARD_WRONG_SCHEME`, `ACCESS_VERIFICATION_NOT_SUPPORTED`, `ACCESS_VERIFICATION_UNAVAILABLE`, `TICKET_ALERT_SIGNUP_NOT_SUPPORTED`, `MIXED_ITEM_TYPES_NOT_SUPPORTED`, `INVALID_VOUCHER`, `CURRENCY_NOT_SUPPORTED`, `CURRENCY_TEMPORARILY_UNAVAILABLE`, `MISSING_REQUIRED_HEADER`, `MISSING_REQUIRED_FIELD`, `UNAUTHORIZED`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PAYMENT_AUTHENTICATION_REQUIRED`, `PAYMENT_DECLINED`, `RISK_CHECK_FAILED`, `APPLE_PAY_NOT_AVAILABLE`, `APPLE_PAY_SESSION_UNAVAILABLE`, `INVALID_REQUEST`, `RESOURCE_NOT_FOUND`, `INSUFFICIENT_PERMISSIONS`, `ORIGIN_NOT_ALLOWED`, `RATE_LIMITED`, `INTERNAL_SERVER_ERROR`, `SERVICE_UNAVAILABLE`, `PRICE_CHANGED`, `INVENTORY_EXHAUSTED`, `OCCURRENCE_NOT_AVAILABLE`, `OCCURRENCE_NOT_COMPATIBLE`, `ORPHANED_SEATS`, `INVALID_PRICE_OPTION`, `MIXED_OCCURRENCES_NOT_SUPPORTED`, `EVENT_NOT_SELLABLE`, `MIXED_PRODUCT_TYPES_NOT_SUPPORTED`, `MULTIPLE_GIFT_CARDS_NOT_SUPPORTED`, `GIFT_CARD_QUANTITY_NOT_SUPPORTED`, `MINIMUM_QUANTITY_NOT_MET`, `EVENT_MINIMUM_NOT_MET`, `VOUCHER_NOT_APPLICABLE_TO_GIFT_CARD`, `CART_EXPIRED`, `EXPECTED_TOTAL_MISMATCH`, `TICKET_LIMIT_EXCEEDED`, `PAYMENT_METHOD_NOT_AVAILABLE`, `CART_ALREADY_ORDERED`, `CART_CUSTOMER_REQUIRED`, `CART_ALREADY_CLAIMED`, `INVALID_IDEMPOTENCY_KEY`, `IDEMPOTENCY_KEY_ALREADY_PROCESSING`, `IDEMPOTENCY_KEY_CART_MISMATCH`, `IDEMPOTENCY_KEY_FAILED`, `GRANT_NOT_CLAIMABLE`, `GRANT_NOT_CANCELLABLE`, `WALLET_PASS_DOWNLOAD_BLOCKED`, `ACTION_NOT_AVAILABLE`, `WALLET_PASS_CHANGED`, `WALLET_PASS_NOT_ISSUED`, `WALLET_PASS_REPLACEMENT_NOT_SUPPORTED`, `WALLET_PASS_REPLACEMENT_UNFINISHED`, `WALLET_PASS_REPLACEMENT_NEEDS_SUPPORT`, `VERSION_REQUIRED`, `THIRD_PARTY_OUTAGE`
- `message` (string, required) — Human-readable description of the error.
- `param` (string, optional, nullable) — The request field that caused the error, if applicable.
- `details` (map from string to ErrorResponseDetails, optional, nullable) — Additional structured data for client recovery logic.

### CardRequest

Encrypted card fields. Present when method is CARD.

- `encryptedNumber` (string, optional, nullable) — Encrypted card number produced by the payment SDK. The payment provider needs it to charge a new card.
- `encryptedExpiryMonth` (string, optional, nullable) — Encrypted card expiry month produced by the payment SDK. The payment provider needs it to charge a new card.
- `encryptedExpiryYear` (string, optional, nullable) — Encrypted card expiry year produced by the payment SDK. The payment provider needs it to charge a new card.
- `encryptedSecurityCode` (string, optional, nullable) — Encrypted card security code produced by the payment SDK. The payment provider needs it to charge the card.
- `postalCode` (string, optional, nullable) — Billing postal code. Prefer postalCode on the payment object, which is used in place of this field when both are sent. A TodayTix-owned retailer taking a fresh card through the ADYEN gateway refuses the order unless one of the two is sent, with INVALID_FIELD_VALUE and details.reason ORDER_BILLING_POSTAL_CODE_REQUIRED. A saved card never needs one, and neither does a partner retailer.

### ApplePayRequest

Apple Pay token. Present when method is APPLE_PAY.

- `token` (string, required) — Apple Pay payment token returned by the Apple Pay sheet.

### GooglePayRequest

Google Pay token. Present when method is GOOGLE_PAY.

- `token` (string, required) — Google Pay payment token returned by the Google Pay sheet.

### KlarnaRequest

Chooses Klarna as the payment method. Klarna collects the payment details itself, in its widget or on its own page, so send only the country the shopper is buying from and, optionally, which of the two to use.

- `country` (string, optional, nullable) — ISO 3166-1 alpha-2 country the shopper is buying from — the same value you sent as `country` on the cart request that listed KLARNA. Klarna is offered per country, so this is the country the payment is made in, whatever the contact phone number is. Required on the first Klarna call. The second call, which carries the shopper's approval, is accepted without it.
- `flow` (enum, optional, nullable) — Where the shopper approves the payment. WIDGET, the default, answers the first call with the action for the Klarna widget to open in your page. REDIRECT answers it with a redirect action: send the shopper to its `url`, and send the `redirectResult` they come back with in `options.threeDSecure.details` on the second call, as for AFTERPAY. Send the same value on both calls.
  - Allowed values: `WIDGET`, `REDIRECT`

### AfterpayRequest

Chooses Afterpay as the payment method. Afterpay approves the purchase on its own page, so send only the country the shopper is buying from.

- `country` (string, required) — ISO 3166-1 alpha-2 country the shopper is buying from — the same value you sent as `country` on the cart request that listed AFTERPAY. It decides which Afterpay brand the shopper is sent to, such as Clearpay in the UK or Cash App Afterpay in the US.

### PaymentOptionsRequest

Processing directives such as 3D Secure. Not part of the payment instrument.

- `threeDSecure` (ThreeDSecureRequest, optional, nullable) — 3D Secure processing options.

### OrderContactResponse

Contact information for order fulfillment

- `name` (string, required) — Full name for ticket pickup and order confirmation
- `email` (string, required) — Email address for order confirmation and tickets
- `phone` (string, optional, nullable) — Phone number in E.164 format

### OrderItemResponse

A purchased unit of inventory within the order

- `id` (string, required) — Unique identifier for this order item
- `event` (EventSimpleResponse, required) — Event details for this order item
- `occurrence` (ItemOccurrenceResponse, required) — Occurrence details for this order item
- `venue` (VenueResponse, required) — The venue where this occurrence takes place
- `inventoryVariant` (InventoryVariantResponse, required) — What was bought, such as a seat, general admission area, extra or gift card
- `priceOption` (PriceOptionResponse, required) — The selected price option
- `quantity` (integer, required) — Number of units purchased
- `delivery` (DeliveryResponse, optional, nullable) — How tickets for this item are delivered. Null when delivery details are unavailable.
- `tickets` (list of TicketResponse, optional, nullable) — Tickets that admit the customer. Omitted on a gift-card item, which admits nobody.
- `giftCards` (list of GiftCardResponse, optional, nullable) — Gift cards this item issued, one per card bought. Present only on a gift-card item, which carries no tickets. Show the code to the buyer and nobody else — it is what they paid for, and anyone who has it can spend the card.

### ReceiptLineResponse

Lines to show on the receipt, already in display order: render them in the order given. Always includes a subtotal line; the other line types appear only when they apply. A fee charged per item is never a receipt line — it is disclosed per item on priceOption.fees. A fee charged once per order, such as an order fee, is a fee line.

- `label` (string, required) — Text to display for this line.
- `total` (Money, required) — Amount for this line. Never negative; `sign` gives the direction.
- `sign` (enum, required) — Display direction (positive = charge, negative = credit/discount).
  - Allowed values: `positive`, `negative`
- `_type` (enum, required) — Discriminator for the line type.
  - Allowed values: `SubtotalLine`, `FeeLine`, `VoucherLine`, `ProtectionLine`, `CreditLine`

### OrderDeliveryResponse

How the order's tickets reach the customer, as a whole

- `instructions` (string, required) — The order's post-purchase delivery instructions, such as when the e-tickets arrive. A lottery or rush order carries that program's text.

### ProtectionResponse

Protection covering all items. Null if not added.

- `id` (string, required) — Unique identifier for this protection.
- `pricePerItem` (Money, required) — Per-ticket protection rate.
- `total` (Money, required) — Total protection cost (pricePerItem × number of tickets).
- `status` (enum, optional, nullable) — Protection redemption status (Order only, omitted in Cart). ELIGIBLE — protection purchased, redemption window open. REDEEMED — user claimed the protection (terminal). EXPIRED — redemption window closed (terminal).
  - Allowed values: `ELIGIBLE`, `REDEEMED`, `EXPIRED`

### CancellationVoucherResponse

Credit voucher issued when the order was canceled or exchanged

- `code` (string, required) — Voucher code the customer redeems at checkout
- `value` (Money, required) — Face value of the credit when it was issued
- `type` (enum, required) — The order action that issued the credit
  - Allowed values: `CANCELLATION`, `EXCHANGE`
- `isExpired` (boolean, required) — Whether the voucher can no longer be used. A voucher can expire before its expiry date, so do not derive this from expiresOn.
- `balance` (Money, optional, nullable) — Amount still left to spend. Omitted for voucher types that do not track a remaining balance.
- `expiresOn` (date, optional, nullable) — Last day the voucher can be used. Omitted when the voucher never expires.

### ErrorResponseDetails

Additional structured data for client recovery logic.

### ThreeDSecureRequest

3D Secure processing options.

- `browserInfo` (map from string to string, optional, nullable) — Browser details the payment provider uses to assess risk.
- `returnUrl` (string, optional, nullable) — URL the payment provider sends the shopper back to after a challenge. Required when payment.method is KLARNA or AFTERPAY, on both calls.
- `origin` (string, optional, nullable) — Origin of the page that started the payment.
- `details` (map from string to string, optional, nullable) — Additional fields the payment provider needs to finish a payment it has already started. Omit it entirely when starting a payment.
- `nonce` (string, optional, nullable) — One-time value that ties this request to the payment provider's session.

### EventSimpleResponse

Lightweight event reference

- `id` (string, required) — Event ID
- `name` (string, required) — Display name of the event

### ItemOccurrenceResponse

The occurrence a cart or order item is for, with its doors-open time and notices.

- `id` (string, required) — Occurrence ID
- `startsAt` (datetime, required) — Start date and time in the venue's local timezone (ISO 8601 with offset).
- `doorsOpen` (DoorsOpenResponse, optional, nullable) — When doors open at the venue before the occurrence starts. Omitted when no doors-open time is available.
- `notices` (list of NoticeResponse, optional) — Notices about this occurrence, such as cast changes or accessibility services. Omitted when there are none.

### VenueResponse

Venue where the occurrence takes place

- `id` (string, optional, nullable) — Stable venue identifier.
- `name` (string, optional, nullable) — Display name of the venue
- `address` (AddressResponse, optional, nullable) — Structured postal address. Omitted when address data is unavailable.
- `timezone` (string, optional, nullable) — IANA timezone identifier for the venue. Used for datetime display and calendar integration.

### InventoryVariantResponse

A seat, general admission area, extra or gift card. `_type` says which.

- `_type`: `AssignedSeat` (AssignedSeat)
  - `attributes` (list of InventoryAttributeResponse, required) — Attributes describing characteristics of this inventory variant (e.g. legroom, accessibility, VIP perks).
  - `id` (string, required) — Stable identifier for this inventory variant. The same variant has the same id on every occurrence of the event, so a seat can be matched to the seating chart. A seat or general admission area has the same id in inventory items, carts and orders.
  - `name` (string, required) — Human-readable label for this inventory variant. Stable across occurrences and safe for display in UI.
  - `row` (string, required) — Row identifier within the section.
  - `seat` (string, required) — Seat number within the row.
  - `section` (string, required) — Section name within the venue.
  - `description` (string, optional, nullable) — Short plain-text copy about this variant, shown next to the name at seat selection and on the ticket. Omitted when the seller has not written any.
  - `entrance` (string, optional, nullable) — Where the ticket holder enters the venue, such as a door or gate. Omitted when the venue does not assign one.
  - `extendedDescription` (string, optional, nullable) — Longer copy about this variant as rich text, which may contain HTML or Markdown markup. Sanitize before rendering it as HTML. Shown in place of description where the client supports rich text. Omitted when the seller has not written any.
  - `images` (list of ViewFromSeatImage, optional) — Views of the stage from this seat, in the order the venue lists them. Present only on inventory items requested with `include=IMAGES`, and empty for a seat with no images.
- `_type`: `GeneralAdmission` (GeneralAdmission)
  - `attributes` (list of InventoryAttributeResponse, required) — Attributes describing characteristics of this inventory variant (e.g. legroom, accessibility, VIP perks).
  - `id` (string, required) — Stable identifier for this inventory variant. The same variant has the same id on every occurrence of the event, so a seat can be matched to the seating chart. A seat or general admission area has the same id in inventory items, carts and orders.
  - `name` (string, required) — Human-readable label for this inventory variant. Stable across occurrences and safe for display in UI.
  - `description` (string, optional, nullable) — Short plain-text copy about this variant, shown next to the name at seat selection and on the ticket. Omitted when the seller has not written any.
  - `extendedDescription` (string, optional, nullable) — Longer copy about this variant as rich text, which may contain HTML or Markdown markup. Sanitize before rendering it as HTML. Shown in place of description where the client supports rich text. Omitted when the seller has not written any.
  - `venueAreaIds` (list of string, optional, nullable) — Ids of the seating-chart areas this variant sells into, matching the area ids on the venue seating chart so a client can highlight them. Omitted when the variant is not tied to chart areas.
- `_type`: `Extra` (Extra)
  - `attributes` (list of InventoryAttributeResponse, required) — Attributes describing characteristics of this inventory variant (e.g. legroom, accessibility, VIP perks).
  - `id` (string, required) — Stable identifier for this inventory variant. The same variant has the same id on every occurrence of the event, so a seat can be matched to the seating chart. A seat or general admission area has the same id in inventory items, carts and orders.
  - `name` (string, required) — Human-readable label for this inventory variant. Stable across occurrences and safe for display in UI.
  - `admissionType` (enum, optional, nullable) — How admission works for this extra when it is its own event with its own schedule. TIMED means entry on a specific day at a specific time. DATED means entry on a specific day, any time between open and close. OPEN means entry on any day at any time. SLOT means entry at any time between the start and end times. Omitted when the extra belongs to the same event as the cart or order.
    - Allowed values: `TIMED`, `DATED`, `OPEN`, `SLOT`, `TIMED`, `DATED`, `OPEN`, `SLOT`
  - `caption` (string, optional, nullable) — Short label for this extra, typically a serving size. Omitted when the seller has not written one.
  - `description` (string, optional, nullable) — Short plain-text copy about this variant, shown next to the name at seat selection and on the ticket. Omitted when the seller has not written any.
  - `extendedDescription` (string, optional, nullable) — Longer copy about this variant as rich text, which may contain HTML or Markdown markup. Sanitize before rendering it as HTML. Shown in place of description where the client supports rich text. Omitted when the seller has not written any.
  - `imageUrl` (string, optional, nullable) — Image shown for this extra. Omitted when the seller has not uploaded one.
- `_type`: `GiftCard` (GiftCard)
  - `attributes` (list of InventoryAttributeResponse, required) — Attributes describing characteristics of this inventory variant (e.g. legroom, accessibility, VIP perks).
  - `id` (string, required) — Stable identifier for this inventory variant. The same variant has the same id on every occurrence of the event, so a seat can be matched to the seating chart. A seat or general admission area has the same id in inventory items, carts and orders.
  - `name` (string, required) — Human-readable label for this inventory variant. Stable across occurrences and safe for display in UI.
  - `description` (string, optional, nullable) — Short plain-text copy about this variant, shown next to the name at seat selection and on the ticket. Omitted when the seller has not written any.
  - `extendedDescription` (string, optional, nullable) — Longer copy about this variant as rich text, which may contain HTML or Markdown markup. Sanitize before rendering it as HTML. Shown in place of description where the client supports rich text. Omitted when the seller has not written any.
  - `value` (Money, optional, nullable) — The balance the card is issued with. Independent of `priceOptions[].sellPrice`, which is what the customer is charged: a card sold at a discount is worth its full value. Always in the currency the card can be spent in, which is the event's own currency and not the one the shopper is browsing in — a card redeems only in the currency it was issued in. Absent on a listed card whose amount the buyer chooses; in a cart or order it is the amount they chose.

### PriceOptionResponse

A single purchasable price option for an inventory item.

- `category` (PriceCategoryResponse, required) — Pricing category for this option (e.g., Adult, Child).
- `sellPrice` (Money, required) — Per-unit price charged to the customer, including fees and tax. On a listed gift card whose amount the buyer chooses this is the lowest amount they may choose; the card is charged at the amount they choose.
- `id` (string, optional, nullable) — Unique identifier for this price option.
- `constraints` (PriceOptionConstraintsResponse, optional, nullable) — Selection rules for this option, such as a category it must be bought alongside. Omitted when the option can be bought on its own, and on items that carry no selection rules, such as extras.
- `listPrice` (Money, optional) — Original face value before discounts. Omitted when the option is not discounted or the saving may not be shown, and on the price option of a cart or order item.
- `discountPercentage` (integer, optional, nullable) — Whole-number percentage saved, for a "Save 30%" style label (30 means 30%). Use it rather than working it out from listPrice and sellPrice, which can be priced on a different fee basis. Omitted when the option is not discounted, when the saving may not be shown, and when the event shows its saving as an amount, which discountAmount then carries.
- `discountAmount` (Money, optional, nullable) — Amount saved, for a "Save $20" style label. Sent instead of discountPercentage when the event shows its saving as an amount, so never together with it. Use it rather than working it out from listPrice and sellPrice. Omitted when the option is not discounted or the saving may not be shown, and on the price option of a cart or order item.
- `fees` (list of FeeResponse, optional, nullable) — Itemized fee disclosure. Every entry is a component of sellPrice — never add it to a price. Empty when the option carries no fees. Omitted entirely when the retailer or market does not require fee disclosure.
- `maxQuantityPerOrder` (integer, optional, nullable) — Maximum number of units allowed in one order at this price option. The effective limit combines this with the item-level cap and quantityAvailable — use the lowest. Omitted when this price option has no cap.
- `promotion` (PromotionResponse, optional, nullable) — Active promotion for this price option. Omitted when no promotion applies.
- `isDefault` (boolean, optional, nullable) — True for the option a client should pre-select when the item is first shown. Omitted when false.

### DeliveryResponse

How tickets for this item are delivered

- `method` (DeliveryMethodResponse, required) — The delivery method
- `instructions` (string, optional, nullable) — What to tell the customer about getting this item, to show beside it. On a cart item, this is the text shown before purchase, such as when the e-tickets arrive. On an order item, it is specific to that item, for example "Pickup at the bar". An item with nothing specific carries the order's general text, the same as the order's `delivery.instructions`, so the same text can repeat across items. Null when there is none.

### TicketResponse

Admission ticket for venue entry or redemption

- `id` (string, required) — Unique identifier for the ticket
- `status` (enum, required) — Current status of the ticket
  - Allowed values: `CONFIRMED`, `CANCELLED`
- `assignedCustomer` (AssignedCustomerResponse, optional, nullable) — The customer this ticket was given to. Omitted when the ticket was never given away.
- `barcode` (BarcodeResponse, optional, nullable) — Barcode for venue entry. Null when no barcode redeems the ticket, and for a partner until the barcode is released.

### GiftCardResponse

A gift card the customer bought on this order

- `code` (string, required) — Code the recipient redeems at checkout
- `value` (Money, required) — Face value of the card when it was issued. Always in the currency the card can be spent in, which may differ from the currency the order was paid in.
- `balance` (Money, optional, nullable) — Amount still left to spend, in the same currency as the face value. Omitted when the card tracks no remaining balance.
- `expiresOn` (date, optional, nullable) — Last day the card can be used, including any balance left on it. The card works until the end of this day in the time zone of the show it was sold on. Omitted when the card never expires.

### DoorsOpenResponse

When doors open at the venue for this occurrence.

- `at` (datetime, required) — Date and time when doors open, in ISO 8601 with venue timezone offset.
- `description` (string, optional, nullable) — Customer-facing copy about doors opening. Omitted when there is none.

### NoticeResponse

A notice about this occurrence, such as a cast change or an accessibility service.

- `name` (string, required) — Short title of the notice.
- `description` (string, optional, nullable) — Longer text with the detail of the notice. Omitted when there is no extra detail.

### AddressResponse

Structured postal address for venue display

- `line1` (string, optional, nullable) — First line of the street address
- `line2` (string, optional, nullable) — Second line of the street address (suite, floor, etc.)
- `city` (string, optional, nullable) — City name
- `state` (string, optional, nullable) — State, province, or region
- `postalCode` (string, optional, nullable) — Postal or ZIP code
- `country` (string, optional, nullable) — ISO 3166-1 alpha-2 country code
- `latitude` (double, optional, nullable) — Latitude coordinate
- `longitude` (double, optional, nullable) — Longitude coordinate

### InventoryAttributeResponse

Attributes describing characteristics of this inventory variant (e.g. legroom, accessibility, VIP perks).

- `name` (string, required) — Short human-readable label for display in badges or tags.
- `category` (enum, required) — Signals how clients should present this attribute: POSITIVE (perk), NEGATIVE (drawback), NEUTRAL (informational), FEATURED (highlight), ACCESSIBILITY (accessibility feature).
  - Allowed values: `POSITIVE`, `NEGATIVE`, `NEUTRAL`, `FEATURED`, `ACCESSIBILITY`
- `description` (string, optional, nullable) — Additional context about the attribute, shown in tooltips or detail views.

### ViewFromSeatImage

A view of the stage from a seat.

- `url` (string, required) — Absolute URL of the image.

### PriceCategoryResponse

Category a price option is sold under (e.g. Adult, Child, Senior).

- `name` (string, required) — Display name for the pricing category
- `id` (string, optional, nullable) — Identifier for the category. Consistent for every option in the same response, so constraints.requiresCategory always resolves to a sibling option. Stable across occurrences for inventory managed in TodayTix; for inventory sourced from an external ticketing system, treat it as scoped to the response. Omitted when the item has a single, uncategorized price.
- `description` (string, optional, nullable) — Longer descriptive text shown alongside the name. Omitted when the category has none.

### PriceOptionConstraintsResponse

Selection rules for a price option. Advisory: apply them when the customer builds the order — the server does not guarantee to reject an order that breaks them.

- `requiresCategory` (list of string, required) — Category ids, at least one of which must also be in the order for this option to be purchased (e.g. a Child ticket must be bought with an Adult ticket). Each id matches the category.id of another option on the same item.

### FeeResponse

One itemized fee included in sellPrice.

- `type` (enum, required) — The kind of fee. New fee types may be added over time — treat an unknown value as a new fee type, not an error.
  - Allowed values: `SERVICE_FEE`, `ORDER_FEE`
- `value` (Money, required) — Per-unit fee amount. Already included in sellPrice — never add it to a price.

### PromotionResponse

A promotion applied to a price option.

- `id` (string, required) — Stable promotion identifier.
- `name` (string, required) — Promotion display name.
- `description` (string, optional, nullable) — Optional plain-text description of the promotion.

### DeliveryMethodResponse

The way tickets are delivered to the customer

- `name` (string, required) — Display name of the delivery method

### AssignedCustomerResponse

The customer a ticket was given to

- `firstName` (string, required) — First name
- `lastName` (string, required) — Last name

### BarcodeResponse

Barcode for venue entry

- `value` (string, required) — Raw barcode value for wallet pass integrations
- `format` (enum, optional, nullable) — Barcode symbology
  - Allowed values: `CODE39`, `CODE128`, `EAN13`, `IMAGE`, `INTERLEAVED2OF5`, `PDF417`, `QR`
- `imageUrl` (string, optional, nullable) — Pre-rendered barcode image URL for display
- `link` (string, optional, nullable) — Link that goes with the barcode, such as a package's ride and game credit balance. Null when the barcode has none.

## Examples

### Pay with a new card, encrypted by the Adyen SDK

**Request**

```json
{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com"
  },
  "payment": {
    "method": "CARD",
    "gateway": "ADYEN",
    "postalCode": "10036",
    "card": {
      "encryptedNumber": "adyenjs_0_1_25$encrypted-card-number",
      "encryptedExpiryMonth": "adyenjs_0_1_25$encrypted-expiry-month",
      "encryptedExpiryYear": "adyenjs_0_1_25$encrypted-expiry-year",
      "encryptedSecurityCode": "adyenjs_0_1_25$encrypted-security-code"
    },
    "options": {
      "threeDSecure": {
        "returnUrl": "https://shop.example.com/checkout/complete"
      }
    }
  }
}
```

**Response**

```json
{
  "data": {
    "id": "12345",
    "confirmationNumber": "T123456789012",
    "customerId": "c.pm2fiairy2y6a6rpbf5",
    "contact": {
      "name": "John Smith",
      "email": "john.smith@example.com",
      "phone": "+12125550123"
    },
    "items": [
      {
        "id": "12345",
        "event": {
          "id": "123",
          "name": "Hamilton"
        },
        "occurrence": {
          "id": "456",
          "startsAt": "2026-03-15T19:30:00-04:00",
          "doorsOpen": {
            "at": "2026-03-15T19:00:00-04:00",
            "description": "Doors open 30 minutes before the performance."
          },
          "notices": [
            {
              "name": "Audio-described performance",
              "description": "Live audio description for visually impaired patrons."
            }
          ]
        },
        "venue": {
          "id": "UmljaGFyZCBSb2RnZXJzIFRoZWF0cmU",
          "name": "Richard Rodgers Theatre",
          "address": {
            "line1": "226 W 46th St",
            "line2": "Suite 200",
            "city": "New York",
            "state": "NY",
            "postalCode": "10036",
            "country": "US",
            "latitude": 40.759,
            "longitude": -73.9845
          },
          "timezone": "America/New_York"
        },
        "inventoryVariant": {
          "_type": "AssignedSeat",
          "attributes": [
            {
              "name": "Limited Legroom",
              "category": "NEGATIVE",
              "description": "Seats in this row have reduced legroom due to a safety barrier."
            }
          ],
          "id": "ORCHESTRA-A-101",
          "name": "Orchestra A 101",
          "row": "A",
          "seat": "101",
          "section": "Orchestra",
          "description": "Closest to the stage",
          "entrance": "Door 4",
          "extendedDescription": "Includes a complimentary drink. **Over 18s only.**",
          "images": [
            {
              "url": "https://example.com/seat-views/orchestra-a-101-center.jpg"
            }
          ]
        },
        "priceOption": {
          "category": {
            "name": "Adult",
            "id": "4471",
            "description": "Ages 3-12"
          },
          "sellPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "id": "eyJwcm92aWRlckNvZGUiOiJGVUxMUFJJQ0UiLCJob2xkQ29kZSI6IjE1NzM5In0",
          "constraints": {
            "requiresCategory": [
              "string"
            ]
          },
          "listPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "discountPercentage": 30,
          "discountAmount": {
            "amount": 18500,
            "currency": "USD"
          },
          "fees": [
            {
              "type": "SERVICE_FEE",
              "value": {
                "amount": 18500,
                "currency": "USD"
              }
            }
          ],
          "maxQuantityPerOrder": 4,
          "promotion": {
            "id": "promo-opening-week",
            "name": "Opening Week Special",
            "description": "40% off Orchestra seats for opening week performances."
          },
          "isDefault": true
        },
        "quantity": 1,
        "delivery": {
          "method": {
            "name": "E-ticket"
          },
          "instructions": "Your e-tickets will be emailed to you before the performance."
        },
        "tickets": [
          {
            "id": "tkt-001",
            "status": "CONFIRMED",
            "assignedCustomer": {
              "firstName": "Jordan",
              "lastName": "Lee"
            },
            "barcode": {
              "value": "TKT-2026-031519-A101",
              "format": "QR",
              "imageUrl": "https://cdn.ttix.io/barcodes/tkt-001.png",
              "link": "https://winterwonderland.tapaygo.com/wallet/add-tag/%24461180642"
            }
          }
        ],
        "giftCards": [
          {
            "code": "GC123456789",
            "value": {
              "amount": 18500,
              "currency": "USD"
            },
            "balance": {
              "amount": 18500,
              "currency": "USD"
            },
            "expiresOn": "2027-10-14"
          }
        ]
      }
    ],
    "receiptLines": [
      {
        "label": "Subtotal",
        "total": {
          "amount": 18500,
          "currency": "USD"
        },
        "sign": "positive",
        "_type": "SubtotalLine"
      }
    ],
    "total": {
      "amount": 18500,
      "currency": "USD"
    },
    "status": "COMPLETED",
    "createdAt": "2026-03-10T14:32:00Z",
    "delivery": {
      "instructions": "Your e-tickets will be emailed to you before the performance."
    },
    "protection": {
      "id": "prot_001",
      "pricePerItem": {
        "amount": 18500,
        "currency": "USD"
      },
      "total": {
        "amount": 18500,
        "currency": "USD"
      },
      "status": "ELIGIBLE"
    },
    "totalTaxes": {
      "amount": 18500,
      "currency": "USD"
    },
    "cancellationVoucher": {
      "code": "PWYHYCRSGZAXKPE",
      "value": {
        "amount": 18500,
        "currency": "USD"
      },
      "type": "CANCELLATION",
      "isExpired": false,
      "balance": {
        "amount": 18500,
        "currency": "USD"
      },
      "expiresOn": "2027-04-20"
    }
  }
}
```

**SDK Code**

```python Pay with a new card, encrypted by the Adyen SDK
import requests

url = "https://stg.ttix.io/api/v3/orders"

payload = {
    "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "expectedTotal": {
        "amount": 18500,
        "currency": "USD"
    },
    "contact": {
        "name": "John Smith",
        "email": "john.smith@example.com"
    },
    "payment": {
        "method": "CARD",
        "gateway": "ADYEN",
        "postalCode": "10036",
        "card": {
            "encryptedNumber": "adyenjs_0_1_25$encrypted-card-number",
            "encryptedExpiryMonth": "adyenjs_0_1_25$encrypted-expiry-month",
            "encryptedExpiryYear": "adyenjs_0_1_25$encrypted-expiry-year",
            "encryptedSecurityCode": "adyenjs_0_1_25$encrypted-security-code"
        },
        "options": { "threeDSecure": { "returnUrl": "https://shop.example.com/checkout/complete" } }
    }
}
headers = {
    "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
    "X-TT-Platform": "android",
    "X-TT-Retailer": "YOUR_RETAILER_ID",
    "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "X-TT-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Pay with a new card, encrypted by the Adyen SDK
const url = 'https://stg.ttix.io/api/v3/orders';
const options = {
  method: 'POST',
  headers: {
    'X-TT-Device-Data': '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform': 'android',
    'X-TT-Retailer': 'YOUR_RETAILER_ID',
    'Idempotency-Key': '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"cartId":"6aac14d3-5826-4da8-98b6-9e68c28629d6","expectedTotal":{"amount":18500,"currency":"USD"},"contact":{"name":"John Smith","email":"john.smith@example.com"},"payment":{"method":"CARD","gateway":"ADYEN","postalCode":"10036","card":{"encryptedNumber":"adyenjs_0_1_25$encrypted-card-number","encryptedExpiryMonth":"adyenjs_0_1_25$encrypted-expiry-month","encryptedExpiryYear":"adyenjs_0_1_25$encrypted-expiry-year","encryptedSecurityCode":"adyenjs_0_1_25$encrypted-security-code"},"options":{"threeDSecure":{"returnUrl":"https://shop.example.com/checkout/complete"}}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Pay with a new card, encrypted by the Adyen SDK
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://stg.ttix.io/api/v3/orders"

	payload := strings.NewReader("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\"\n  },\n  \"payment\": {\n    \"method\": \"CARD\",\n    \"gateway\": \"ADYEN\",\n    \"postalCode\": \"10036\",\n    \"card\": {\n      \"encryptedNumber\": \"adyenjs_0_1_25$encrypted-card-number\",\n      \"encryptedExpiryMonth\": \"adyenjs_0_1_25$encrypted-expiry-month\",\n      \"encryptedExpiryYear\": \"adyenjs_0_1_25$encrypted-expiry-year\",\n      \"encryptedSecurityCode\": \"adyenjs_0_1_25$encrypted-security-code\"\n    },\n    \"options\": {\n      \"threeDSecure\": {\n        \"returnUrl\": \"https://shop.example.com/checkout/complete\"\n      }\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
	req.Header.Add("X-TT-Platform", "android")
	req.Header.Add("X-TT-Retailer", "YOUR_RETAILER_ID")
	req.Header.Add("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
	req.Header.Add("X-TT-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Pay with a new card, encrypted by the Adyen SDK
require 'uri'
require 'net/http'

url = URI("https://stg.ttix.io/api/v3/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-TT-Device-Data"] = '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}'
request["X-TT-Platform"] = 'android'
request["X-TT-Retailer"] = 'YOUR_RETAILER_ID'
request["Idempotency-Key"] = '6aac14d3-5826-4da8-98b6-9e68c28629d6'
request["X-TT-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\"\n  },\n  \"payment\": {\n    \"method\": \"CARD\",\n    \"gateway\": \"ADYEN\",\n    \"postalCode\": \"10036\",\n    \"card\": {\n      \"encryptedNumber\": \"adyenjs_0_1_25$encrypted-card-number\",\n      \"encryptedExpiryMonth\": \"adyenjs_0_1_25$encrypted-expiry-month\",\n      \"encryptedExpiryYear\": \"adyenjs_0_1_25$encrypted-expiry-year\",\n      \"encryptedSecurityCode\": \"adyenjs_0_1_25$encrypted-security-code\"\n    },\n    \"options\": {\n      \"threeDSecure\": {\n        \"returnUrl\": \"https://shop.example.com/checkout/complete\"\n      }\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Pay with a new card, encrypted by the Adyen SDK
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg.ttix.io/api/v3/orders")
  .header("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
  .header("X-TT-Platform", "android")
  .header("X-TT-Retailer", "YOUR_RETAILER_ID")
  .header("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
  .header("X-TT-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\"\n  },\n  \"payment\": {\n    \"method\": \"CARD\",\n    \"gateway\": \"ADYEN\",\n    \"postalCode\": \"10036\",\n    \"card\": {\n      \"encryptedNumber\": \"adyenjs_0_1_25$encrypted-card-number\",\n      \"encryptedExpiryMonth\": \"adyenjs_0_1_25$encrypted-expiry-month\",\n      \"encryptedExpiryYear\": \"adyenjs_0_1_25$encrypted-expiry-year\",\n      \"encryptedSecurityCode\": \"adyenjs_0_1_25$encrypted-security-code\"\n    },\n    \"options\": {\n      \"threeDSecure\": {\n        \"returnUrl\": \"https://shop.example.com/checkout/complete\"\n      }\n    }\n  }\n}")
  .asString();
```

```php Pay with a new card, encrypted by the Adyen SDK
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg.ttix.io/api/v3/orders', [
  'body' => '{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com"
  },
  "payment": {
    "method": "CARD",
    "gateway": "ADYEN",
    "postalCode": "10036",
    "card": {
      "encryptedNumber": "adyenjs_0_1_25$encrypted-card-number",
      "encryptedExpiryMonth": "adyenjs_0_1_25$encrypted-expiry-month",
      "encryptedExpiryYear": "adyenjs_0_1_25$encrypted-expiry-year",
      "encryptedSecurityCode": "adyenjs_0_1_25$encrypted-security-code"
    },
    "options": {
      "threeDSecure": {
        "returnUrl": "https://shop.example.com/checkout/complete"
      }
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key' => '<apiKey>',
    'X-TT-Device-Data' => '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform' => 'android',
    'X-TT-Retailer' => 'YOUR_RETAILER_ID',
  ],
]);

echo $response->getBody();
```

```csharp Pay with a new card, encrypted by the Adyen SDK
using RestSharp;

var client = new RestClient("https://stg.ttix.io/api/v3/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}");
request.AddHeader("X-TT-Platform", "android");
request.AddHeader("X-TT-Retailer", "YOUR_RETAILER_ID");
request.AddHeader("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6");
request.AddHeader("X-TT-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\"\n  },\n  \"payment\": {\n    \"method\": \"CARD\",\n    \"gateway\": \"ADYEN\",\n    \"postalCode\": \"10036\",\n    \"card\": {\n      \"encryptedNumber\": \"adyenjs_0_1_25$encrypted-card-number\",\n      \"encryptedExpiryMonth\": \"adyenjs_0_1_25$encrypted-expiry-month\",\n      \"encryptedExpiryYear\": \"adyenjs_0_1_25$encrypted-expiry-year\",\n      \"encryptedSecurityCode\": \"adyenjs_0_1_25$encrypted-security-code\"\n    },\n    \"options\": {\n      \"threeDSecure\": {\n        \"returnUrl\": \"https://shop.example.com/checkout/complete\"\n      }\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pay with a new card, encrypted by the Adyen SDK
import Foundation

let headers = [
  "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
  "X-TT-Platform": "android",
  "X-TT-Retailer": "YOUR_RETAILER_ID",
  "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "X-TT-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": [
    "amount": 18500,
    "currency": "USD"
  ],
  "contact": [
    "name": "John Smith",
    "email": "john.smith@example.com"
  ],
  "payment": [
    "method": "CARD",
    "gateway": "ADYEN",
    "postalCode": "10036",
    "card": [
      "encryptedNumber": "adyenjs_0_1_25$encrypted-card-number",
      "encryptedExpiryMonth": "adyenjs_0_1_25$encrypted-expiry-month",
      "encryptedExpiryYear": "adyenjs_0_1_25$encrypted-expiry-year",
      "encryptedSecurityCode": "adyenjs_0_1_25$encrypted-security-code"
    ],
    "options": ["threeDSecure": ["returnUrl": "https://shop.example.com/checkout/complete"]]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg.ttix.io/api/v3/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  },
  "payment": {
    "method": "INVOICE"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "12345",
    "confirmationNumber": "T123456789012",
    "customerId": "c.pm2fiairy2y6a6rpbf5",
    "contact": {
      "name": "John Smith",
      "email": "john.smith@example.com",
      "phone": "+12125550123"
    },
    "items": [
      {
        "id": "12345",
        "event": {
          "id": "123",
          "name": "Hamilton"
        },
        "occurrence": {
          "id": "456",
          "startsAt": "2026-03-15T19:30:00-04:00",
          "doorsOpen": {
            "at": "2026-03-15T19:00:00-04:00",
            "description": "Doors open 30 minutes before the performance."
          },
          "notices": [
            {
              "name": "Audio-described performance",
              "description": "Live audio description for visually impaired patrons."
            }
          ]
        },
        "venue": {
          "id": "UmljaGFyZCBSb2RnZXJzIFRoZWF0cmU",
          "name": "Richard Rodgers Theatre",
          "address": {
            "line1": "226 W 46th St",
            "line2": "Suite 200",
            "city": "New York",
            "state": "NY",
            "postalCode": "10036",
            "country": "US",
            "latitude": 40.759,
            "longitude": -73.9845
          },
          "timezone": "America/New_York"
        },
        "inventoryVariant": {
          "_type": "AssignedSeat",
          "attributes": [
            {
              "name": "Limited Legroom",
              "category": "NEGATIVE",
              "description": "Seats in this row have reduced legroom due to a safety barrier."
            }
          ],
          "id": "ORCHESTRA-A-101",
          "name": "Orchestra A 101",
          "row": "A",
          "seat": "101",
          "section": "Orchestra",
          "description": "Closest to the stage",
          "entrance": "Door 4",
          "extendedDescription": "Includes a complimentary drink. **Over 18s only.**",
          "images": [
            {
              "url": "https://example.com/seat-views/orchestra-a-101-center.jpg"
            }
          ]
        },
        "priceOption": {
          "category": {
            "name": "Adult",
            "id": "4471",
            "description": "Ages 3-12"
          },
          "sellPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "id": "eyJwcm92aWRlckNvZGUiOiJGVUxMUFJJQ0UiLCJob2xkQ29kZSI6IjE1NzM5In0",
          "constraints": {
            "requiresCategory": [
              "string"
            ]
          },
          "listPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "discountPercentage": 30,
          "discountAmount": {
            "amount": 18500,
            "currency": "USD"
          },
          "fees": [
            {
              "type": "SERVICE_FEE",
              "value": {
                "amount": 18500,
                "currency": "USD"
              }
            }
          ],
          "maxQuantityPerOrder": 4,
          "promotion": {
            "id": "promo-opening-week",
            "name": "Opening Week Special",
            "description": "40% off Orchestra seats for opening week performances."
          },
          "isDefault": true
        },
        "quantity": 1,
        "delivery": {
          "method": {
            "name": "E-ticket"
          },
          "instructions": "Your e-tickets will be emailed to you before the performance."
        },
        "tickets": [
          {
            "id": "tkt-001",
            "status": "CONFIRMED",
            "assignedCustomer": {
              "firstName": "Jordan",
              "lastName": "Lee"
            },
            "barcode": {
              "value": "TKT-2026-031519-A101",
              "format": "QR",
              "imageUrl": "https://cdn.ttix.io/barcodes/tkt-001.png",
              "link": "https://winterwonderland.tapaygo.com/wallet/add-tag/%24461180642"
            }
          }
        ],
        "giftCards": [
          {
            "code": "GC123456789",
            "value": {
              "amount": 18500,
              "currency": "USD"
            },
            "balance": {
              "amount": 18500,
              "currency": "USD"
            },
            "expiresOn": "2027-10-14"
          }
        ]
      }
    ],
    "receiptLines": [
      {
        "label": "Subtotal",
        "total": {
          "amount": 18500,
          "currency": "USD"
        },
        "sign": "positive",
        "_type": "SubtotalLine"
      }
    ],
    "total": {
      "amount": 18500,
      "currency": "USD"
    },
    "status": "COMPLETED",
    "createdAt": "2026-03-10T14:32:00Z",
    "delivery": {
      "instructions": "Your e-tickets will be emailed to you before the performance."
    },
    "protection": {
      "id": "prot_001",
      "pricePerItem": {
        "amount": 18500,
        "currency": "USD"
      },
      "total": {
        "amount": 18500,
        "currency": "USD"
      },
      "status": "ELIGIBLE"
    },
    "totalTaxes": {
      "amount": 18500,
      "currency": "USD"
    },
    "cancellationVoucher": {
      "code": "PWYHYCRSGZAXKPE",
      "value": {
        "amount": 18500,
        "currency": "USD"
      },
      "type": "CANCELLATION",
      "isExpired": false,
      "balance": {
        "amount": 18500,
        "currency": "USD"
      },
      "expiresOn": "2027-04-20"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://stg.ttix.io/api/v3/orders"

payload = {
    "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "expectedTotal": {
        "amount": 18500,
        "currency": "USD"
    },
    "contact": {
        "name": "John Smith",
        "email": "john.smith@example.com",
        "phone": "+12125550123"
    },
    "payment": { "method": "INVOICE" }
}
headers = {
    "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
    "X-TT-Platform": "android",
    "X-TT-Retailer": "YOUR_RETAILER_ID",
    "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "X-TT-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://stg.ttix.io/api/v3/orders';
const options = {
  method: 'POST',
  headers: {
    'X-TT-Device-Data': '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform': 'android',
    'X-TT-Retailer': 'YOUR_RETAILER_ID',
    'Idempotency-Key': '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"cartId":"6aac14d3-5826-4da8-98b6-9e68c28629d6","expectedTotal":{"amount":18500,"currency":"USD"},"contact":{"name":"John Smith","email":"john.smith@example.com","phone":"+12125550123"},"payment":{"method":"INVOICE"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://stg.ttix.io/api/v3/orders"

	payload := strings.NewReader("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
	req.Header.Add("X-TT-Platform", "android")
	req.Header.Add("X-TT-Retailer", "YOUR_RETAILER_ID")
	req.Header.Add("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
	req.Header.Add("X-TT-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://stg.ttix.io/api/v3/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-TT-Device-Data"] = '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}'
request["X-TT-Platform"] = 'android'
request["X-TT-Retailer"] = 'YOUR_RETAILER_ID'
request["Idempotency-Key"] = '6aac14d3-5826-4da8-98b6-9e68c28629d6'
request["X-TT-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg.ttix.io/api/v3/orders")
  .header("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
  .header("X-TT-Platform", "android")
  .header("X-TT-Retailer", "YOUR_RETAILER_ID")
  .header("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
  .header("X-TT-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg.ttix.io/api/v3/orders', [
  'body' => '{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  },
  "payment": {
    "method": "INVOICE"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key' => '<apiKey>',
    'X-TT-Device-Data' => '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform' => 'android',
    'X-TT-Retailer' => 'YOUR_RETAILER_ID',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://stg.ttix.io/api/v3/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}");
request.AddHeader("X-TT-Platform", "android");
request.AddHeader("X-TT-Retailer", "YOUR_RETAILER_ID");
request.AddHeader("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6");
request.AddHeader("X-TT-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
  "X-TT-Platform": "android",
  "X-TT-Retailer": "YOUR_RETAILER_ID",
  "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "X-TT-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": [
    "amount": 18500,
    "currency": "USD"
  ],
  "contact": [
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  ],
  "payment": ["method": "INVOICE"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg.ttix.io/api/v3/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 3

**Request**

```json
{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  },
  "payment": {
    "method": "INVOICE"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "12345",
    "confirmationNumber": "T123456789012",
    "customerId": "c.pm2fiairy2y6a6rpbf5",
    "contact": {
      "name": "John Smith",
      "email": "john.smith@example.com",
      "phone": "+12125550123"
    },
    "items": [
      {
        "id": "12345",
        "event": {
          "id": "123",
          "name": "Hamilton"
        },
        "occurrence": {
          "id": "456",
          "startsAt": "2026-03-15T19:30:00-04:00",
          "doorsOpen": {
            "at": "2026-03-15T19:00:00-04:00",
            "description": "Doors open 30 minutes before the performance."
          },
          "notices": [
            {
              "name": "Audio-described performance",
              "description": "Live audio description for visually impaired patrons."
            }
          ]
        },
        "venue": {
          "id": "UmljaGFyZCBSb2RnZXJzIFRoZWF0cmU",
          "name": "Richard Rodgers Theatre",
          "address": {
            "line1": "226 W 46th St",
            "line2": "Suite 200",
            "city": "New York",
            "state": "NY",
            "postalCode": "10036",
            "country": "US",
            "latitude": 40.759,
            "longitude": -73.9845
          },
          "timezone": "America/New_York"
        },
        "inventoryVariant": {
          "_type": "AssignedSeat",
          "attributes": [
            {
              "name": "Limited Legroom",
              "category": "NEGATIVE",
              "description": "Seats in this row have reduced legroom due to a safety barrier."
            }
          ],
          "id": "ORCHESTRA-A-101",
          "name": "Orchestra A 101",
          "row": "A",
          "seat": "101",
          "section": "Orchestra",
          "description": "Closest to the stage",
          "entrance": "Door 4",
          "extendedDescription": "Includes a complimentary drink. **Over 18s only.**",
          "images": [
            {
              "url": "https://example.com/seat-views/orchestra-a-101-center.jpg"
            }
          ]
        },
        "priceOption": {
          "category": {
            "name": "Adult",
            "id": "4471",
            "description": "Ages 3-12"
          },
          "sellPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "id": "eyJwcm92aWRlckNvZGUiOiJGVUxMUFJJQ0UiLCJob2xkQ29kZSI6IjE1NzM5In0",
          "constraints": {
            "requiresCategory": [
              "string"
            ]
          },
          "listPrice": {
            "amount": 18500,
            "currency": "USD"
          },
          "discountPercentage": 30,
          "discountAmount": {
            "amount": 18500,
            "currency": "USD"
          },
          "fees": [
            {
              "type": "SERVICE_FEE",
              "value": {
                "amount": 18500,
                "currency": "USD"
              }
            }
          ],
          "maxQuantityPerOrder": 4,
          "promotion": {
            "id": "promo-opening-week",
            "name": "Opening Week Special",
            "description": "40% off Orchestra seats for opening week performances."
          },
          "isDefault": true
        },
        "quantity": 1,
        "delivery": {
          "method": {
            "name": "E-ticket"
          },
          "instructions": "Your e-tickets will be emailed to you before the performance."
        },
        "tickets": [
          {
            "id": "tkt-001",
            "status": "CONFIRMED",
            "assignedCustomer": {
              "firstName": "Jordan",
              "lastName": "Lee"
            },
            "barcode": {
              "value": "TKT-2026-031519-A101",
              "format": "QR",
              "imageUrl": "https://cdn.ttix.io/barcodes/tkt-001.png",
              "link": "https://winterwonderland.tapaygo.com/wallet/add-tag/%24461180642"
            }
          }
        ],
        "giftCards": [
          {
            "code": "GC123456789",
            "value": {
              "amount": 18500,
              "currency": "USD"
            },
            "balance": {
              "amount": 18500,
              "currency": "USD"
            },
            "expiresOn": "2027-10-14"
          }
        ]
      }
    ],
    "receiptLines": [
      {
        "label": "Subtotal",
        "total": {
          "amount": 18500,
          "currency": "USD"
        },
        "sign": "positive",
        "_type": "SubtotalLine"
      }
    ],
    "total": {
      "amount": 18500,
      "currency": "USD"
    },
    "status": "COMPLETED",
    "createdAt": "2026-03-10T14:32:00Z",
    "delivery": {
      "instructions": "Your e-tickets will be emailed to you before the performance."
    },
    "protection": {
      "id": "prot_001",
      "pricePerItem": {
        "amount": 18500,
        "currency": "USD"
      },
      "total": {
        "amount": 18500,
        "currency": "USD"
      },
      "status": "ELIGIBLE"
    },
    "totalTaxes": {
      "amount": 18500,
      "currency": "USD"
    },
    "cancellationVoucher": {
      "code": "PWYHYCRSGZAXKPE",
      "value": {
        "amount": 18500,
        "currency": "USD"
      },
      "type": "CANCELLATION",
      "isExpired": false,
      "balance": {
        "amount": 18500,
        "currency": "USD"
      },
      "expiresOn": "2027-04-20"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://stg.ttix.io/api/v3/orders"

payload = {
    "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "expectedTotal": {
        "amount": 18500,
        "currency": "USD"
    },
    "contact": {
        "name": "John Smith",
        "email": "john.smith@example.com",
        "phone": "+12125550123"
    },
    "payment": { "method": "INVOICE" }
}
headers = {
    "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
    "X-TT-Platform": "android",
    "X-TT-Retailer": "YOUR_RETAILER_ID",
    "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
    "X-TT-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://stg.ttix.io/api/v3/orders';
const options = {
  method: 'POST',
  headers: {
    'X-TT-Device-Data': '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform': 'android',
    'X-TT-Retailer': 'YOUR_RETAILER_ID',
    'Idempotency-Key': '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"cartId":"6aac14d3-5826-4da8-98b6-9e68c28629d6","expectedTotal":{"amount":18500,"currency":"USD"},"contact":{"name":"John Smith","email":"john.smith@example.com","phone":"+12125550123"},"payment":{"method":"INVOICE"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://stg.ttix.io/api/v3/orders"

	payload := strings.NewReader("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
	req.Header.Add("X-TT-Platform", "android")
	req.Header.Add("X-TT-Retailer", "YOUR_RETAILER_ID")
	req.Header.Add("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
	req.Header.Add("X-TT-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://stg.ttix.io/api/v3/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-TT-Device-Data"] = '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}'
request["X-TT-Platform"] = 'android'
request["X-TT-Retailer"] = 'YOUR_RETAILER_ID'
request["Idempotency-Key"] = '6aac14d3-5826-4da8-98b6-9e68c28629d6'
request["X-TT-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg.ttix.io/api/v3/orders")
  .header("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}")
  .header("X-TT-Platform", "android")
  .header("X-TT-Retailer", "YOUR_RETAILER_ID")
  .header("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6")
  .header("X-TT-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg.ttix.io/api/v3/orders', [
  'body' => '{
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": {
    "amount": 18500,
    "currency": "USD"
  },
  "contact": {
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  },
  "payment": {
    "method": "INVOICE"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '6aac14d3-5826-4da8-98b6-9e68c28629d6',
    'X-TT-API-Key' => '<apiKey>',
    'X-TT-Device-Data' => '{"device_id":"a1b2c3","device_type":"web","device_os":"ios"}',
    'X-TT-Platform' => 'android',
    'X-TT-Retailer' => 'YOUR_RETAILER_ID',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://stg.ttix.io/api/v3/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("X-TT-Device-Data", "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}");
request.AddHeader("X-TT-Platform", "android");
request.AddHeader("X-TT-Retailer", "YOUR_RETAILER_ID");
request.AddHeader("Idempotency-Key", "6aac14d3-5826-4da8-98b6-9e68c28629d6");
request.AddHeader("X-TT-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cartId\": \"6aac14d3-5826-4da8-98b6-9e68c28629d6\",\n  \"expectedTotal\": {\n    \"amount\": 18500,\n    \"currency\": \"USD\"\n  },\n  \"contact\": {\n    \"name\": \"John Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"phone\": \"+12125550123\"\n  },\n  \"payment\": {\n    \"method\": \"INVOICE\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-TT-Device-Data": "{\"device_id\":\"a1b2c3\",\"device_type\":\"web\",\"device_os\":\"ios\"}",
  "X-TT-Platform": "android",
  "X-TT-Retailer": "YOUR_RETAILER_ID",
  "Idempotency-Key": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "X-TT-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "cartId": "6aac14d3-5826-4da8-98b6-9e68c28629d6",
  "expectedTotal": [
    "amount": 18500,
    "currency": "USD"
  ],
  "contact": [
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+12125550123"
  ],
  "payment": ["method": "INVOICE"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg.ttix.io/api/v3/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```