#grimesbaby-prevent-PM-deletion

1 messages · Page 1 of 1 (latest)

mossy prairie
#

There isn't an API call to prevent the customer portal from doing that.

#

Why are you trying to prevent this? Trying to think if there is another way to address this underlying concern

tacit tulip
#

Thanks for your help.

I'm using Stripe "auth and capture" flow for a tutoring platform (your card is preauthorized at the beginning of the tutoring session, then charged at the end based on the tutoring session length). Sometimes the session goes longer than the amount that was preauthorized, requiring me to make a new PaymentIntent for the new cost. So I want to prevent students from deleting their cards otherwise I can't create that new PaymentIntent

#

I guess I could check my database for "active tutoring sessions"

#

I'm not using Portal anymore for managing cards

mossy prairie
#

I see. So is it your own custom page for managing cards? How might they delete the card now?

tacit tulip
#

Yeah it's my own page so they would delete through a button I provide

mossy prairie
#

So yes correct this would be a check on your side to see if it is appropriate to detach that payment method