#varovas

1 messages · Page 1 of 1 (latest)

hard mangoBOT
elder merlin
#

Hi there!

#

You want to update a subscription by removing some subscriptions items? What have you tried so far?

drifting egret
#

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:

  1. 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

hard mangoBOT
inner parcel
drifting egret
#

1 moment pls

#

req_7GIqDjPgCKJjLf

drifting egret
#

Yes, but how to do such update?

#

I mean I want to update the subscription, but only if payment succeeded.

inner parcel
#

You can do that update, but without deleted, you need to use only the supported fields

drifting egret
#

How to tell to API that I want module price to be removed from subscription after update?

inner parcel
#

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

drifting egret
#

I think it does not fit my case. BEcause:

  1. 2 users, 9 Euro each.
  2. 1 module, 10 euro each.

Update:

  1. 4 users, 19 euro each.
  2. 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

inner parcel
#

You can't achieve that. The constraint here is update must not be applied.