#fredo_webhooks

1 messages · Page 1 of 1 (latest)

brazen lotusBOT
#

👋 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/1318170563289813022

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

fleet warren
#

If so, could you please share a Subscription Id ?

fast narwhal
#

this ?

fleet warren
#

Yes

fast narwhal
#

I have this setup but I don't see anything moving on my laravel webhook logs.

fleet warren
#

Now could you please share a Subscription Id attached to this test clock ?

fast narwhal
#

clock_1QWbOrEpArSPN3QttqTW0UMK

fleet warren
#

Ok, but I would like to share the Subscription Id you created for your test

fast narwhal
#

sub_1QWbnWEpArSPN3QtaxHSpY8Z
sub_1QWbrYEpArSPN3QtT2EeJdzW

I have 2

fleet warren
#

Great thanks

#

sub_1QWbnWEpArSPN3QtaxHSpY8Z this one is not attached to a simulation

#

While this one sub_1QWbrYEpArSPN3QtT2EeJdzW is attached to another test clock clock_1QWbsvEpArSPN3QtFAK6hWQw

fast narwhal
#

Yes, I only have one, but nothing changes on my end.

fleet warren
#

Focusing on the last one then.

fast narwhal
#

Of course

fleet warren
#

I do see an event evt_1QWbrqEpArSPN3QtuWRpghOj generated on Stripe Side

#

And it was sent to your Stripe Cli local listener

#

and to this webhook endpoit we_1QSha5EpArSPN3Qtp67T9oUr

fast narwhal
#

is was my webhook for dev we_1QSha5EpArSPN3Qtp67T9oUr

fleet warren
#

You receved that even on that webhook then.

#

Have you had the chance to double check your logs ?

fast narwhal
#

i have this log when i put this command on CLI stripe trigger invoice.payment_succeeded

#

I think I must be doing something wrong, but I can't think what.

fleet warren
#

This will triggers an event

#

You want to simulate an event or get an even related to the Subscription you created ?

#

You should be using listen and not trigger

fast narwhal
#

I'll tell you exactly what I want to do. I've created a subscription via my solution and I'd like to simulate that we're at the end of the month so that Stripe can debit my customer and therefore interact with my code to make an invoice, renew the customer, send an email, etc.

fast narwhal
#

it doesn't seem to work for me via the online CLI and the webhook seems to work well because I can pay well, it's just to test a customer's direct debit which doesn't work for me.

fleet warren
#

with my code to make an invoice, renew the customer, send an email, etc.
If you are using Stripe Subscription, you don't need to recreate invoice manually...

#

The invoice will be created automatically

fast narwhal
#

I was talking about creating the invoice on my side and not on Stripe's side.

fleet warren
fast narwhal
fleet warren
#

The event evt_1QWbrqEpArSPN3QtuWRpghOj was sent to your webhook endpoint we_1QSha5EpArSPN3Qtp67T9oUr correctly, and your endpoint responded successfully. Sorry, but I'm not sure I understand what is missing ?

#

--forward-to should be localhost

#

if you have a hosted url, then use webhook endpoints (like you did with we_1QSha5EpArSPN3Qtp67T9oUr)

fast narwhal
#

now I've changed the time of the test clock cus_RPQEmOBQ4XD7eU but I don't see anything moving in the webhook logs.

#

clock_1QWbOrEpArSPN3QttqTW0UMK sorry

fleet warren
#

Could you please share the Subscription Id ?

fast narwhal
#

sub_1QWbNtEpArSPN3QtYPhYNKmi

fleet warren
#

There is this event generated evt_1QWbO9EpArSPN3QtxMPGtzzr

#

And it was sent to the same 3 endpoints

fast narwhal
fleet warren
#

yes

fast narwhal
#

Ok, but here's my question: why don't I see any results in the webhook (which is also why I don't have anything in my laravel logs)?

fleet warren
#

You should check your logs/ add breakpoints and debug your integration.

#

As far as I can tell that your webhook endpoint did responded successfully

#

to the event generated

fast narwhal
#

I already have logs everywhere in PHP and on the stripe panel I don't see any call webhook either.

fleet warren
#

n the stripe panel I don't see any call webhook either.
What you mean on this ? could you please share a screen shot ?

#

Between, your webhook endpoint responded with {"status":"skipped"}

fast narwhal
fleet warren
fleet warren
fast narwhal
#

The last logs I have in the webhook are only when I've changed the time of the sampling test.

fleet warren
#

Maybe you are looking to the wrong place then

#

And the logs are probably logged elsewhere... Sorry but Stripe has no control over your integration.

fast narwhal
fleet warren
#

Have you had the chance what is the origin of that response ? status: skipped ?

fast narwhal
#

no I don't see why I have this

fleet warren
#

As far as I can tell is that this is the response of your webhook endpoint.

fast narwhal
#

Yes sorry I just saw

fleet warren
#

Great, I invite you to double check and debug your integration first then.

fast narwhal
#

My integration needs subscription feedback, but I don't have it.

fleet warren
#

What you mean by Subscription Feedback ?

#

You mean Subscirption Id ?

fast narwhal
#

yes

fleet warren
fast narwhal
#

Ok I'm going to annalyze better, you've already helped me a lot to get the list of events (I didn't have it)

fleet warren
#

Np! Happy to help!

fast narwhal
#

Can you leave the ticket open so that I can reread your previous answers?

fleet warren
#

We usually, close the thread after un-activity. But please don't hesitate to open a new thread (it will reference automatically this one).

fast narwhal
#

After checking my code is in the webhook so if Stripe doesn't go through the webhook for the clock test my code will never work that's why I always have NULL in my webhook logs.

#

[2024-12-16 11:53:29] local.INFO: ==========================================
[2024-12-16 11:53:29] local.INFO: No subscription invoice found, skipping {"stripe_invoice_id":"in_1QWbvVEpArSPN3QtZgOnnQGU"}
[2024-12-16 11:54:32] local.INFO: Stripe webhook request received {"url":"http://194.87.217.143:8083/stripe/webhook","method":"POST","has_stripe_signature":true}
[2024-12-16 11:54:32] local.INFO: Webhook request received {"url":"http://194.87.217.143:8083/stripe/webhook","method":"POST","has_stripe_signature":true}
[2024-12-16 11:54:32] local.INFO: Processing webhook event {"type":"charge.succeeded","event_id":"evt_3QWbwYEpArSPN3Qt1Q9o5Cto"}
[2024-12-16 11:54:32] local.INFO: ==========================================
[2024-12-16 11:54:32] local.INFO: Processing invoice payment succeeded: {"invoice_id":"ch_3QWbwYEpArSPN3Qt1y0n6xUa","subscription_id":null,"customer_id":null,"payment_intent":"pi_3QWbwYEpArSPN3Qt1aHtMHKJ","amount_paid":null}
[2024-12-16 11:54:32] local.INFO: ==========================================

fleet warren
#

Great, glad to hear that you manage to find the good logs line.

fast narwhal
#

We agree that when Stripe automatically debits a customer, there should be a webhook event invoice.payment_succeeded ?

fleet warren
#

there should be a webhook event invoice.payment_succeeded ?
Yes, and it was generated (I shared couple of examples before in this thread I think)

fast narwhal
#

Ok so I'm going to review and better analyze everything now that I'm familiar with the subscription process. Thanks for your answers and sorry for wasting your time.

fleet warren
#

Not at all! Always happy to help!

brazen lotusBOT
fast narwhal
#

Sorry to bother you again, but when I run a clock test I get strictly nothing in the workbench events. How did you manage to get all the IDs (especially where we could see the skipped status)?

inner badger
#

Click that evt_xxx ID on the right pane

#

You're looking at the webhook conversations specifically, rather than the event detail view

fast narwhal
#

I was talking about having the event when the test clock is well done to see the test feedback.

inner badger
#

I don't know what you're describing sorry

fast narwhal
#

i have this subscription sub_1QWcdfEpArSPN3QtsN7Amve9

#

But I can't perform a Stripe sampling test, when I advance the testclock to now I don't see any log in the webhook or even in the events.

inner badger
#

What event(s) are you expecting to see?

fast narwhal
#

I don't know, but having a sign of life so that my backend can go to the next step once Stripe renews the client

inner badger
#

You likely need to advance the clock further beyond the next billing period and then associated events will fire

fast narwhal
#

So I have to wait 1 month to do the test?

#

Or should I set the test clock for 10 minutes from now, for example?

inner badger
#

No, advance the clock to the next billing date which is 2025-01-16

#

Right now the clock is 'frozen' on 2024-12-16

fast narwhal
#

I was thinking that the clock test could simulate a renewal in a few minutes, for example, and that's what I'm trying to do 🙂

inner badger
#

Yes, that's exactly what it does but you need to manually advance the clock to the time/date you want

fast narwhal
#

that's what I'm doing, but when we arrive at the time I indicated, nothing happens in the event logs or webhook.

inner badger
#

As I said, you likely need to advance it to the next billing date – 2025-01-16

fast narwhal
#

How do you get the event ID?

inner badger
#

Well I'm using internal tooling, but you can just look on the Dashboard page for the subscription at the bottom

fast narwhal
#

Ha mais l'ID que vous m'avez donné lui c'est pour la création de l'abonnement et non via le test clock

inner badger
#

We only speak English here

fast narwhal
#

I use internal tools, but you can simply look at the dashboard page for subscription at the bottom of the page.

#

sorry

#

wait 2s 🙂

#

Ha but the ID you gave me is for the creation of the subscription and not via the test clock.

inner badger
#

Yes, because you haven't advances the test clock beyond the creation date of the sub

fast narwhal
#

I think I'm going to change my whole system so that it's my backend that collects the customers, I can't figure out how the tests work here.

inner badger
#

If you're trying to receive and forward events (like invoice.paid) for that subscription then all you theoretically need to do is advance the test clock time like I said

fast narwhal
#

I advanced the time 15 minutes ago to 1:30 pm, so technically I should have logs.

inner badger
#

It's frozen now on the same date as the subscription creation. It doesn't automatically advance

inner badger
#

Maybe you're advancing the wrong clock or something?

fast narwhal
#

clock_1QWcfsEpArSPN3Qtl2SnMd1b

#

I only have one clock and one subscription that are connected

#

And now I see nothing in the logs, even though the time has passed.

inner badger
#

Where's the API request where you advanced the clock? You can see in your screenshot it's still frozen to now

inner badger
#

Please just try what I'm suggesting 🙂

fast narwhal
inner badger
#

Then you need to start over

fast narwhal
inner badger
#

Yes

#

Or just manually re-send the events from the CLI

fast narwhal
#

Ha so that's why it doesn't work so I can't shift the hours infinitely?