Storefront API
Rental intent
Getting a rental intent token.
To fetch a rental intent token, you will need the ID of the option that you are wanting to create a rental for, the option ID’s can be found under the configuration metafield of the product
product.metafields.supercycle.subscription_configuration
product.metafields.supercycle.membership_configuration
product.metafields.supercycle.calendar_configuration
Here is what the calendar_configuration
metafield looks like, each rental period option will have a global_id
.
You will need to provide
- The
global_id
of the option you would like to create a rental. params
for the option.
Calendar
Param | Description | Required |
---|---|---|
rental_start | The date of when the customer would like to receive the item. | Required |
Subscription
Param | Description | Required |
---|---|---|
rental_start | The date of when the customer would like to receive the item. | Optional |
Membership
No parameters.
Fetch rental intent token
POST {proxyPathPrefix}/rental_intents
The response will be a JSON object that will need to be added as a line item property with the key _rental_intent_token
.