#Sinduri-billing-address
1 messages ยท Page 1 of 1 (latest)
๐ Happy to help
Which integration do you use? E.g. Payment Element, Checkout... etc
Payment intent
Am I right to assume that you use payment intent with frontend Payment Element?
yes
If you use Payment Element, the default for billing address collection is sent to automatic and doesn't collect all the time. To collect billing address all the time, I'd suggesting to collect billing address collection to never and collect it with your own form: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address
Then you pass the billing address during stripe.confirmPayment(...): https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
Sorry i dont want to collect billing address through stripe payment element as our platform is WooCommerce and the end customer already filling their billing/shipping address on WooCommerce checkout page..
My concerns is whether there is an option to send these address to stripe using crate payment intent API
We are already send shipping address to stripe using this parameter
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-shipping
Likewise can we send billing address to stripe?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I see! Billing address is associated with a payment method instead of payment intent
So you won't be able to add billing address into a payment intent
You can either
- add it during stripe.confirmPayment(..) at the frontend (when payment method is going to get created): https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address; or
- update the billing address to the payment method after it's created: https://stripe.com/docs/api/payment_methods/update
Okay thanks
No problem! Happy to help ๐
Thank you so much for your help