Cart permalinks

Using cart permalinks lets you create a curated checkout experience for your customers. When you create a cart permalink, you can select the product variants, quantities, and discounts that you want to apply.

You can create a cart permalink from your Shopify admin on the product details page with the Buy Button, or you can manually create and customize a cart permalink directly.

You can embed cart permalinks in webpages as regular links or buttons, or share them with directly with customers. You can share cart permalinks in email campaigns, social media posts, or chat messages. The same link is reusable, and creates a new checkout for each customer.

Create a cart permalink from your Shopify admin with the Buy Button

If you have the Buy Button channel installed, then you can create a cart permalink from any product details page.

The cart permalink created with the Buy Button uses the following URL format:

https://my-shop-name.myshopify.com/cart/variantIDnumber:1?channel=buy_button

By default, a cart permalink includes one variant, and adds a quantity of 1 to the cart. If you want to add more variants and quantities to a cart permalink, then you can create a cart permalink manually instead.

Steps:

  1. From your Shopify admin, go to Products.

  2. Click the product that you want to create a cart permalink for.

  3. Click the More actions dropdown menu, and then click Create checkout link.

  4. Select a product variant.

  5. Click Copy link.

Create a cart permalink manually

You can manually construct a cart permalink by piecing together your store's cart page link, and one or more variant IDs. You can also customize the elements of your cart permalink to set parameters for anyone who uses the link, such as having the link add a quantity of 3 to the cart instead of 1.

You can review examples of cart permalinks to explore how some parameters are formatted.

Steps:

  1. Starting with your store domain, add /cart/ at the end. For example, https://my-shop-name.myshopify.com/cart/.
  2. Add one or more variants by using variant_id:quantity, separated by commas if you want to add multiple variants. Learn how to find a product's variant ID.
  3. Optional: Customize your cart permalink to append query parameters to the cart permalink URL, such as applying discount codes or attributing the order to a sales channel.

Customizing a cart permalink

You can customize a cart permalink by adding a set of query parameters after the ? in the link. You can customize a cart permalink in the following ways:

Learn more about formatting requirements when customizing cart permalinks.

Examples of cart permalinks

Review the following examples of cart permalinks to check how to format permalinks manually depending on your parameters.

Cart permalinks containing one product variant

A one-variant cart permalink that adds a quantity of 1 to the cart displays similar to the following example:

https://my-shop-name.myshopify.com/cart/36485954240671:1

Cart permalinks containing multiple product variants

A cart permalink with multiple variants and quantities displays similar to the following example:

https://my-shop-name.myshopify.com/cart/36485954240671:3,31384149360662:1

Cart permalinks that are powered by Shop Pay

A cart permalink that initiates a checkout powered by Shop Pay displays similar to the following example:

https://my-shop-name.myshopify.com/cart/36485954240671:1?payment=shop_pay

Cart permalinks containing a discount code

A cart permalink powered by Shop Pay that includes the discount code 15off displays similar to the following example:

https://my-shop-name.myshopify.com/cart/36485954240671:1?payment=shop_pay&discount=15off

Cart permalinks for a cart page

A cart permalink that directs customers to a populated cart instead of checkout displays similar to the following example:

https://my-shop-name.myshopify.com/cart/36485954240671:1?storefront=true
Can’t find the answers you’re looking for? We’re here to help.