> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emby.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkout Links

> Sell your digital products with ease by sharing a checkout link to select products

Checkout links can be shared or linked on your website which automatically
creates a checkout session for customers.

<Tip>
  Looking for a way to generate Checkout session programmatically? Checkout
  Links might not be the right tool for you. Instead, you should use the
  [Checkout API](/features/checkout/session).
</Tip>

## Create a Checkout Link

Checkout Links can be managed from the **Checkout Links** tabs of the Products section. Click on **New Link** to create a new one.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/create.light.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=458b87bbc24f7d89a9c898022388901d" width="1620" height="2304" data-path="assets/features/checkout/links/create.light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/create.dark.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=7e7c4153f1b971361b5f1569bc04ccaf" width="1620" height="2304" data-path="assets/features/checkout/links/create.dark.png" />
</Frame>

#### Label

This is an internal name for the Checkout Link. It's only visible to you.

#### Products

You can select one or **several** products. With several products, customers will be able to switch between them on the checkout page.

<img className="block dark:hidden" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/checkout_multiple_products.light.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=2bc7d6a7cffb28a266ad4362316625ad" width="3840" height="2500" data-path="assets/features/checkout/links/checkout_multiple_products.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/checkout_multiple_products.dark.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=e8f871f2d08f2165770d5133e36c2251" width="3840" height="2500" data-path="assets/features/checkout/links/checkout_multiple_products.dark.png" />

#### Discount

You can disable discount codes, if you wish to prevent customers from using them.

You can also preset a discount: it'll be automatically applied when the customer lands on the checkout page.

#### Metadata

This is an optional key-value object allowing you to store additional information which may be useful for you when handling the order. This metadata will be copied to the generated Checkout object and, if the checkout succeeds, to the resulting Order and/or Subscription.

## Using Checkout Links

You can share the Checkout Link URL on your webpage, social media, or directly to customers.

<img className="block dark:hidden" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/checkout_link.light.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=dbf368d7430bbe4049f5a86e1c93be88" width="1320" height="1030" data-path="assets/features/checkout/links/checkout_link.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/absolum/Ifc0gU26kXkWly1u/assets/features/checkout/links/checkout_link.dark.png?fit=max&auto=format&n=Ifc0gU26kXkWly1u&q=85&s=d2503b25634813fd37165280d360535d" width="1320" height="1030" data-path="assets/features/checkout/links/checkout_link.dark.png" />

<Warning>
  Checkout Links will go against our API, and redirect to short-lived Checkout session. This means that the Checkout page the user will end up on, are temporary and expires after a while if no successful purchase is made.

  This means that you need to make sure to always use this Checkout Link URL (as shown above). If you mistakenly copy the URL from a Checkout Session, the link will expire.
</Warning>

### Query parameters

You can pass optional query parameters to your Checkout Links.

#### Prepopulate fields

You can prefill the checkout fields with the following query parameters:

<ParamField path="customer_email" type="string">
  Prefill customer email at checkout
</ParamField>

<ParamField path="customer_name" type="string">
  Prefill customer name at checkout
</ParamField>

<ParamField path="discount_code" type="string">
  Prefill discount code
</ParamField>

<ParamField path="amount" type="string">
  Prefill amount in case of Pay What You Want pricing
</ParamField>

<ParamField path="custom_field_data.{slug}" type="string">
  Prefill checkout fields data, where `{slug}` is the slug of the custom field.
</ParamField>

#### Store attribution and reference metadata

The following query parameters will automatically be set on Checkout [`metadata`](/api-reference/checkouts/get-session#response-metadata).

<ParamField path="reference_id" type="string">
  Your own reference ID for the checkout session.
</ParamField>

<ParamField path="utm_source" type="string">
  UTM source of the checkout session.
</ParamField>

<ParamField path="utm_medium" type="string">
  UTM medium of the checkout session.
</ParamField>

<ParamField path="utm_campaign" type="string">
  UTM campaign of the checkout session.
</ParamField>

<ParamField path="utm_content" type="string">
  UTM content of the checkout session.
</ParamField>

<ParamField path="utm_term" type="string">
  UTM term of the checkout session.
</ParamField>
