#varovas
1 messages · Page 1 of 1 (latest)
Hi there!
You want to update a subscription by removing some subscriptions items? What have you tried so far?
I think I will explain what I am trying to do to make it more clear.
Customer currently have a per seat based subscription.
1 item: 2 users
2 item: 1 module.
I want to create a pending update for this subscription that updated subscription would have:
1 item: 4 users.
What I have tried:
- Update subscription with payment_behavior: pending_if_incomplete. I send:
{
id: 'si_previous_user_stripe_si_id',
quantity: 4
},
{
id: 'si_module_stipe_id',
'deleted': true
}
Then I get an error that deleted is not accepted if payment_behavior is pending_if_incomplete
Hey! Taking over for my colleague.
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
thanks for sharing let me check.
Ok so yeah, that's expected:
https://stripe.com/docs/billing/subscriptions/pending-updates-reference#supported-attributes
Yes, but how to do such update?
I mean I want to update the subscription, but only if payment succeeded.
You can do that update, but without deleted, you need to use only the supported fields
How to tell to API that I want module price to be removed from subscription after update?
you can remove an item but not using the pending_if_incomplete. Not sure if this feets in your use case, but I think you can update the item with proration after the update and remove the item
I think it does not fit my case. BEcause:
- 2 users, 9 Euro each.
- 1 module, 10 euro each.
Update:
- 4 users, 19 euro each.
- remove module.
So customer paid 28 euros. But his update now is 76 Euro, so customer must pay the difference. And If payment fails, update must not be applied
You can't achieve that. The constraint here is update must not be applied.