I’m building a custom storefront using the Storefront API. I’m able to fetch products, display them, add variants to a cart, build a cart and request the checkout redirect url from shopify. However, the API doesn’t return the correct redirect url if the cart contains subscription products. in the normal shopify page, if you click Checkout and have subscription products, it sends through to recharge. I don’t see any option to pass a parameter to let shopify know you want a recharge url.
the API returns checkout data including the checkout ID and the webUrl:
I was hoping the Web Url shopify returns could be parsed and used to create the correct recharge url but none of the webUrl sections are valid cart tokens
any help or suggestions would be greatly appreciated!
@beppu, I’m building a storefront without the shopify store, using the Storefront API, so I don’t have access to things like cart.js. it seems like I’d need to either load the shopify store page on a server to get the cookie to get from the token from or load a blank shopify cart page… or just build my own subscription billing service using the Admin API…
I would recommend that you send an email to support@rechargepayments.com and ask your question there. I didn’t realize you didn’t have easy access to a cart in your situation, but since that’s the case, I have a feeling you might have to use ReCharge’s API directly to create a subscription. You should ask them, because they’ll know for sure.
I appreciate it’s now a couple of years later, but we have a similar requirement to this and I was wondering if you’d be able to share a bit more of the detail on how you’ve accomplished this - do you have any code snippets you could share?