#miran-element
1 messages · Page 1 of 1 (latest)
Hi there, you are correct, the PaymentIntent's secret is a required field when creating an Element object https://stripe.com/docs/js/elements_object/create
This can be found from the PaymentIntent object when it was created https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
Is this error because of the secret key not being passed or anything else is happening here?
The error you observed is due to an attempt to parse a PaymentIntent that does not exist, this can be due to a number of reasons, e.g. using a test secret key to try and fetch a PaymentIntent in live mode, trying to fetch a PaymentIntent from a Connected account.
To allow me to help you further, I was wondering if you could provide me with either the PaymentIntent id (pi_xxx), the request id (req_xxx) or your account id please (acct_xxx).
To be clear, you need the PaymentIntent secret to be passed in there, not the secret key
The PaymentIntent Secret is generated each time you create a PaymentIntent on server side. With 1 Stripe Account, you can have as many PaymentIntent (hence as many PaymentIntent secret) as you want
I have changed the test mode keys with live mode public and secret keys.
in the .env file in our laravel application.
pi_3JzD1nIbABbFHjKR14T9rgle
payment_intent id
um, hello?
Hmm you shouldn't change from test mode key to live mode key at all. Test vs Live is a different thing
PaymentIntent secret : https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it should looks like pi_xxx_secret_yyy
Yeah, that should be good to pass into the PaymentElement initialization call