> For the complete documentation index, see [llms.txt](https://docs.tebex.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tebex.io/developers/headless-api/guides/checkout.md).

# Checkout

When the user is ready to checkout, direct the user to the basket's  `links.checkout` URL. This is part of the BasketLinks object.

The user will enter their payment information on a secure Tebex-hosted website and complete the checkout.

If you'd like the user to stay on your site during checkout, use [Tebex.js](https://docs.tebex.io/developers/tebex.js/overview.md) alongside the Headless API.

{% hint style="warning" %}
For most stores, authorizing the user against the basket is required before checkout.&#x20;

You can do this by directing the user to the appropriate link provided by the **/baskets/auth** endpoint. See [Authorize a Basket](https://docs.tebex.io/developers/headless-api/guides/baskets/authorize-a-basket.md)
{% endhint %}

## The BasketLinks object

```json
{"openapi":"3.1.0","info":{"title":"Tebex Headless API","version":"2.1.0"},"components":{"schemas":{"BasketLinks":{"properties":{"payment":{"description":"The `links.payment` property is only returned if the basket has been paid for and a payment exists with the `complete`,`refund`, or `chargeback` status.","type":"string"},"checkout":{"description":"The `links.checkout` property is only returned if the basket has not been paid, and is the URL to send the customer to make payment","type":"string"}}}}}}
```
