#RJ01
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Are you referring to the fields not having gaps between them?
You can use Address Element for this, but I'm not sure about the gaps: https://stripe.com/docs/elements/address-element
can we also get the values on those fields? we are planning to save it in our own database..
You can try using spacingGridRow: https://stripe.com/docs/elements/appearance-api
You will get it in your PaymentIntent
Happy to help!
hello
i just remember, we need to get the address details, so we can compute the sales tax before paying. since we are using other API to compute sales tax. we need to pass the address details to it, so we can reflect the sales tax and detailed computation of the amount that the customer needs to pay.
is there any way to get those values even we are not yet creating payment intent..
Are you creating the PI before displaying the Payment Element?
yes
You can get the address details on the frontend here: https://stripe.com/docs/elements/address-element/collect-addresses
With
addressElement.on('change', (event) => {
if (event.complete){
// Extract potentially complete address
const address = event.value.address;
}
})
nice, will try this. thank you!