#vipul-kapoor_webhooks

1 messages ¡ Page 1 of 1 (latest)

vital fieldBOT
#

👋 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.

slate urchinBOT
#

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.

alpine flower
#

Please allow more time to keep the thread open.

slate urchinBOT
agile osprey
alpine flower
#

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"
}
agile osprey
alpine flower
#

There is no request in Developer > logs

agile osprey
#

Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details

alpine flower
#

acct_1EHmEKJyuisDiUpl

agile osprey
#

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?

alpine flower
#

Ah. I was running in test mode by default. Sorry about that, haven't used CLI before

agile osprey
#

No worries

alpine flower
#

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?

agile osprey
alpine flower
#

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

agile osprey
alpine flower
#

Which flag?

#

I am using live mode. This is the command I sent
stripe events resend evt_1P8VH5JyuisDiUplD4xwCQGs --live

agile osprey
#

remove --live and use --api-key

alpine flower
#

Thanks for your help. I'm done

#

BTW I used the PHP code to load all events and put them ina csv file. Then I iterated over the csv in Terminal and executed resend command for each line in a loop