#development

1 messages · Page 1 of 1 (latest)

terse juniperBOT
solemn fossil
#

👋 happy to help

#

this means that you're using the test mode key to access an object that was created using the live mode key

brazen mantle
#

I am developing the frontend in react-native and I have used the stripeProvider.
In stripe provide tag, I have set the key of live.

and on the backend also secret key is set of live.

Suppose if I am having same customer name in test mode, which I am trying on live, will that effect?

solemn fossil
#

it's not about names but rather about IDs

#

so a customer cus_xxx that was created in live mode can't be accessed with the test mode keys

#

you need to double check your keys

#

sk_test_xxx and pk_test_xxx are for test mode

#

and sk_live_xxx and pk_live_xxx are for live mode

brazen mantle
#

Okay understood.
let me cross check the keys once and if needed create new secret key.

thanks so much for help.
if still issue I will let you know sir

#

customer is getting created properly on live mode and after that I am getting error

solemn fossil
#

it might be on the front-end side

brazen mantle
#

Sure.
req_R98z4v87oAOq69
here is the last request id, in all logs

solemn fossil
#

taking a look

#

is that the request that got you the error?

#

I need the request that generated

Error: a similar object exists in live mode, but a test mode key was used to make this request

brazen mantle
#

I am getting the error on the frontend side.
when I am calling

const { error } = await presentPaymentSheet({
confirmPayment: true,
})

function in react-native.

solemn fossil
#

ok then you need to check on your frontend that you're using the correct live mode key

#

pk_live instead of pk_test

brazen mantle
solemn fossil
#

did you build your app after changing the key? and replaced the old version on your mobile with the new one?

brazen mantle
#

Okay let me uninstall the app completely and rebuild it and get back to you

#

Still facing the same issue

charred crane
#

Hey! Taking over for my colleague. Let me catch up.

brazen mantle
#

Hello, Good afternoon
Thanks for join me

charred crane
#

Are you still facing this error?

Error: a similar object exists in live mode, but a test mode key was used to make this request

brazen mantle
#

Yes right

charred crane
#

You are using a test key in order to access a live mode key.

brazen mantle
#

on the mobile app side,
I have set the live key only

charred crane
#

Search in your project, if you have pk_test.... and check the key you are using in your backend too. you need to use the live secret key and not the test secret key.

brazen mantle
#

Okay
let me do one thing.
let me create new secret key and upload on server once.

charred crane
#

Yes.