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:
"id": "Z2lkOi8vc2hvcGlmeS9DaGVja291dC8wN2U2M2JjYWIyYjUzZGM2YWM0NmNiY2I2YWJiY2E1Yj9rZXk9NGFjNjZmZjNjYTJhOGQyYzI1YjQzZDFhNmI0MGQ5MDU=", "webUrl": "https://checkout.myshopify.io/1/checkouts/07e63bcab2b53dc6ac46cbcb6abbca5b?key=4ac66ff3ca2a8d2c25b43..."
while rechage expects the url:
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 firstname.lastname@example.org 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.
|an hour ago|
|2 hours ago|