#BRData
1 messages ยท Page 1 of 1 (latest)
Hello ๐
The PaymentElement automatically detects which billing details are required based on the PaymentMethod selected.
If you are already collecting the email somewhere and passing it in separately then you can set billingDetails.email to never which should prevent PaymentElement from collecting email
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails
Hmm that might explain some things then
Because I am getting this error when attempting to add in the automaticpaymentmethods
What error exactly?
Ah interesting.. that should work I think.
Based on the example we have here, the syntax looks fine
https://stripe.com/docs/api/payment_intents/create?lang=dotnet
What version of .NET SDK are you currently working with?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah I meant to say what version of stripe-dotnet are you running
thanks
Looks like Support for AutomaticPaymentMethods with PaymentIntent was added in version 39.79.0
https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#39790---2021-11-17
You'll need to upgrade the stripe-dotnet SDK
I cant because that requires a .NETFramework v 4.6.1
Thank you for clearing that up, on the frontend where would I put billingDetails.email = 'never'
Does that go inside of this: const paymentElementOptions = {
layout: "tabs",
};
Whats weird is I am getting this:
But the payment intents are still going through
Also after this change: its still asking for email
Ah I think you can ignore those errors, r.stripe.com is used for reporting.
We might have changed something recently
It shouldn't affect the functionality of your app
Also after this change: its still asking for email
You'd need to setbillingDetails.emailtonever
Ah there's a fields parent property too
What payment method are you selecting?
Huh interesting indeed. Can you share the example PaymentIntent ID?
try setting
billingDetails: "never" // auto | never
}```
Ah LOL
Let me see, must be missing something tiny
Can you share your complete code that you have for elements?
The page you're working with, is it hosted?
Can I see it myself?
Ah I see. All good. Let me check with a colleague about this
Thank you!
Can you share the entire code for the page?
Ofcourse
I wonder if you have a separate input that collects email
Honestly just take al ook at that the checkout.html page
that is exactly what my page is
and I have a <script> with checkout.js
at the bottom of the page
I hvaent changed anything
Ah I think the email field is coming from link authentication element
<!--Stripe.js injects the Link Authentication Element-->
</div>```
You can take that out
NP! ๐ Glad we figured it out
you can remove the billingDetails: never
I would rather them not put in their zip or country
Some fields are required for the Payment to succeed unfortunately. The reason we allow disabling collection for those is if you're collecting them yourself
If so, you can pass them in with confirm call
but if you're not, then you'd need to set billingDetails to auto
Awesome thank you for the help!