#siddarth_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/1311351055803617400
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- siddarth_api, 1 hour ago, 30 messages
yes it is about same thread.
Hi ๐ the error in the response of the request you shared seems to be different from the one you described in your post. Though it also looks like that failure is being encountered during the Setup Intent confirmation, before processing a subsequent payment.
message: "Payment method data is not allowed when payment_method_options[us_bank_account][verification_method]=instant is used.",
Taking a clsoer look at how you setup the Setup Intent.
hmm ok, but how do i collect the routing , account number in this method if i do not pass payment method. let result = await stripe.confirmUsBankAccountSetup(
setupIntent.client_secret,
{
payment_method: {
us_bank_account: {
routing_number: routingNumber,
account_number: accountNumber,
account_holder_type: 'individual', // 'individual' or 'company'
},
billing_details: {
name: 'test',
email: $('#tbEmail').val(),
},
},
}
); this is my code in front end
Hm, if you remove the payment_method_options.us_bank_account.verification_method parameter from your Setup Intent creation request, what behavior do you then see?
I think explicitly setting that is throwing things off here a bit, and that this will go smoother if that's allowed to default to automatic.
Yup, that's my thinking
Instant verification uses our Financial Connections modal, but that's not what confirmUsBanikAccountSetup triggers.
Maybe we should take a step back first, can you help me understand what type of flow you're trying to build? Like what you want the customer experience to be?
then i am getting an error while making payment, in payment intent api call" Status : invalid_request_error,
Response Message : The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first.,"
"seti_1QPnJYAGbPj5wN7hb7mZBFxh"
'pm_1QPnK9AGbPj5wN7hzoE2T3il'
this is my payment intent code: string post_url = "https://api.stripe.com/v1/payment_intents";
bool IsApproved = false;
var restClient = new RestClient(post_url);
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", $"Bearer {Username}"); //Security key
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("amount", (long?)amount * 100);
request.AddParameter("currency", "usd");
request.AddParameter("confirm", "true");
request.AddParameter("customer", custid);
request.AddParameter("payment_method", pmid);
request.AddParameter("payment_method_types[0]", "us_bank_account");
The Setup Intent is still in a requires_action state, it hasn't been completed.
The Setup Intent is still in a requires_action state, it hasn't been completed. in this case how to proceed, any code snippet or example
Step 5 in our guide for this flow shows how to handle the microdeposit verification:
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#web-verify-with-microdeposits
either by sending the customer to the URL we provide inside the next_action hash on the Setup Intent, or by collecting the microdeposit information from them and making an API request yourself to this endpoint:
https://docs.stripe.com/api/setup_intents/verify_microdeposits
i do not want redirect to another url, so I need to do microdeposit ?
Either approach, redirecting your customer or making an API request, is to handle the microdeposit verification that is being required.
Is that not the flow you're hoping for?
yes, i am expecting the same flow, but not to redirect customer to another url. do you have complete sample code for confirmUsBankAccountSetup method, which requires_action
Yes, it's shown in the guide I linked you to above.
Ok let me try that.
Thank you for your support. I really appreciate.
will the thread ce open or close?
If you have more questions I'm happy to help with those, but if the thread is quiet we'll close it out.
oh ok
if i do not want do microdeposit then what are the other option to complete the setup intent
Ah, I thought that might be the case, and is why I asked earlier what kind of flow you wanted.
In that case you shouldn't collect bank details from your customers yourself. You will want to:
- Add
payment_method_options.us_bank_account.verification_methodback to the Setup Intent creation request, and set its value toinstant. - Then on your frontend, instead of calling
confirmUsBankAccountSetup, you will want to callcollectBankAccountForSetup: https://docs.stripe.com/js/setup_intents/collect_bank_account_for_setup
collectBankAccountForSetup will trigger the use of our Financial Connections modal to handle the instant verification.
so we can not call both collectBankAccountForSetup and confirmBankAccount() in the same flow
You do, as we explain in the Return section of our docs for collectBankAccountForSetup:
Return
When thestripe.collectBankAccountForSetupcompletes successfully, it returns a SetupIntent. If the customer provided their account, the SetupIntent is in therequires_confirmationstate. If the customer closed the dialog without providing their account, the SetupIntent is in therequires_payment_methodstate. Usestripe.confirmUsBankAccountSetupto complete the process.
You use collectBankAccountForSetup to collect the bank account details, then confirmUsBankAccountSetup to confirm the Setup Intent.
ok i got it. thank you!!
Any time!