Skip to content

How can I make an editable subscription via the cart? #208

Answered by sags95
gsumo asked this question in Help
Discussion options

You must be logged in to vote

@gsumo If you want to use the typical cart flow: Add products to cart -> swell.cart.submitOrder(). Then by default this will create separate subscriptions for each subscription purchase_option in the cart/order. There is a away to create one subscription with separate items but this would require a different flow as it does not use the cart: https://developers.swell.is/frontend-api/subscriptions#create-a-new-subscription. If you're building a custom checkout then perhaps you can take in the cart items and convert them into the call I linked above to create a single subscription with these items?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by logeshswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
2 participants