#attila_test-mode-webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1314277642177876020
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, like this?
what makes this a test endpoint different from live endpoints?
how will stripe know?
Are you in Test mode?
OR, you could use your Test mode API key and create the endpoint with the API
i have a test mode api key
๐
sorry I'm new to stripe, trying to figure out how this works, have to work on some legacy code project that has already the implementation for test and live, and i have the api keys defined for test and live in my project
i'm just not sure how the api key is attached to this endpoint i create from webhooks dashboard
let's just ignore api key for now.
Both the API key and the Dashboard check which mode you are operating in
When using the API, the API key determines the mode
- Live API key - live mode
- Test API key - test mode
When you are using the Dashboard, the Test mode toggle switch in the header determines what mode you are in
isn't it true that you can have test mode on a dev site and live mode on production site without enabling test mode from the stripe dashboard?
isn't it true that you can have test mode on a dev site and live mode on production site
That is determine by what API key you use, since sites are not the Dashboard
i have two api keys, one for test and one for live, and my code depending on environment loads the respective api key
- on these screenshots you can see i have stripe implemented, and i can do a purchase with the test card
- after purchase i load from my site a confirmation page
All this works without enabling test mode from stripe dashboard.
however in my stripe dashboard I can't see any test webhook added, nor can't see test API key that i have in my application and seemingly working
and my subscriptionsAction() function seems to be not triggered, so i'm assuming somethig might be missing in the test mode
my dev site (dev.lines.com) is also not added anywhere that i can see in stripe
as i understand it, i should have a webhook added to dev.lines.com in stripe in order for my "subscriptionsAction()" (from my api controller) to be triggered
SOrry but you are not understanding how this works at all
Test mode isn't enabled by the Dashboard
It is entirely determined by what API keys you use
UNLESS you are doing someting in the Dashboard
The Test mode toggle ONLY APPLIES to the actions you do in the Dashboard
ok, so that toggle is for dashboard actions only, sorry got confused with it
as it is called test mode as well
It's the same Test mode but two different ways to specify it
If you create a Customer with your test mode API key, you will only see that Customer in your Dashboard if you have the toggle switch set to Test mode
ok, that makes total sense now, and while having test mode on, does it pause transactions on live api key?
so it's safe to switch it on while testing the dev site, and live site transactions will still work as it needs to
alright
thank you for explaining this
Sure thing! Happy I could shed a little ๐ก here ๐
regarding webhook endpoints dashboar i see a button "import test endpoints"
if i click on it i see some old dev sites endpoints previously my company had
however i don't see the current dev site
what action is needed to be able to see dev.lines.com related endpoints there?
Have you created dev.lines.com endpoints?
adding it from this ui?
Yes, if it does not exist already
But it still seems like you do not have much understanding of how this works
So I would encourage you to read the documentation carefully.
ok, i think i got it, will have to add the endpoints with the tokens, and specify the events
thank you for your help, much appreciated
Happy to do it!