Cart permalinks take customers directly to a store cart or checkout with a pre-loaded cart. When you generate a cart permalink, you direct customers who want to buy a specific product from the sales channel directly to a merchant's store cart or checkout to complete the purchase. Cart permalinks work best for apps that enable customers to buy items from a single merchant. You can use cart permalinks to apply one or more variant IDs to a cart or checkout, or append query parameters to the cart permalink URL to include additional information and attribute an order to your sales channel. Building a sales channel with permalinks requires the lowest integration effort because your sales channel app doesn't need to [request payment processing](/docs/apps/build/sales-channels/start-building#step-3-request-payment-processing), and sync orders, handle disputes, or manage refunds. ## What you'll learn In this tutorial, you'll learn how to do the following tasks: - Create cart permalinks - Modify the checkout - Attribute an order to your sales channel - Apply discounts - Add conversion tracking information - Redirect customers to the Online Store cart instead of checkout ## Limitations [Selling plans](/docs/apps/build/purchase-options/subscriptions/selling-plans) don't work with cart permalinks. ## Scenario You have a sales channel app from which you want to link directly to a merchant's checkout or their online store cart. You want your link to pre-load the cart with two specific products. ## Step 1: Create a cart permalink Add product variant IDs and quantities to the shop URL. ``` http://{shop}.myshopify.com/cart/#{variant_id}:#{quantity}(,...) ``` The following example adds one each of two products to the cart by specifying the product variant IDs (`70881412` and `70881382`) with a quantity of one (`1`): ``` http://{shop}.myshopify.com/cart/70881412:1,70881382:1 ``` ## Step 2 (Optional): Modify the checkout You can append `checkout` query parameters to the cart permalink URL. The following example includes `[email]` and `[shipping_address]` as the checkout fields. `[shipping_address]``[city]` shows how you can use nesting to populate child fields. ``` http://{shop}.myshopify.com/cart/70881412:1,70881382:1?checkout[email]=example@example.com&checkout[shipping_address][city]=thisismyhometown ``` ### Supported checkout parameters
Checkout parameter | Description |
---|---|
checkout[email] |
The email of the customer making the checkout |
checkout[shipping_address][first_name] |
The first name field for the shipping address |
checkout[shipping_address][last_name] |
The last name field for the shipping address |
checkout[shipping_address][address1] |
The address 1 field for the shipping address |
checkout[shipping_address][address2] |
The address 2 field for the shipping address |
checkout[shipping_address][city] |
The city field for the shipping address |
checkout[shipping_address][province] |
The province field for the shipping address |
checkout[shipping_address][country] |
The country field for the shipping address |
checkout[shipping_address][zip] |
The postal code field for the shipping address |