Using custom line item properties
When a Recharge product is added to the cart, line item properties that define the subscription product and subscription interval are sent along with the product data. You can specify custom line item properties that will be included in the order.
Note
This article pertains to Recharge Checkout on Shopify
Line item property variables
VARIABLE | ALLOWED VALUE |
---|---|
shipping_interval_frequency (required) | Numeric value (eg. 1, 2, 3, etc.) |
shipping_interval_unit_type (required) | Day Week Month |
charge_interval_frequency | Numeric value (eg. 1, 2, 3, etc.) |
charge_interval_unit_type | Day Week Month |
first_recurring_charge_delay Note: The first_recurring_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. | Numeric value (eg. 1, 2, 3, etc.) |
number_charges_until_expiration | Numeric value (eg. 1, 2, 3, etc.) |
charge_on_day_of_month | Numeric value (eg. 1, 2, 3, etc.) |
charge_on_day_of_week | 0 - Monday 1 - Tuesday 2 - Wednesday 3 - Thursday 4 - Friday 5 - Saturday 6 - Sunday |
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="Month" />
</form>
Pass properties via AJAX
For more information on using AJAX to add a product to the cart, visit Add an item to the cart with Ajax. This guide is a good starting point for adding additional parameters to the cart.
Updated over 1 year ago