#フランソワ

1 messages · Page 1 of 1 (latest)

fading lodgeBOT
harsh ridge
#

Hi there. What's the error you're seeing?

dusk mauve
#

Hi i'm getting
IntegrationError: In order to create a payment element, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group.

so basically i'm creating a subscription and returning the client secret to my front-end and passing it as option into my <Elements> container
within i'm rendering the
<PaymentsElements/>
as far as i understand it this should work, as i've used a react-state to store the client secret, but the <Elements> container is initially rendered without the clientSecret, so i'm wondering it i need to change the approach

harsh ridge
#

Yeah so when you create the Element, you need to already have the client secret passed in

#

I know you're using react, so it'll look different, but the concept is the same

dusk mauve
#

so its better to remove the <Elements> container from my HOC and only render the elements container after i have aquired the client secret?

harsh ridge
#

Correct

dusk mauve
#

Thank you