#sargisavetisyan_57365
1 messages · Page 1 of 1 (latest)
Happy to help. What is your question?
Thank you for your quick response.
I want to build a logic for creating a subscription with different products and their prices in one request body. I need to make the subscription so it will charge all prices in one invoice and I want to know have an opportunity to cancel one of them when I want.
@lament garnet I hope that I described my problem clearly.
Can you please check?
Yep totally possible, subscriptions can have up to twenty line items https://stripe.com/docs/api/subscriptions/create#create_subscription-items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@lament garnet I have checked this one.
But the issue is the following: for example I have 3 products and want to make a subscription for those 3 products in one request.
For the first product I want to charge 20$/monthly for 6 months, for the second device I want to charge 50$/monthly for12 months and want to charge 30$/monthly for the third product infinitely until the manual cancelation. How can I add those 3 prices in one subscription body and charge 100$/monthly in one invoice if I want to cancel one of those 3 and continue charging for the remaining 2?
Unfortunately that is not possible in Stripe
Subscriptions can only have items with the same cycle length
Eg all monthly or yearly or every three months
So you would need to create three separate subscriptions here
@lament garnet Ok understood, thanks