#ajay-subscription
1 messages · Page 1 of 1 (latest)
I am unable to get how this api works for multiple items
in items array I need pass all old products too?
So you want to create a subscription with multiple line items?
not create
update
Have you tried the subscription update API? https://stripe.com/docs/api/subscriptions/update#update_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.
I am on it
but consider above scene
I have multiple items in subscription
Now I can have few possibilities like following
- Remove SMS from subscription
- Remove SMS and add WHATSAPP
- Change old quentity
I'd recommend trying out the API first and see if the outcome matches your expectation.
ok
I will go through
just tell me I need store those ?
https://stripe.com/docs/api/subscriptions/update#update_subscription-items-id
for update qty, remove?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If you want to remove a subscription item, you can use https://stripe.com/docs/api/subscription_items/delete
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
that is also my confusion
https://stripe.com/docs/api/subscriptions/update#update_subscription-items-deleted
then this and above same?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
both same?
Hi, to be honest, I've not tried calling the update API with deleted flag. But my understanding is that they are the same.
so what you suggest
for update subscription follow
https://stripe.com/docs/api/subscription_items
instead
https://stripe.com/docs/api/subscriptions
is better way?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Technically they are doing the same thing, so if
- you just want to update subscription items -> use the subscription_items API
- you want to update the subscription items and other subscription properties -> use the subscriptions API
ok thank you for all help
is there way for subscription pause some days?
and resume too later
Yes, you can use the pause_collection property https://stripe.com/docs/api/subscriptions/update#update_subscription-pause_collection
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.