1. Help Docs
  2. Implementation

🧟 Guided Installation for Headless Stores

Implementing Smartrr on headless storefronts using the Shopify Plus API

Note—before implementing Smartrr, it's important to review Shopify's subscription requirements to determine your eligibility for offering subscriptions on your storefront. You must also have inventory tracking enabled for a product to be subscription-eligible.

 

Screen Shot 2022-02-07 at 1.12.14 PM


 

  1. From the Shopify app store, install the Smartrr app.

  2. In your Shopify admin ([your-store-name].myshopify.com), navigate to 'Apps'. The Smartrr app should now show on your app list.


  3. Click on the Smartrr app to open. Navigate to the 'Integrations’ tab and generate a new API token using the button that reads ‘Add New Smartrr API Token’.



    We recommend setting both your Token Nickname and your Application Name as the name of the platform you are authorizing for. We also recommend that Application Name specifically be in all capital letters, without spaces.



    *Note— ensure that token's permissions for Selling Plan are left set at the default selection: Selling Plan: Read. If permissions are toggled to ‘None’ you will not be able to read Selling Plans from the API.

 

 

4.  Use the following endpoint:

https://api.smartrr.com/vendor/selling-plan-group

to call for information about product Selling Plans. Product Selling Plans which are configured in the ‘Product Selling Plans’ in the Smartrr vendor portal. Example:

 

 

5.  From the call response, use the data provided in the sellingPlans[ ] array to power the storefront display. Submit the shopifyNumericId value for the field selling_plan in:

https://<shopify domain>/cart/add

form POST submission in order to attach a Selling Plan as an item added to a customer’s cart. This is required to be a part of cart workflow and not checkout workflow as Shopify does not support subscriptions within the checkout workflow.

 

*Note—the product/variant will need to be enabled for the respective Selling Plan group in the Smartrr vendor portal. These can be detected with the productIds[ ] and/ or variantIds[ ] array.