#sparkling_raccoon_64423

1 messages · Page 1 of 1 (latest)

viscid prawnBOT
desert ridge
#

You get the client_secret from a SetupIntent or a PaymentIntent.

whole dagger
#

stripe.SetupIntent?

desert ridge
#

That's SetupIntent, and that's for saving a payment method. Are you trying to save a payment method or complete a payment?

whole dagger
#

stripe.elements Will it fail to refresh if different clientSecrets are passed in?

desert ridge
#

as long as the given clientSecrets is valid and you have initialized Stripe.js and mount the elements properly, the stripe elements should be rendered successfully

whole dagger
#

Each time the price changes, a clientSecret is regenerated to initialize stripe. When I encounter stripe, it will get the previous clientSecret.

#

As a result, the previous price was used to pay

desert ridge
#

Can you share with me the URL of the guide that you are following along to integration Stripe?

whole dagger
#

"@stripe/stripe-js": "^1.54.0",

desert ridge
#

Can you tell me the problem that you are trying to solve?

whole dagger
#

I need to know if this happens

desert ridge
#

What happens?

whole dagger
#

Will it fail if clientSecret initialization is regenerated?

desert ridge
#

I have already answered this question. Have you tried?

whole dagger
#

The problem I am encountering now is that I regenerate a new clientSecret, but I still get the old clientSecret when I pay.

desert ridge
#

I see. Yup you need to unmount and mount the element if you want to use a different clientSecret.

whole dagger
#

What method do I need to use to unmount