#k3davis_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240386095779151883
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
hi bismark
What types of payment methods are you talking about here?
For instance with Cards you don't need to worry about mandates at all
ah. i am talking mostly about cards, but sometimes us bank account
Gotcha and are you using Payment Element here?
the bank account payment methods are originally created using the skip verification method (routing and account number).
You are creating them server-side?
yes
payment element doesn't support the skip verification method, as of last time i checked.
Gotcha then yeah when you do that you create/confirm a SetupIntent and pass mandate_data for that SetupIntent: https://docs.stripe.com/api/setup_intents/create#create_setup_intent-mandate_data
ok, i should essentially move that from the paymentintent to the setupintent request
Oh, no, that depends on whether you are taking payment initially or not.
Only use a SetupIntent if you are only collecting a payment method for later use.
i'm not taking payment initially in this situation
Okay then yes, that would be when you use a SetupIntent
when i create the paymentintent later though, how do i know what mandate to supply, or do i not need to provide one if i did the setupintent step with the mandate
i should say all my payment intents are working already, it just looks wrong to create a mandate on every paymentintent on an already saved/verified/configured for off_session bank account.
Oh yeah you don't need to re-create mandates each time. The SetupIntent will have a mandate associated with it: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-mandate
thank you that is helpful
i thought i had to provide a mandate id or create a new one each time i used the payment method id to create a payment intent
(just from the shape of the paymentintent object)
You do provide the Mandate ID to your PaymentIntent creation request: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-mandate
ok maybe that's the part that i'm missing. to get the mandate id, i'd have to store either the mandate id itself or the setup intent (to look up the mandate) prior to running the payment intent. currently i'm not saving either of those values in my integration.
i just have top level items like payment id, customer id, etc.
Yep
I'd recommend just storing that mandate ID, that's the easiest route to go here
You'll also want to listen for mandate.updated Events as well
And if a Mandate is disabled then you update your internal data. This will help you prevent disputes as well which would likely occur if you just were creating new mandates each time.
yes, ok. that makes sense. thank you