Sections
When a Recharge product is added to the cart, we submit line item properties that specifies the product as a subscription and defines the subscription interval. In addition to these properties, you can specify custom line item properties that will be included in the order.
Note: This feature is only available for Shopify merchants who installed ReCharge before November 2nd, 2020, and are using the ReCharge Checkout.
Before you start
- We have recently upgraded the Subscription Widget to v3.0. However, this may not work for your store. If you're having difficulty following this guide, please contact us with details.
- This feature will require advanced HTML, Shopify Liquid, and JavaScript knowledge.
Line item property variables
Note: Variables that are bolded are required for the subscription to work.
- shipping_interval_frequency
- shipping_interval_unit_type
- charge_interval_frequency
- charge_interval_unit_type
-
first_recurring_charge_delay
- number_charges_until_expiration
- charge_on_day_of_month
- charge_on_day_of_week
- Monday = 0, Tuesday = 1, etc.
Note: The charge_delay property affects the time period between the first charge and the subsequent second charge. It does not impact the timing of the first charge. The first charge always occurs at the time of checkout.
Pass the properties as a form submit
Below is an incomplete form for adding an item to the cart to demonstrate how the properties must be passed.
<form action="/cart/add" method="post">
<input name="properties[shipping_interval_frequency]" type="hidden" value="1" />
<input name="properties[shipping_interval_unit_type]" type="hidden" value="Months" />
</form>
Pass properties via AJAX
For more information on using AJAX to add a product to the cart, visit Adding an item to the cart with AJAX. You can add the additional parameters into the data described in the guide.