#Euclid

1 messages ยท Page 1 of 1 (latest)

lilac peakBOT
scarlet moat
#

๐Ÿ‘‹ happy to help

rapid elbow
#

Cool ๐Ÿ™‚

scarlet moat
#

you need to change the API key and the webhook secret

rapid elbow
#

so thats the restricted key at the bottom of the stripe live dashboard needs to be created ?

#

and the webhook secret added to the extension in firebase ?

rapid elbow
#

And on Developers /apikeys Restricted keys
For greater security, you can create restricted API keys that limit access and permissions for different areas of your account data.

#

I need to create a new Restricted Key for live also and add to the extension ?

rapid elbow
#

@scarlet moat Thanks I will try this now

scarlet moat
rapid elbow
#

I just want to turn on live payments from Test mode

#

so I have created a new restricted key and put this and the webhook secret into the extension on firebase now

#

and inported the webhook to live from test on stripw

#

does this sound correct ๐Ÿ™‚

scarlet moat
#

AFAICT yes

rapid elbow
#

Hey @scarlet moat

#

so having completed these steps........ No such customer: 'cus_blah'; a similar object exists in test mode, but a live mode key was used to make this request.

#

the webhook is failing with this message -

scarlet moat
#

yes this is because you're still receiving the test mode webhook events on the same URL

#

you should have 2 separate environments for test and live each one having its unique URL that you need to pass to the Stripe Webhook Endpoint

rapid elbow
#

I choose the option to import the webhook in stripe on the live side

#

how should i fix this issue

scarlet moat
#

would you mind sharing your account id so I could take a look?

rapid elbow
#

sure - where will I find this

scarlet moat
rapid elbow
#

acct_1M1t0PHG8qb1QC7m

#

This seems to be the id

scarlet moat
#

let me check

rapid elbow
#

Thanks

#

so I have the same webhook url in both test and live

#

from the extension

scarlet moat
#

that's the prob

rapid elbow
#

I cant see an option to remove the test webhook

#

or how should I proceed

scarlet moat
#

you need to have 2 separate URLs for each mode

rapid elbow
#

but the extension only provides one

scarlet moat
scarlet moat
rapid elbow
#

would removing the test webhook fix the issue ?

#

I can delete or disable the test webhook if needed....

scarlet moat
#

yes if you disable it it would solve your problem for now

rapid elbow
#

perfect

#

I have done this and still getting the same erro

scarlet moat
#

you're using a customer from test mode to create a Checkout Session in live mode

#

that's why you're getting the error

#

where are you getting the customer ids from?

rapid elbow
#

but this is just a customer in the firestore - i dont have a staging environment

scarlet moat
#

that's the problem right there, this is why I explained that you need to have 2 separate environments

rapid elbow
#

the customer is in the collection just

scarlet moat
#

because it's not just about keys and secrets but also about data

#

yes but you can't use a customer from test mode in live mode

#

you need to create a separate environment for you live mode

rapid elbow
#

but I cant recreate all the features in firebase easily to setup the stripe extension again

#

would a new customer created after turning on live stripe work now ?

scarlet moat
#

but I don't really encourage you to do testing on live mode

rapid elbow
#

I didnt realise it needed 2 firebase projects to run test payments

rapid elbow
#

Thanks for your support with this

scarlet moat
#

let me know if you need any more help