#ibrahim menem-subscriptions
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
you could always try place a hold on the card https://stripe.com/docs/payments/capture-later
but I'm not sure if it's really the right thing to do
what events are you listening to in your webhooks?
not sure, we first started listening to payment_intent.failed then changed to invoice.payment_failed
yes the invoice.* events are the ones you should be listening to
I don't know how you would be able to pre-auth unless you do a separate PaymentIntent to place a hold on the card.
so the pre-auth doesn't sound like a good practice?
what would be the ideal workflow?
1 - update subscription
2 - if inovice.payment_failed happens
3 - revert the subscription update with new update
sorry I was just made aware of a feature we have
but there are other ways of achieving this as well
you could do something like a normal Payment Intent where you collect the money
then you create a Customer Balance with that amount
and once that's done, you update the subscription which will create a new invoice. Stripe will then use the Customer Balance to pay that invoice
those are really the 3 options I could think of
like 2 I thought of and one came from my colleague ๐
oh the last one sounds interesting and robust ๐ so we charge, transfer the money to stripe then update the subscription
thank you and to your colleague
is any of them considered better practice than the others?
the one about pending-updates is I think the official way of doing it
I'll investigate that first then, but probably end up implementing the last one
to create a customer balance does it require an api call? or just the payment intent is enough?
yes you'd have to call the API for that
thank you very much 