Skip to navigation

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}
ParameterValue
referenceTTG followed by the cartId
checksumThe 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). 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:

ParameterValue
shopperemailEmail address
shoppernameFull name
shopperphonePhone number
shopperphonecountrycodeDial code without the +, for example 44
billingpostalcodeBilling postal code
orderdetailsA 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:

PlaceholderFilled 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:

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

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