How to Create Custom Checkout Links With Prefilled Data on Shopify

Tomas Janu

|

October 19, 2022

How to Create Custom Checkout Links With Prefilled Data on Shopify

Learn how to construct a Shopify checkout permalink with custom products, quantities, discount, and prefilled customer data like name or email.

How to Create Custom Checkout Links With Prefilled Data on Shopify

If you need to create a direct link to your Shopify checkout, you can now do that using Checkout Links. In the past, this was possible using a Buy Button sales channel, but the customizations were very limited.

Now you can construct a permalink and specify parameters like products, quantities, payment method, discount, etc. You can also prefill the customer information with data.

Upsell with Candy Rack

How to Construct the Checkout Permalink

The basic format is

https://your-store.myshopify.com/cart/[VARIANT-ID]:[QUANTITY]?payment=[PAYMENT-METHOD]&discount=[DISCOUNT-CODE]

so for example

https://tom-jarvis.myshopify.com/cart/36758139633829:2?&discount=TEST10

To add multiple products, you can add a comma after the quantity parameter of the first product. Just like this

https://tom-jarvis.myshopify.com/cart/36758139633829:2,36758135668901:3?&discount=TEST10

If you don't want to add any products to the cart, but only redirect customer to the checkout use following format. Please note customer needs to have some product(s) in the cart.

https://your-store.myshopify.com/cart/checkout?payment=[PAYMENT-METHOD]&discount=[DISCOUNT-CODE]

Keep in Mind

  • You can also use your custom domain in the URL. The checkout link will work with both but always redirect to your default domain.
  • You can only use the variant ID, not the product ID. Even if the product has no variants, it always has a variant ID that is actually different from the product ID. See how to find a product's variant ID.

How to Prefill Customer Data

Besides generating the standard checkout, you can also add a few parameters and prefill customer data (if you know them) to make the checkout process more straightforward. For example

https://tom-jarvis.myshopify.com/cart/36758139633829:2,36758135668901:3?&discount=TEST10&checkout[email]=somebody@store.com&checkout[shipping_address][last_name]=Test&checkout[shipping_address][address1]=Test&checkout[shipping_address][city]=Test&checkout[shipping_address][zip]=12345&checkout[shipping_address][country]=US&checkout[shipping_address][province]=NY

Shopify checkout with prefilled customer data

In our example above, you can see all the shopper information are prefilled, and customer can simply continue to the next step without any input.

List of Available Parameters

Parameter Description Example value
checkout[email] Customer's email johndoe@gmail.com
checkout[shipping_address][first_name] First name John
checkout[shipping_address][last_name] Last name Doe
checkout[shipping_address][address1] Shipping address (street) 2279 Oakwood Avenue
checkout[shipping_address][address2] Additional address (optional) 2nd floor
checkout[shipping_address][city] City New York
checkout[shipping_address][zip] ZIP code 10038
checkout[shipping_address][country] Country United States
checkout[shipping_address][province] State or province NY
payment Shop Pay checkout shop_pay

Using custom generated checkout permalinks can be a powerful tool, especially if you can integrate them into your existing email marketing tools or any CRM database.

You can also create direct buy links and insert them in your ads, social media content, or even a site running on a different platform (i.e., blog on WordPress).

And there are probably dozens of other use cases when direct checkout links can be handy. For example, we are using it on our preview store for the Last Upsell app because we need visitors to go through the checkout as fast as possible to see the post-purchase offer.

If you are looking for more ways how to optimize or customize your Shopify Checkout, make sure to check our ultimate guide to Customize & Optimize Your Shopify Checkout.

Start your Shopify store for free and pay only $1 for the first monthStart your Shopify store for free and pay only $1 for the first month

Tomas Janu

Tom loves writing about upselling, conversion optimization, and e-commerce trends. He is one of our co-founders, and you can sometimes talk to him if you contact our support team. Make sure to follow him on LinkedIn for more Shopify-related tips and news.

Latest articles

All articles

Boost your Shopify business with our apps

All our apps are designed to help you grow your Shopify business. Check them out and take advantage of the free trial period.

Boost my Shopify