#siddarth_api

1 messages ยท Page 1 of 1 (latest)

open hullBOT
#

๐Ÿ‘‹ 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.

prime veldtBOT
surreal jolt
#

yes it is about same thread.

celest totem
#

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.

surreal jolt
#

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

celest totem
#

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.

surreal jolt
#

should I remove this line in the setup intent?

#

let me check it

celest totem
#

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?

surreal jolt
#

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");

celest totem
#

The Setup Intent is still in a requires_action state, it hasn't been completed.

surreal jolt
#

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

celest totem
surreal jolt
#

i do not want redirect to another url, so I need to do microdeposit ?

celest totem
#

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?

surreal jolt
#

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

celest totem
#

Yes, it's shown in the guide I linked you to above.

surreal jolt
#

Ok let me try that.

#

Thank you for your support. I really appreciate.

#

will the thread ce open or close?

celest totem
#

If you have more questions I'm happy to help with those, but if the thread is quiet we'll close it out.

surreal jolt
#

oh ok

#

if i do not want do microdeposit then what are the other option to complete the setup intent

celest totem
#

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:

#

collectBankAccountForSetup will trigger the use of our Financial Connections modal to handle the instant verification.

surreal jolt
#

so we can not call both collectBankAccountForSetup and confirmBankAccount() in the same flow

celest totem
#

You do, as we explain in the Return section of our docs for collectBankAccountForSetup:

Return
When the stripe.collectBankAccountForSetup completes successfully, it returns a SetupIntent. If the customer provided their account, the SetupIntent is in the requires_confirmation state. If the customer closed the dialog without providing their account, the SetupIntent is in the requires_payment_method state. Use stripe.confirmUsBankAccountSetup to complete the process.

You use collectBankAccountForSetup to collect the bank account details, then confirmUsBankAccountSetup to confirm the Setup Intent.

surreal jolt
#

ok i got it. thank you!!

celest totem
#

Any time!