> 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.

# Hosted Checkout

Use hosted checkout when TTG's payment page takes the customer's payment, instead of your own `POST /api/v3/orders` call. You create the cart, send the customer to the page, and TTG sends them back to your page once they have paid.

```
Create cart → Send customer to the checkout link → Customer pays → TTG redirects to your confirmation page → You read the order
```

## Open a cart in hosted checkout

Send the customer to this link on the checkout domain TTG set up for your retailer:

```
https://{checkout-domain}/checkout/basket?reference=TTG{cartId}&checksum={cartId}
```

| Parameter | Value |
|---|---|
| `reference` | `TTG` followed by the `cartId` |
| `checksum` | The `cartId` |

The old `checkout#/basket?reference=…&checksum=…` link still redirects to this page with the same query.

The `cartId` is the credential for the order (see [Keep the cart ID](/guides/purchase-flow#keep-the-cart-id)). This link has to carry it, so send it only to the customer who owns the cart, and keep it out of your logs.

### Pre-fill the form

Add these to the link to fill in the customer's details:

| Parameter | Value |
|---|---|
| `shopperemail` | Email address |
| `shoppername` | Full name |
| `shopperphone` | Phone number |
| `shopperphonecountrycode` | Dial code without the `+`, for example `44` |
| `billingpostalcode` | Billing postal code |
| `orderdetails` | A base64 string of the same values as a query string. When present, the parameters above are ignored. |

## Return the customer to your page

After a successful payment, TTG redirects the customer to your retailer's `confirmationRedirectUrl`. TTG sets it for you, so ask your TTG contact. It is a setting per retailer, and each environment has its own.

The URL must be absolute (`https` or `http`). TTG fills two placeholders, and only inside query-string values:

| Placeholder | Filled with |
|---|---|
| `%reference%` | The `reference` from the checkout link |
| `%checksum%` | The `checksum` from the checkout link |

For example, `https://partner.example.com/confirm/?ref=%reference%&password=%checksum%` becomes `https://partner.example.com/confirm/?ref=TTG{cartId}&password={cartId}`.

Customers who book directly on your TTG-hosted storefront, with no cart from you, get the same two values. With no `confirmationRedirectUrl`, the customer stays on TTG's order confirmation page.

Hosted checkout handles 3D Secure itself, so you send no `redirectUrl`.

## Read the booking

The `%checksum%` value is the `cartId`. Look the order up with it, as in [Find out whether a checkout went through](/guides/purchase-flow#find-out-whether-a-checkout-went-through):

```
GET /api/v3/orders?cartId={cartId}
```

It returns only orders placed on the retailer you send in `X-TT-Retailer`.