These Smart Links rely on URL arguments in order to achieve a desired outcome. Some of the arguments are optional and some are required for the Smart Link to load in properly.

URL Beginning

All Smart Links must start with the example Protocol, Domain and Path where the Domain is the store that the this Smart Link is used for. Preceding the Domain must be the path of /apps/rebuy/cart.


// Example of the beginning URL

After this path then you can add in the desired arguments. Below is a basic example of adding one item to the cart and redirecting the customer to Shopify Checkout. Below we are specifying the variant ID to be added, the quantity of this variant and where we would like the customer to land once the logic has ran.

Try copying the below into a new tab and see what happens.
// Decoded URL example

Required Arguments

variantsArray of comma separated integers. e.x. [123456, 7891011]The variant ID's that will be added to the cart.
quantityInteger e.x. 1The quantity of the variant to be added.
redirectshopify_checkout, cart or recharge_checkoutThe page that the customer will land on once the logic has finished. *Will be

Optional Arguments

clear_cartyes or noIf yes, then any items in the customers cart will be removed. If no, then any items that may be in the customers cart will not be removed.
smart_cart_showyes or noIf yes and the merchant has the Rebuy Smart Cart enabled then the Smart Cart will open once the customer has been redirected. *This only works on custom landing pages and the merchant must have the Smart Cart enabled. If no, the Smart Cart will not show once redirected.
discountString/text. E.x. 20OFFA discount code that will be applied once the logic has ran.
messageString/text. E.x. "Thanks for shopping with us."A dismissible banner message that will appear at the top of the screen once the logic has ran.
landing_pageshopify_checkout, cart, recharge_checkout or a subdomain such as /collections/all*Note: This will be released soon and will be taking place of the redirect argument, although we will still support the redirect argument. The location that the customer will be redirected to once the logic has ran.


Below is an example with one product being added to cart, the cart being cleared of its original items, a custom page that the customer will land on, the Smart Cart opening once they get there and a dismissible banner message displaying and following them through their session. There are also product properties that are being added to these items which is a bit easier to see in the decoded example further below.
// URL decoded
variants[42120411087081][properties][_attribution]=Rebuy Cart&
variants[42005931065577][properties][_attribution]=Rebuy Permalink&
message=Thanks for shopping with us!&