I want know how can i get a billing address and set in session in stripe page, i try use address in customer, but i cannot use. My:
onst stripeCustomer = await stripe.customers.create({
email: decoded.ds_email,
// address: {
// city: 'city',
// country: 'country',
// line1: 'line1',
// line2: null,
// state: 'state',
// postal_code: xxxxxxxx
// }
})
const stripeCheckoutSession = await stripe.checkout.sessions.create({
customer: stripeCustomer.id,
// customerAddress: stripeCustomer.address,
payment_method_types: ['card'],
// payment_intent: stripePaymentIntent.id,
billing_address_collection: 'required',
line_items: [
{ price: stripePrice.id, quantity: 1 }
],
mode: 'payment',
allow_promotion_codes: false,
success_url: `http://localhost:3000`,
cancel_url: `http://localhost:3000/#/order`
})