# Checkout

## Create a checkout url

<mark style="color:green;">`POST`</mark> `https://plugin.tebex.io/checkout`

Creates a URL which will redirect the player to the webstore and add the package to their basket.

#### Headers

| Name           | Type   | Description                 |
| -------------- | ------ | --------------------------- |
| X-Tebex-Secret | string | The secret key of a server. |

#### Request Body

| Name        | Type   | Description                                         |
| ----------- | ------ | --------------------------------------------------- |
| package\_id | string | The ID of the package the players want to purchase. |
| username    | string | The username of the player.                         |

{% tabs %}
{% tab title="201: Created " %}

```json
{
  "url": "http://example.tebex.io/buy/gj48f",
  "expires": "2015-11-30T18:10:18+0000"
}
```

{% endtab %}
{% endtabs %}
