W
Wasp-lang•3mo ago
jordi0lle

Stripe working in production but user credits don't update

Hi guys, Today I tried to make a payment on my SaaS https://www.fueltrackerapp.com and everything worked fine except for one thing, the user credits didn't update! I'm not so sure what's happening because in dev mode everything works fine. Anybody knows what could be happening?
Fuel Tracker App
Fuel Tracker App
Track any vehicle fuel
36 Replies
kapa.ai
kapa.ai•3mo ago
Hi @jordi0lle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, based on the knowledge sources, it seems like other users have experienced similar issues with Stripe and user credits not updating. Here are a few things you could check: 1. Make sure you're running the Stripe CLI and that you're receiving events to the webhook. You can check this in the Stripe testing section of the open SaaS docs. 2. Check if you're importing the correct action on the client. For example, you should be importing stripeCreditsPayment. 3. Try to debug by adding console.log lines in your code to see where the issue might be occurring. 4. Ensure that your Stripe product configuration is correct. You should have a one-time payment product set up for buying credits. 5. Check if there's a difference between your development and production environments that could be causing the issue. If you're still having trouble, it might be helpful to look at the Wasp Discord (https://discord.com/channels/686873244791210014) for more specific advice or to ask the community for help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jordi0lle, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho•3mo ago
@Vinny (@Wasp) please take a look 🙃
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
It’s working in dev but not prod — this sounds like some env variables or configuration got messed up along the way. Is the webhook configured correctly for prod? Did you create a product for a credits payment just as you did when testing (but not in stripe test mode obviously)? Also can you check your stripe dashboard and under webhooks look for the webhook event that was sent by stripe when the payment was made?
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
Stripe Login | Sign in to the Stripe Dashboard
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
Successful events will look like this
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
No description
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
If the event isn’t even being sent, then you didn’t configure your webhook to listen for it
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
No description
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
@jordi0lle
jordi0lle
jordi0lle•3mo ago
I'll try this later today because I just checked and I only have it set in test mode. I'll inform here if the problem is solved after checking it 😄 THX @Vinny (@Wasp) Hi @Vinny (@Wasp), I changed added the correct key and the 4 events used for purchasing credits and now I'm not so sure how to solve this:
jordi0lle
jordi0lle•3mo ago
No description
jordi0lle
jordi0lle•3mo ago
Any idea?
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
Hmm. If it was working in development than there is some configuration step that you’re missing in production. Did you get the production webhook signing secret? Is the webhook on stripe pointing to the correct url? Are other aspects of your app working? If not maybe you forgot an env variable somewhere else
jordi0lle
jordi0lle•3mo ago
I got the weebhook signing secret from here
jordi0lle
jordi0lle•3mo ago
No description
Want results from more Discord servers?
Add your server