# Source: https://polar.sh/docs/features/checkout/links.md

> ## Documentation Index
> Fetch the complete documentation index at: https://polar.sh/docs/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/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=72a31513d6f7226cc17e94b4c58ca2cd" data-og-width="1620" width="1620" data-og-height="2304" height="2304" data-path="assets/features/checkout/links/create.light.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=2a601b4e14c78c6a3a86f4695cb0e874 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=738a28ee21637ac4897fb77cae731173 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=d5be5ff69604d81851a21811342f40f0 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=1dbf2230a8d62f3eca56f143c89bd3d5 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=f8558ed91355eb9c7ff8d06c87948f23 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.light.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=58d314816ed83e11395270b7cae32a05 2500w" />

  <img className="hidden dark:block" src="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=17c40b706377d71c9e5d73b4ee1e1ebe" data-og-width="1620" width="1620" data-og-height="2304" height="2304" data-path="assets/features/checkout/links/create.dark.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=a88117255fb447f2167a901dc44bd786 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=0a69d0efc11e9b8622ff3ccb23f4a6ff 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=09c1d11b23cac91601239d820dadc57f 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=2c64df021ceb0683ac37ceb4ae0192e6 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=74d157d480eb828b0ec4dd180b7e3376 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/create.dark.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=109598098aa62f2e37805ac7bf1d1261 2500w" />
</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/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=0cce5b2ade56d8be88bcecd1b59a9426" data-og-width="3840" width="3840" data-og-height="2500" height="2500" data-path="assets/features/checkout/links/checkout_multiple_products.light.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=81d388ddcfb786bb86cc09d9cf9ba637 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=dbcfdd0c2a27b2d3d29e3cf1448a1904 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=e1374223415627f8c45d1ef4d56a9535 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=efd59ce3ad4738fa316b18ead4a6c93c 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=799013832ed88bfa4a8709e6e31ec13c 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.light.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=93fdb67c6e863d2a3d42b4e6106beecd 2500w" />

<img className="hidden dark:block" src="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=284cedc2ba0bee4bc5a35c8571f9884a" data-og-width="3840" width="3840" data-og-height="2500" height="2500" data-path="assets/features/checkout/links/checkout_multiple_products.dark.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=28ad596f39f0071cdf6ebff24dd924af 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=a458623c56f532dd1107ceb10df8c00c 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=0f3c313cde746fb224893f493f46ec36 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=c7d5cddba9a739f8a6b426aedc94e362 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=232c97d2f61fec1a91697edfcd68a01c 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_multiple_products.dark.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=bfd17425e10cd466072e1238183b5f7e 2500w" />

#### 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/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=0cea22165e21ee7df3bb8b40fd6c802d" data-og-width="1320" width="1320" data-og-height="1030" height="1030" data-path="assets/features/checkout/links/checkout_link.light.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=8eaa90d8814cd2a0bd7da1463bdc76c8 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=a706e71e5ff949498115ec1ef8aa341a 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=bff20c898abc7d24b5f13fc6be80773b 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=19ac59f8dc034a68eefbf60f27c9ac90 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=93e300396799bd58d70012b6bb57e532 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.light.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=232769397ef0a371aec554b8b951a38b 2500w" />

<img className="hidden dark:block" src="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=52995548b0c4a6b960981f91c663174e" data-og-width="1320" width="1320" data-og-height="1030" height="1030" data-path="assets/features/checkout/links/checkout_link.dark.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=280&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=51bafd1fda3dff32a0d380a93294af6a 280w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=560&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=ad493c46a4f264c513bbd7155aa7f8ea 560w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=840&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=5013674a50e89c7712952b968c4800d5 840w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=1100&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=eb532d2bd4a06e919c03d560158a3abd 1100w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=1650&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=599bef0ee892334a94f1a15faa9779c4 1650w, https://mintcdn.com/polar/Ut0vPUvE1pIdMcH2/assets/features/checkout/links/checkout_link.dark.png?w=2500&fit=max&auto=format&n=Ut0vPUvE1pIdMcH2&q=85&s=86d193d3f120d300194d4659c3647228 2500w" />

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