#Arvind hariharan
1 messages · Page 1 of 1 (latest)
yep, we know, we've been talking about it for weeks with you now 🙂
so what's the next question?
Hi
I have been writing integration test cases for stripe ACH instant and micro deposit verification
i was able to succesfully write the test case for Micro deposit flow
But i am not able to get the Instant Verification flow process to be successful when i am setting the payment method type as us_bank_account
Alternatively i tried setting the verification method as INSTANT in the payment method options
What does a failure look like? Is there an error?
yes
let me send over that
this is the error i get
i cannot set both payment method as us_bank_account and use instant verification
can you please help out here
Cos if i dont set payment method then i am not able to confirm the payment intent
or if i only set payment method and do not set instant verification, then it doesnt take me through the instant verification flow and my confirm payment intent status is changed always to requires_action state
and treats it as microdeposit flow
so wanted to understand what excatly i must be doing
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I am, please be patient
ok sure
Why are you confirming server-side? You should be calling confirmUsBankAccountPayment in your front-end
we have already integrated our code to confirm it server side and the code is working fine
we are able to confirm the payment intent
Clearly not as the error you shared is from that code
this code is getting called from our test class
You can't confirm server-side in the instant verifications flow, you need to call the Stripe.js method I shared to initialise the bank account selection/verification
so from server side even if i set the payment method as us_bank_account and create the payment intent, while confirming it would go thorugh the micro deposit flow only is it ?
only when we collect the bank account details from client side we get the instant verification flow and while confirming the payment intent it chnages the state to processing?
I believe so yes
ok so i can only test the micro deposit flow from my integration test class dynamically . And for instant verification i need to mock the confirm payment response and assert?
is my understanding right
?
Yes seems about right. But you probably won't be able to test the instant verification flow. We just recommend that you stub/mock responses from the API
okay fine
Also with the test account numbers i cannot create a payment method and test it is it?
dynamically
What specifically do you want to test?
instant verification from my integration test class
You can't automate instant verification testing no as it requires user interaction (i.e. you present the UI to them, and then connect with their bank and select the deposit account)
okay then just trying ti understand on this piece in the doc
I am trying to use this code
What about it?
Cant we set this verification method to instant while creating payment intent?
but only issue is here in this code they are not setting payment method
and thats y the confirm payment intent fails
so wanted to know, i cannot take this route as well?
Yeah you can, but you can't test thew front-end flow which is where the instant verification actually happens
That link you sent is just a way to only allow instant verification
hmm okay so for instant as you said we need to mock the payment intent confirm call
since its tightly coupled with front end
unlike micro deposit where i am able to test it dynamically by creating a payment method in the code
Our general recommendation is to just not test these UI payment flows (like instant verification)
i did not get you?
I'm not sure how you expect to automate an instant verification test when it requires user interaction
So, you just don't
And instead you mock responses from our API that simulate the scenarios you want to test
yeah okay got it thanks