#vipul-kapoor_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/1232183143554093096
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- vipul-kapoor_webhooks, 16 minutes ago, 7 messages
Please allow more time to keep the thread open.
Are you looking for this? https://docs.stripe.com/api/events/list?lang=cli
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I've loaded the list of events in PHP but its not working in CLI
Also, I don't think I'll be able to iterate over the results in CLI
Can I?
This code works in PHP
$stripe = new \Stripe\StripeClient(STRIPE_SECRET);
$events = $stripe->events->all([
'created' => [
'gte' => 1712636831,
'lte' => 1713484800
],
'type' => 'invoice.paid'
]);
But this does not work in CLI
stripe events list --data created[gte]=1712636831 --data created[lte]=1713484800 --data type=invoice.paid
I get this response
{
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/events"
}
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
There is no request in Developer > logs
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
acct_1EHmEKJyuisDiUpl
I've checked your account, the event list is empty because there's no invoice.paid events in test mode during the specified peroid.
Do you intent to run CLI in live mode?
If so, use this flag https://docs.stripe.com/cli/get#get-live
Ah. I was running in test mode by default. Sorry about that, haven't used CLI before
No worries
I need to resend webhooks, can you tell me how I can do that?
CLI has the resend command but how do I feed it the list of events from the previous call?
https://docs.stripe.com/cli/events/resend this is the resend command There's no batch command, so you need resend the event one by one.
I'm getting this error when I execute the resend command
The provided key 'rk_live_*********************************************************************************************bEWK1s' does not have the required permissions for this endpoint on account 'acct_1EHmEKJyuisDiUpl'. Please use a different key to perform this action.
SHould I use my non-cli key?
I see in the dashboard that CLI key created during setup is restricted
Or you can remove this flag, and use https://docs.stripe.com/cli/api_keys with your live mode API key.
Which flag?
I am using live mode. This is the command I sent
stripe events resend evt_1P8VH5JyuisDiUplD4xwCQGs --live
remove --live and use --api-key