#transpile
1 messages · Page 1 of 1 (latest)
which i think can open door for unsecured transaction
What specific concerns?
is there a way i can add billing information like
Not with the Card Element, no. You'd need to build your own UI for those fields, and pass the values on confirmation: https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-with_element-payment_method-billing_details
FWIW, the Card Element will collect a ZIP/postal code when necessary, but only for cards from certain countries: https://stripe.com/docs/disputes/prevention/verification#avs-check
Generally, a lot of issuers don't requires AVS for payments so we don't collect it
Please the documentation is not clear on how the fields can be passed, i only understand the confirmCardPayment method can be used to confirm paymentIntend secret Id
const paymentResult = await stripe.confirmCardPayment(clientSecret, {
payment_method: {
card: elements.getElement(CardElement),
billing_details: {
name: invoiceFullName,
email: invoiceEmail,
phone: invoicePhone,
},
},
});
You'd pass the billing fields when you use confirmCardPayment, like:
stripe.confirmCardPayment('pi_foo_secret_bar', {
payment_method: {
card: cardElement,
billing_details: {
...
},
},
})```
Yep, exactly that!
Ok, U mean with this i can build a custom UI and have fields for card name, card number and card billing address?
so the values will be passed into the billing_details object for confirmation before the payment is confirmed ?
Yes, exactly. Or update and use the newer Payment Element w/ Address Element which will handle all this for you
The issue i am having with that payment element is the request url
the model requires that a request url is required and redirect users after payment is made to the success page or another
We dont wanna do that one our web app
Thats why i choose to use cardElement
Sorry, don't really understand that part. But sure, still fine to use the Card Element you'll just need to collect the billing details separately (as outlined)