What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Headless Checkout for Subscriptions

Headless Checkout for Subscriptions

Fuz-Tech
Shopify Partner
4 0 3

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. 

Replies 6 (6)

pranab
Shopify Staff
27 3 3

Hi Fuz-Tech,

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.

Thanks,

Pranab

To learn more visit the Shopify Help Center or the Community Blog.

Phillip_Malboeu
Shopify Partner
21 2 19

Hi @pranab,

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,

Phil

pranab
Shopify Staff
27 3 3


Hi Phil,
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.

Thank you,

Pranab

To learn more visit the Shopify Help Center or the Community Blog.

Phillip_Malboeu
Shopify Partner
21 2 19

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,

Phil

Phillip_Malboeu
Shopify Partner
21 2 19

Do you have an update @pranab ?

Thanks,

Phil

pranab
Shopify Staff
27 3 3

Hi Phil,

Unfortunately, we are not actively looking to expand the Checkout API. We are encouraging the use of Storefront Cart API and we will maintain and expand it's functionality over time.

 

Thanks,

Pranab

To learn more visit the Shopify Help Center or the Community Blog.