#rssv
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
you can either use the https://stripe.com/docs/elements/address-element
This is the thing I was looking for, thanks.
Which ones are required?
all are optional
as described here https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You specified "never" for fields.billing_details when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.phone when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment().
why not just pass never to the values you don't want to collect https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails
So I don't need to collect personal information such as billing address?
instead of passing it to billingDetails
Can I send random information?
what are you trying to achieve here?
The website I'm working on it have decent customer base and the owner of website told me that asking sensitive informations might end up them not purchasing non-physical products.
this is not sensitive information
this is a billing address
you're not asking for PII
Phone number etc
Most of the people (like me) are putting same address they living because they don't own a company
Either I'm randomly put something or putting my own house address
billing address can be your home address I don't really see the issue with that
Yes, I definetely agree with that but since I'm not owner of the website, he asked me if we can randomize the billing details.
you can choose not to collect it
I already set billingDetails as never, but it still requires while submitting the form
not really, you wanted to pass in the name that's why we started this whole journey down the rabbit hole
I want to pass the name because if I don't, stripejs returns error
IntegrationError: You specified "never" for fields.billing_details when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.name when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment()
When I pass the name, it asks for e-mail, after that phone number
I don't know if I'm dumb or not, but as I understand, the error tells me that I have to pass a name even if I setup as never
Yes, if you opt out of auto collection via payment element you then need to manually provide it
What happens if I send random billing information
The never is a configurations for the payment element only, the field still needs to be collected
I can't advise on that, you need to send valid customer information
Would that harm the company except disputes?