#Environment Variable

1 messages · Page 1 of 1 (latest)

spring temple
#

Hi Emergent Support Team,

I need help adding environment variables to my deployed app.

Deployment ID: EMT-9ae4f1
App Name: Foodie-Roulettes

Issue: Stripe payment works in preview but fails on my live site with "Failed to initiate payment" error.

Thank you!

cunning root
#

Do you see any logs apart from this? Or can you check in your browser console

#
  • Open your website in Chrome.
  • Press F12
  • A panel opens → click the Console tab at the top.
  • Now refresh your page (Ctrl + R) while the console is open.
    You’ll now see:
    • Errors in red
    • Warnings in yellow
    • Logs/messages
    • If Stripe fails, you’ll usually see an error message here.
spring temple
#

My f12 is my calculator..

cunning root
#

Or if you still finds it hard you can send me your production url (deployment url) so i can check it for you

cunning root
spring temple
#

Ok, I did that and everything went away in the console.

#

??

cunning root
#

After reload, try making the subscription thing

spring temple
#

So I need to redeploy it and see if it works?

cunning root
#

No, if your current deployment has the issue, you can open your dev console and then try initiating the payment

spring temple
#

Ok, that still didn't work.

cunning root
#

Can you share me your live url?

spring temple
cunning root
spring temple
#

yes

cunning root
spring temple
#

am I making a new API?

cunning root
# spring temple am I making a new API?

The Stripe key you were using (the one starting with sk-live*) isn’t valid anymore. You’ll need to regenerate a new one in your Stripe dashboard and then update it in your environment variables. Once you replace it and redeploy, your payments should start working again.

spring temple
#

Do i need time give it a few minutes? Because it still isn't working.

cunning root
spring temple
#

I did

cunning root
#

I dont know what can be issue because it shows the same for me and you said you did update the keys, ask the agent to check the payment integration and check if the keys are being used in right format (also ask it to apply root fixes not patch)

spring temple
#

I did that. had it run a health check.. did the preview and it worked great.. reployed and still doesnt work.

cunning root
#

so its working in preview and not in live deployment

#

right?

spring temple
#

right

cunning root
#

i think theres an issue with how the agent is handling those keys contact [email protected] and let them know about your issue

#

it will save your time and credits