#Mike Smith
1 messages · Page 1 of 1 (latest)
Hi there! Are you using the PaymentElement or something else?
Hi, I'm using the PaymentElement
Hm, I'm not able to reproduce this on my end. Here's what I see:
Can you share your frontend code, or link to a test environment where I can try to reproduce?
I'm using the same React code you have on the docs: https://stripe.com/docs/payments/quickstart?client=react
return (
<form id="payment-form" onSubmit={handleSubmit}>
<LinkAuthenticationElement
id="link-authentication-element"
onChange={(e) => setEmail(e.target.value)}
/>
<PaymentElement id="payment-element" options={paymentElementOptions} />
<button disabled={isLoading || !stripe || !elements} id="submit">
<span id="button-text">
{isLoading ? <div className="spinner" id="spinner"></div> : "Pay now"}
</span>
</button>
{/* Show any error or success messages */}
{message && <div id="payment-message">{message}</div>}
</form>
);
ah, gotcha!
The topmost Email field corresponds to the Link Authentication Element
You can try to comment this out if you don't plan on integrating with this element, or separate this with some headings so it's clear these are two separate things
id="link-authentication-element"
onChange={(e) => setEmail(e.target.value)}
/>```
Ah, thank you! That did it.
I have one more question. The Enter bank details manually instead link that's at the bottom. Is there a way to turn that off if you don't want a user to enter the details manually?
Yep! You'll want to pass payment_method_options[us_bank_account][verification_method]=instant in that case: https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#instant-only-verification
When creating the PaymentIntent, that is
Thank you for the help!
sure thing!
I'm getting an error when setting that flag. I'm sure it's some kind of syntax error. What am I doing wrong here? -d "payment_method_options[us_bank_account][verification_method]=instant[financial_connections][permissions][]"=payment_method
ah, you can omit [financial_connections][permissions][]"=payment_method
so the full line should be:
-d "payment_method_options[us_bank_account][verification_method]"=instant
Thanks!
Hmm, now getting a different error
-d amount=1099 -d currency=usd -d setup_future_usage=off_session --data-urlencode customer="{CUSTOMER}" -d "payment_method_types[]"=us_bank_account -d "payment_method_options[us_bank_account][verification_method]"=instant -d "payment_method_options[us_bank_account][financial_connections][permissions][]"=balances
{
"error": {
"message": "The "payment_method" permission needs to be requested when payment_method_options[us_bank_account][financial_connections][permissions] is included.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_3Wql3zc6ROD9Ih?t=1682552564",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ah, looks like [financial_connections][permissions][]"=balances was still included in that request