Using custom line item properties

When a subscription product is added to the cart, line item properties that define the subscription product and subscription interval are sent with the product data. You can specify custom line item properties using custom code.

This guide provides an overview of line item properties and solutions for specifying custom line item properties.

📘

Platform:

  • Recharge Checkout on Shopify

Before you start

This solution requires advanced HTML, Shopify Liquid, and JavaScript knowledge. This type of customization is not supported by Recharge Support as per our design and integration policy. If you require further assistance, please visit the Recharge Agency Partner Directory.


Line item property variables

VariableAllowed value
shipping_interval_frequency (required)Numeric value (eg. 1, 2, 3, etc.)
shipping_interval_unit_type (required)- Day
- Week
- Month
charge_interval_frequencyNumeric 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_expirationNumeric value (eg. 1, 2, 3, etc.)
charge_on_day_of_monthNumeric value (eg. 1, 2, 3, etc.)
charge_on_day_of_week0 - Monday
1 - Tuesday
2 - Wednesday
3 - Thursday
4 - Friday
5 - Saturday
6 - Sunday

Pass the properties as a form submit

The following code block 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 Adding an item to the cart with AJAX. This guide is a starting point for adding additional parameters to the cart.


Need Help? Contact Us