#swe_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/1303788001616203828
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
https://discord.com/channels/841573134531821608/1297889797829955584
Please find related thread I had discussed in discord already.
Hello! To clarify, you've used the account numbers here and they don't result in the behaivor desribed there? https://docs.stripe.com/testing?payment-method=sepa-direct-debit#non-card-payments
Yes, I tried creating setup intent using the above account numbers.
Ah, right, these only work for Payment Intents. What specific thing are you trying to test with a Setup Intent?
I am trying to test different scenarios where - bank takes more time to respond in setup intent processing, the bank account entered by the customer isn't active. Basically all scenarios, that applies for payment intent when the customer adds the bank account for the first time.
To clarify, Setup Intents with SEPA will never be in a processing state, nor will they have a delay.
Okay? What are the chances that setup intent request might fail?
But, this doc says that setup intent can move to processing state.
https://docs.stripe.com/payments/setupintents/lifecycle
A Setup Intent for SEPA only creates a Payment Method and a Mandate. I can't think of a reason it would ever fail, really, beyond basic stuff like no required account info provided or something like that.
Other Setup Intents can move to processing, but not for SEPA.
How about other statuses?
requires_payment_method, requires_action?
Could you let us know - out of all the status in setup intent, what are the applicable statuses for SEPA?
If we have the mandate, does that mean that the payment method is valid?
requires_payment_method would be the state of a brand new Setup Intent without payment details yet, so that would apply, but would happen first.
but would happen first. - May I know what do you mean by this?
First as in when you create the Setup Intent, assuming you don't provide payment info initially.
curl --location 'https://api.stripe.com/v1/setup_intents'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Basic <api-key>'
--data-urlencode 'customer=cus_R4TJlaWd2hCI67'
--data-urlencode 'payment_method_types%5B%5D=sepa_debit'
--data-urlencode 'mandate_data%5Bcustomer_acceptance%5D%5Btype%5D=online'
--data-urlencode 'mandate_data%5Bcustomer_acceptance%5D%5Baccepted_at%5D=1680626716'
--data-urlencode 'mandate_data%5Bcustomer_acceptance%5D%5Bonline%5D%5Bip_address%5D=223.196.170.31'
--data-urlencode 'mandate_data%5Bcustomer_acceptance%5D%5Bonline%5D%5Buser_agent%5D=mozilla'
--data-urlencode 'confirm=true'
--data-urlencode 'payment_method_data%5Bsepa_debit%5D%5Biban%5D=AT321904300235473204'
--data-urlencode 'payment_method_data%5Btype%5D=sepa_debit'
--data-urlencode 'payment_method_data%5Bbilling_details%5D%5Bname%5D=test'
--data-urlencode 'payment_method_data%5Bbilling_details%5D%5Bemail%5D=test@abc.com'
Really the best way to know how this works is to try it in test mode.
We are doing confirm and create setup intent in a single step. In sandbox, whatever account number I try, it always returns succeeded setup intent.
Yeah, that makes sense. You're supplying all of the required information up front, including the payment details, so the Setup Intent is instantly creating a Payment Method from that info and, thus, isn't ever going into requires_payment_method status.
Yes, exactly.
In case of payment intent flow, it goes to requires_payment_method for specific scenarios, and that's what confuses us.
requires_payment_method in payment intent might mean that the bank has rejected the payment? ๐ค
Yeah, if a Payment Intent confirmation attempt fails it will usually detach the Payment Method that failed and go into requires_payment_method status as a result.
But that doesn't apply to SEPA Setup Intents because there is no payment involved to fail.
Is it possible that the setup intent which is in succeeded status has a payment method, and that payment method fails at a later point when used in payment intents API?
Yes, of course. There's no way to guarantee any future payment will succeed. The account might have insufficent funds when you try to make the payment. The account might be closed at that point. Lost of reasons it can fail.
What does setup intent mean actually here? Do you make a call to the bank and do verification? May I know what happens behind the screen?
"Yes, of course. There's no way to guarantee any future payment will succeed. The account might have insufficent funds when you try to make the payment. The account might be closed at that point. Lost of reasons it can fail."
-- These failures are acceptable and can be rectified by contacting the bank. Any other errors you envision?
Using a Setup Intent for SEPA creates a SEPA Payment Method with a Mandate you can attach to a Customer and reuse later.
Yes, that's what happens for us. But, does it do any processing at the bank?
There are a ton of possible failure modes for any payment, it's not practical to list them all here.
I don't believe a SEPA Setup Intent will contact the bank in the scenario you're describing.
Got it. For now, it's safe to assume that
Setup intent with confirmation - if returns success can have a valid payment method. Setup intent will not go to processing unlike payment intent or like cards.
Correct.
Thank you so much, this helps a lot. Could you add this to the documentation, so that we don't get confusion during implementation?
I will flag a docs update for this internally, yep.
I had asked earlier in discord, and I was told that this was an issue with the test account numbers.
There was probably some confusion about those test account numbers only applying to Payment Intents. Sorry about that.
Thank you so much for providing this level of clarity. If there were an option to rate this conversation, I would rate 10 on 5. Appreciate it.
Happy to help!