#mochihealth
1 messages · Page 1 of 1 (latest)
Hello!
This is something you'd have to build yourself
If you were using PaymentElement you could create the PaymentMethod first, and then create or update the PaymentIntent to be the amount you want based on the Payment Method type(https://stripe.com/docs/payments/build-a-two-step-confirmation)
how would i do that with already created prices and products
You'd have to create prices/products that correspond to the cheaper prices you want to charge
or you'd have to apply coupons/discounts
can you apply mutliple discounts/coupons to a subscription
No, you can only apply one
also is there a difference between the inoice.payment_failed and paymentIntent.payment_failed webhook event
like if I wanted to email a customer that their payment failed which event would be preferrable to listen to
You'll probably want to use invoice.payment_failed since that one will also trigger if the customer has no stored payment method and payment can't be attempted
if a customer pays with ach debit and the payment fails is it a good practice to detach the payment method from them so they dont use it again
It really depends on why the payment fails - some reasons (like the account being closed) would make sense to remove, but others like insufficient funds may result in the same bank account working later
but even for the later case doesnt stripe automatically invalidate the mandate which would require the customer to validate the mandate again?
Yeah I believe the mandate would be invalidated in that case
so then wouldnt it just make sense to detach the payment method
if they have to confirm the mandate anyway?
how can i get the mandate associtated with a bank account to see if its inactive
The mandate is something you should be storing it when you receive the mandate.updated event when it becomes active
Mostly we recomend storing it because we don't provide an easy way to get the mandate from the PaymentMethod ID through the API
So if you need it in the future you have all the information available to you
would it be bad to just check if the payment method that was used in the payment_intent.payment_failed event was a bank account and detach it from the customer if it is?