#tbhaxor - subscription
1 messages · Page 1 of 1 (latest)
Hi there!
You can set items.deleted if you want to delete an item https://stripe.com/docs/api/subscriptions/update?lang=node#update_subscription-items-deleted
I want to make the function generic, so will this payload in request work? { id: stripeItem.id, quantity, deleted: quantity === 0 }
"message": "When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[0][deleted] is not supported."
Getting this error
yep unfortunately that feature doesn't support the deleted parameter on subscription items : https://stripe.com/docs/billing/subscriptions/pending-updates-reference
I see
You already documented everything, great
Is it possible to change the payment behaviour?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
of running subscription?
It must have been stored somewhere in the stripe :/
well it's not really a "mode" or a setting of the subscription so there's nothing to change. That parameter controls how any payment that might be triggered by the specific creation or update you're doing(i.e. https://stripe.com/docs/api/subscriptions/update#update_subscription-payment_behavior is passed along with the actual update parameters you're changing) will be handled. Not sure your question makes sense to me.
Yes it does make sense
I have tried upgrading (increment quantity) the subscription after downgrading (descreat quantity). Why is this invoice is open? The upgrade was done with always invoice. Also, when it be marked paid?
in_1LI8plHn3Zy4ma8ua40YbSU4
hey @gentle topaz Could you look into this :/
sure, one sec
basically it's open since auto_advance is false on that Invoice. That might be because you used "payment_behavior": "default_incomplete" on the API call that triggered it(you generally don't use the parameter for updates, only creation of subscriptions).
If you set https://stripe.com/docs/api/invoices/update#update_invoice-auto_advance to true on the Invoice object we will pick it up and try to charge it soon
Got it