#ParkerMurray
1 messages · Page 1 of 1 (latest)
Hi there, do you mean generating ephemeral keys?
I am using a react front end, and need import stripe to then be able to call the .createEphmeralKeyNonce and pass that back to my server.
I haven't see any docs on how / which react library to import that has this method.
You can only create a ephemeral key from you backend, as explained here https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-add-server-endpoint
const ephemeralKey = await stripe.ephemeralKeys.create(
{customer: customer.id},
{apiVersion: '2020-08-27'}
);```
I need the ephemeral key to allow me to show issued card details
Hmm, I believe you already found the code to generate the ephemeral key (it's in the screenshot that you posted)?
Sorry
I misread your question
https://stripe.com/docs/js/issuing/create_ephemeral_key_nonce is a Javascript function, you should be able to use it in your react app as well.
okay, do you know which stripe react library needs to be imported?
sure, the details are explained here https://stripe.com/docs/stripe-js/react
hmm okay let me take a look.