#renaissance_mandate-update
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/1502005889471746178
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
renaissance_mandate-update
hey @north geyser , sorry to trouble. i just open this thread to understand why the mandate.update event is happend
The Mandate you created is single use, so after being created and used for a payment it was marked inactive
so that mean every mandate created for single use, after it is used, Stripe will send a mandate.updated event to update us the status? (as currently we try to consume the mandate.update status with status inactive to delete corresponding record in our system.
to prevent this from happening, we need to create the mandate for non-single use?
yes
I mean having the Event is helpful if you for example collect bank details today but charge them in 2 months, you might not remember the Mandate was single use
but if you want to re-use that bank account more than once you should do a multi-use Mandate
single use: you plan to only charge once, future payments would be on session where the customer is buying again and signing another agreement to be debited
multi use: all the other cases
sure. sorry for a small question. i checked the code base and AI, the params we pass to stripe (on test sandbox mode) has no ON_SESSION param explicit setup. thus the mandate should be multiple use. can you help me check why the mandate is created with single use?
same event id evt_1TUVdtFXfYQzZWMaD78KnVPB
Hello ๐
I'm taking over as my colleague has to go
The mandate you referenced was created as a result of this API request: https://dashboard.stripe.com/test/logs/req_OOV1yoUCTiahCd
You are passing mandate_data explicitly here. This is for a single Payment Intent. So it created a single-use mandate.
What I find strange is that you already had a multi-use mandate for this Payment Method when you created it in this request: https://dashboard.stripe.com/test/logs/req_zvDB0b7hdBveqW
๐
The difference is the Intent being used.
The Payment Intent is used to create a one-time charge to the Customer so when you provide the mandate data is creates a single use mandate
Setup Intents are used to save Payment Methods for future use so that creates a multi-use mandate
thanks for the investigation! while not fully understand but i think i may catch up a bit. would like to see whether we can have payment intent that although just tries to charge the customer once, but do not create single-use mandate? (as we don't wanna receive an udpate from Stripe that the mandate is inactive)
In that case, if you've already saved the Payment Method with a multi-use mandate, you would not provide mandate_data in your Payment Intent.
let me have a check.
You can find the mandate on the Payment Method object and you can retrieve the Mandate object via our API: https://docs.stripe.com/api/mandates/retrieve
So you can check the status and type properties
so generally, the suggestion from above (1) check the mandate info via above retrieve endpoint (2) decide whether to provide mandate params from 1. before calling stripe payment_intents endpoint?
while from our codebase i saw we setup intent with default mandate params (which should create the multi-use mandate), so i think it should be safe we skip the mandate_data when calling payment_intents endpoint?
Okay so, for these us_bank_account payment methods, you would only need to provide the mandate_data if you did not already have an existing multi-use mandate.
So, to determine if you need to provide mandate data
- Get mandate ID from Payment Method
- Retreive Mandate object to determine if it is
activeandmulti-use - If true, omit
mandate_datafrom Payment Intent params; if false, include mandate data (this will create a single use mandate but at least the payment will go through)
If your codebase is creating multi-use mandates as part of saving the payment method (which is what it looks like), you will likely wind up omitting the mandate_data most of the time
You should receive the mandate.updated event when a mandate changes (e.g. becomes inactive) so you will know if/when you need to create a new one.
gotcha! thanks for clear clarification. may chat with my team for above information