#chepox_webhooks

1 messages · Page 1 of 1 (latest)

shut yewBOT
#

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

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

cedar sedge
#

.\stripe.exe trigger customer.subscription.created --add subscription:customer=cus_R24na8ucOShUJ7

#

that does send the event and I am able to catch it in the webhook

#

but it changes the customer

ember rover
#

You basically want to resend evt_3QAcoeRpyK8wByBp15uwOsTW ?

cedar sedge
#

the thing is that event changes the customer id

#

I want to update the status in my dabatase on the incoming event from stripe

#

but I need the customer ID to correctly change the correct user

#

I am unable to simulate an event with a specific customer

ember rover
#

So cus_R24na8ucOShUJ7 is the customer you need to send the event for? But there's not an existing event id with that customer's id in it?

cedar sedge
#

I did create a test subscription for that user in the dashboard.

#

I guess there is an event for that

#

let me look that one up

ember rover
cedar sedge
#

found it

#

so I can resend this particular event via CLI? over and over to continue my testing in my SQL database?

ember rover
#

Yeah

#

Note that You can only resend events that have been created within the last 30 days.

cedar sedge
#

and CLI for that?

ember rover
#

yes that's a cli command

cedar sedge
#

stripe trigger <EVENT>?

ember rover
#

No it's resend

#

The one I sent

cedar sedge
#

stripe events resend evt_1QAao4RpyK8wByBpwX1comGE

#

that did not send it to the webhook. That just displayed the values in the CLI

ember rover
#

It just sends it to your local listener if you don't specify endpoint id

cedar sedge
#

I do have a local listener

#

PS C:\Users\Chepo\Documents\Programming\flash-vector\localfiles> .\stripe.exe listen --forward-to localhost:8000/api/stripe/webhook

Ready! You are using Stripe API Version [2024-06-20]. Your webhook signing secret is whsec_123456 (^C to quit)

ember rover
#

That was running when you ran that command and it didn't receive the event?

cedar sedge
#

yes

#

i just tried with .\stripe.exe trigger customer.subscription.created --add subscription:customer=cus_R24na8ucOShUJ7

#

and that triggers the webhook

#

.\stripe.exe events resend evt_1QAao4RpyK8wByBpwX1comGE --webhook-endpoint=we_123456 does not

#

wrong we_123456??

ember rover
#

If you don't specify webhook endpoint at all it should send to local listener. In the logs it shows it sent it

cedar sedge
#

webhook secrete is different for that event?

shut yewBOT
cedar sedge
#

oh I think I might know the issue

SignatureVerificationError(message='No signatures found matching the expected signature for payload', http_status=None, request_id=None)

#

I am getting the event into the webhook now bue getting this error

ember rover
#

Are you using the signing secret from the stripe listen command?

cedar sedge
#

no. the one from the endpoint. no the CLI.

eternal tendon
#

Hi, stepping in and catching up.

cedar sedge
#

I just switched the webhooksecrert to the CLI listener provided one with the same result

#

PS C:\Users\Chepo\Documents\Programming\flash-vector\localfiles> .\stripe.exe listen --forward-to localhost:8000/api/stripe/webhook

Ready! You are using Stripe API Version [2024-06-20]. Your webhook signing secret is whsec_987654 (^C to quit)

#

success!

#

the damn .env variable was not reloading for some reason. Had to restart the app and now the correct webhook secret is being used.

#

Thank you for your help. I should have asked for assistance hours ago.

eternal tendon