#lumen

1 messages · Page 1 of 1 (latest)

tiny wharfBOT
agile swift
#

But some payment method types require a minimum amount of billing address data so the fields will always be present

crisp dew
#

Can you help me understand how to use elements.create('payment')?

To add a <PaymentElement /> to my form, I'm importing it from the library like so:

import { PaymentElement } from '@stripe/react-stripe-js'

At no point in my code am I calling elements.create('payment'). I'm a bit confused about how I'd pass the parameters from the docs page you've linked to to my <PaymentElement/>.

agile swift
#

You don't need elements.create() if you're using React. You'd just pass it as a prop to the component:

crisp dew
#

This is perfect, that's exactly what I needed! Thank you so much for your help!

agile swift
#

np

dawn void
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!