#sai_rez-sub-pending-setup-intent

1 messages · Page 1 of 1 (latest)

rustic garden
#

Hey! Any subscription where no immediate payment is needed (coupon, free trial) will return a pending_setup_intent

indigo gale
#

Would that be the case on an active subscription?

rustic garden
#

Do you have a specific example?

#

A subscription would have status: 'active' if you applied a coupon that permitted a free period, yes

#

And subsequently there should also be pending_setup_intent

indigo gale
#

I need to recreate a scenario where a user has an active subscription with a pending setup intent with their latest invoice being paid using a payment intent e.g this customer here
cus_Koc3J4wEWrDo2o

rustic garden
#

pending setup intent with their latest invoice being paid using a payment intent
You'd never have both

#

You'd only ever have a pending_setup_intent on creation of the initial subscription when payment isn't immediately due

#

You can't force that retrospectively on an existing subscription

indigo gale
#

I see, what would be the best way to replicate the state the user I posted is in?

#

It seems his latest invoice is paid using payment intent but the sub still has a pending setup intent

rustic garden
#

This subscriptipn? sub_1KkLxpLmu5QiBx4B7k5IHf2y

#

I guess the pending_setup_intent field isn't clear after successful invoice payments

indigo gale
#

Yes that subscription

#

So it should be clear after the invoice payment? It's causing a bug on our app and I am trying to recreate the scenario so we can implement a fix,

rustic garden
#

Ah, wait. This is an Indian customer?

indigo gale
#

Yes

rustic garden
#

I guess this is related to changes we made to accomodate RBI regulations changes for recurring payments: https://support.stripe.com/questions/rbi-regulations-guide-for-stripe-billing-and-invoicing-users

#

The Setup Intent is probably required in all cases for Indian customers as we need to collect mandates for all recurring Indian payments

indigo gale
#

I see so for Indian users, regardless if they have paid their latest invoice they would have a pending setup intent, the behaviour is expected?

rustic garden
#

Just checking on that

indigo gale
#

Thanks for that

rustic garden
#

So attaching a pre-existing payment method as the default to the sub will create the Setup Intent in case of mandate requirement

indigo gale
#

Ok thanks for that, is that only for Indian customers or all users?

solid nova
#

as far as I know it could be for all, if you attach a PaymentMethod directly to the customer(because generally you shouldn't do that, you should use SetupIntents upfront to accept and save the card) and a mandate is needed, or if 3D Secure is needed, we probably create a pending_setup_intent to use.

indigo gale
#

Ok thanks for the information