#Filip-checkout

1 messages · Page 1 of 1 (latest)

livid lantern
#

once the Checkout Session is created, the checkout.session.created should be created

tropic stump
#

I'm calling my getSessions method when mounting my component in my Vue SPA. This is triggering my Laravel REST API to create a checkout session as in the integration guide

#

once webhook route is set up, everytime that component is rendered, the webhook should catch it and display in my Stripe CLI

#

if I trigger it manually, it works with 200 OK status, but my issue is that the webhook is not going off when payment intent should be created when creating the checkout session

#

the session creation function also works no errors

livid lantern
tropic stump
#

acct_1Kq2LEKM1GNqGVOh

livid lantern
#

if you're expecting to receive your webhook events in test mode, you need to set up your webhook endpoint in test mode as well

#

right now the only webhook endpoint i see on that account is for live mode

tropic stump
#

but I can't place my localhost route as the webhook link

livid lantern
#

maybe lets backtrack a bit, i may have misunderstood the question

tropic stump
#

and the "test in development mode" tab only gives me the option to test it by triggering it manually -- I'd like to see if a webhook set up on a local port is firing when accessing my front-end on localhost as well

livid lantern
#
but my issue is that the webhook is not going off when payment intent should be created when creating the checkout session
#

what do you mean by the webhook is not going off?

tropic stump
#

so my API is live on dev server at http://localhost:88 and my webhook route is /api/webhook. My Vue SPA is live on localhost:8080 during development and in the guide I'm following, even when accessing SPA on localhost, webhook calls are visible in the Stripe CLI

#

I would like to see webhook calls displayed in the CLI by actions taken in development environment, the hook works when I do stripe trigger payment_intent.created

livid lantern
#
I'd like to see if a webhook set up on a local port is firing

Since you're using the Stripe CLI, you can forward webhook events to your localhost endpoint : https://stripe.com/docs/webhooks/test

tropic stump
#

yea, which is what i did stripe listen --forward-to localhost:88/api/webhook

#

manual trigger displays [200] POST http://localhost:88/api/webhook [evt_3L7sSFKM1GNqGVOh0yDL8IhX]

#

but in-app actions that should be calling the webhooks, nothing happens in the CLI

livid lantern
#

i'm afraid i don't really understand what you're trying to say here - What in-app actions that should be calling the webhooks are you referring to? What are you expecting to happen in the CLI?

#

The CLI is only forwarding webhook events to your endpoint, so i'm not sure what else you're expecting it to do here

tropic stump
#

Hm, bear with me, perhaps I'm explaining it all wrong. So when a page is accessed on my front-end, I'm calling my API to create a checkout session, and it works -- I'm getting the session id as response

#

but, according to the tutorial, even that API method that creates the checkout session - the webhook should catch it and display the payment_intent.created 200 OK in the CLI

livid lantern
#

which tutorial? can you share the link to it?

tropic stump
#

the tutorial I'm referring to is https://www.youtube.com/watch?v=b4Jz9UPAyI0 @ 19:41 where he refreshes the page in his app and the webhook catches it and displays the status in the CLI

My Gear:
Monitors 1. https://amzn.to/2X9IC37 2. https://amzn.to/3CadhwA
Mouse: https://amzn.to/3nAtIhH
Keyboard: https://amzn.to/3z7jfw7
Webcam: https://amzn.to/3hvWbRF
Mic: https://amzn.to/3lj7uhn

Hey what’s going on in this video were gonna integrate stripe checkout into a laravel app were also gonna be using VueJs for the frontend

Stripe ...

▶ Play video
#

when i complete the purchase, I'm getting everything in the CLI though

#

Ok maybe I don't even need it to display on intent creation, these might be enough for my purposes

livid lantern
#

how are you triggering the event? if it's via the Stripe CLI, what's the exact command that you're running?

tropic stump
#

the last screenshot I sent was triggered by completing a purchase through a checkout link

livid lantern
#

i see the payment_intent.created event being created and there's a [200] response for it in your screenshot

#

the event id ending with ...ej8

#

it looks the same as the video

tropic stump
#

Ok let me try to continue with the integration and see, maybe I imagined the problem

#

Thank you for your support, I'll come again if I have any troubles.