#iRaySpace - BWML-subscription pending update

1 messages ยท Page 1 of 1 (latest)

wise gale
#

๐Ÿ‘‹ happy to help

#

could you please provide a subscription id or request id?

#

๐Ÿ‘‹ happy to help

brittle sierra
#

req_QCkhRwvPkaEJE7

#

I am on test

#

sub_1L7z3kD3RIZCV3tuhQvIGAvX

#

Their billing cycle anchor is the same.

#

the original billing cycle anchor is

wise gale
#

I'm taking a look right now

frosty grove
#

@brittle sierra Taking over here, can you confirm the issue please?

brittle sierra
#

Would like to ask how pending updates work. I believe pending updates are the new values after payment is made.

#

Am I correct?

#

Seems that pending updates are applied even the invoice isn't paid on the subscription that I have updated

#
const updatedSubscription = await stripe.subscriptions.update(existingSubscription.id, {
                payment_behavior: 'pending_if_incomplete',
                proration_behavior: 'create_prorations',
                items: [
                    {
                        id: existingSubscription.items.data[0].id,
                        quantity: existingSubscription.items.data[0].quantity,
                        price: newStripePrice?.id,
                    },
                ],
            });
frosty grove
#

That's correct. I believe the issue here is that you're using collection_method: 'send_invoice'

#

Let me confirm

brittle sierra
#

Okay. Thanks.

#

We have some clients who pay to us through our local payment system, that's why we need to use send_invoice.

#

To accommodate them

#

If it is not possible, will try another method.

frosty grove
#

Makes sense, confirming now!

#

Yep, seems like pending updates won't work with send_invoice subscriptions and instead are just silently applied

brittle sierra
#

Thanks, I guess I have to find my own way.

#

I think, I need to make a custom payment intent on this one with the computed and will make a handler for the incoming payment intent with a metadata to create a prorated subscription (set as paid)

frosty grove
#

Why not instead just manually roll the subscription back if it remains unpaid?

brittle sierra
#

How does it work?

frosty grove
brittle sierra
#

Ohh okay, thanks.

frosty grove
brittle sierra
#

Okay, I dunno about but will test that.

#

Thanks again

#

You can archive this

frosty grove
#

Good luck, np!