#mkoenke-paymentelement-link

1 messages · Page 1 of 1 (latest)

proper sparrowBOT
peak moon
#

Hi 👋

You can pass it in via the defaultVales.billingDetails

spare rune
#

the docs give this as the example: const element = elements.create('payment', { business: { name: 'Powdur', }, defaultValues: { billingDetails: { email: 'jamie@example.com', }, }, }); but we create the payment element differently

peak moon
#

What does that mean

spare rune
#

we don't use elements.create

#

we import it

#

from '@stripe/react-stripe-js';

peak moon
#

Okay but the parametners you can pass are the same

spare rune
#

got it... is there anyway to get the billing details in the response when we create a payment method with link?

peak moon
#

Client side or server?

spare rune
#

client

peak moon
#

How are you creating the Payment Method? Using Setup Intents?

spare rune
#

no we use createPaymentMethod upon completion of the form

#

we create the payment intent on the server and pass the payment method to create and charge in one step

proper sparrowBOT
peak moon
#

And when you log the result returned you don't see the billingDetails?