I've spent time looking over the APIs and looking at various questions but I want to post this to try and get a direct yes/no.
I know Shopify added support for selling plans in the Storefront Cart API but that requires you send the user to a web link to checkout. They have not added any such support for selling plans in the Storefront Checkout API, that leads me to believe it isn't possible to build an entirely headless checkout experience for subscriptions.
Is it possible to provide a completely headless checkout with Shopify Subscriptions?
For context I've looked at the various APIs for subscriptionContractCreate and notice it requires payment method Id, does that mean I would have to use the admin graphql api to create a customer, create a payment method for that customer to be able to create a subscriptionContract? Rather then the payment token returned when vaulting a card for completing a checkout using the Storefront API.
Any help here would be greatly appreciated, I feel like it should be possible given the APIs I see available.
Thank you for your question!
Sorry, it is not possible to do a completely headless checkout at the moment. We do require that you go through the storefront API and redirect the customer to a web checkout form to complete a checkout.
I don't understand why the selling plan id input is not available with the storefront Checkout API.
In my use case I'm not looking for and entirely headless checkout but I do need to be able to prepopulate the shipping address, which is only possible through the Checkout API.
If you could expand on the why this is not possible, that'd be appreciated.
Thank you for your time,
Thank you for your question.
The `sellingPlanId` input is available in the Cart API, however it doesn't seem to provide the shipping address. Can you explain your use case where you need to use the Checkout API and get the shipping address? I can then check with the Storefront team if we can achieve this with what we have now.
Yes, I'm aware it's in the Cart API. But, we need to offer a list of predetermined shipping addresses for customer's subscriptions before they arrive at the checkout, similar to pick-up locations.
Thank you @pranab for your time,