#lumen
1 messages · Page 1 of 1 (latest)
Hmm, maybe. Depends. You can try via fields: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields
But some payment method types require a minimum amount of billing address data so the fields will always be present
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/>.
You don't need elements.create() if you're using React. You'd just pass it as a prop to the component:
This is perfect, that's exactly what I needed! Thank you so much for your help!
np
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!