Understanding the _rental_intent_token
Line Item Property.
_rental_intent_token
is a custom property attached to Shopify order line items that contains crucial information about rental intents in Supercycle. This document explains the structure and purpose of this property. If an item doesn’t have a rental_intent_token Supercycle will not process that item.
_rental_intent_token
is a JSON serialized token that contains all necessary information to create a rental when a customer purchases an item. This token is generated when customers select rental options in the storefront and is processed when orders are fulfilled.
_rental_intent_token
contains the following attributes:
Attribute | Type | Description |
---|---|---|
variant_id | Integer | ID of the variant being rented |
available_item_count | Integer | Number of items available for rental |
schedule | Object | Contains timing information for the rental |
purchase_type | String | Class name of the purchase type:CalendarRental::Purchase, MembershipRental::Purchase, SubscriptionRental::Purchase, Resale::Purchase |
purchase_attributes | Object | Attributes specific to the purchase type |
location_id | Integer | Optional ID of the location for fulfillment |
schedule
object contains timing information for the rental lifecycle:
Attribute | Type | Description |
---|---|---|
prepare_from | ISO Date | When the items reservation will start |
fulfill_at | ISO Date | When the rental should be fulfilled |
rental_start | ISO Date | When the rental period begins |
rental_end | ISO Date | When the rental period ends |
receive_at | ISO Date | When the item should be received back |
restock_by | ISO Date | When the items reservation will end |
minimum_rental_end | ISO Date | Minimum date for rental end |
Attribute | Type | Description |
---|---|---|
credit_cost | Integer | Number of credits required for rental |
Attribute | Type | Description |
---|---|---|
selling_plan_id | Integer | ID of the selling plan associated with rental |
Attribute | Type | Description |
---|---|---|
selling_plan_id | Integer | ID of the subscription selling plan |
deposit_variant_id | Integer | Optional ID of the deposit variant |
create_subscription_contract | Integer | Optional ID of selling plan to create contract |
_rental_intent_token
._rental_intent_token
might look: