#birdy247 - webhook
1 messages ยท Page 1 of 1 (latest)
#dev-help message
yes it should work:
https://stripe.com/docs/cli/events/resend#events_resend-account
Hi Sorry
Had wrong window open
I have logged in stripe login --api-key <our live PK key>
stripe events --account=acct_1Kg6hJFtyGL6NzGn resend evt_3LVir5FtyGL6NzGn14Qw6CgQ
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such notification: 'evt_3LVir5FtyGL6NzGn14Qw6CgQ'; a similar object exists in live mode, but a test mode key was used to make this request.",
"param": "id",
"type": "invalid_request_error"
}
}
Not sure why it thinks we are in test mode
You should pass the --live flag because the cli by default works in test mode
https://stripe.com/docs/cli/events/resend#events_resend-live
Live flag in the resend ?
Request failed, status=401, body={
"error": {
"message": "The provided key 'rk_live_*********************************************************************************************KtydFn' does not have the required permissions for this endpoint on account 'acct_16aqJ4Khe5FaU5pL'. Having the 'rak_webhook_write' permission would allow this request to continue.",
"type": "invalid_request_error"
}
}
Is the acct_16aqJ4Khe5FaU5pL ours?
This was the request
stripe events --account=acct_1Kg6hJFtyGL6NzGn resend evt_3LVir5FtyGL6NzGn14Qw6CgQ --live
I dont understand what this means
Which account are you authenticated as in the CLI?
The platform
acct_16aqJ4Khe5FaU5pL is the platform, yes
How do I find that?
How do you find what?
acct_16aqJ4Khe5FaU5pL is the platform, yes
The issue is the RAK (restricted access key) that the CLI has generated for your session doesn't have the correct permissions for that command
We want to replay this event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ok, how can we generate that permission?
Tbh, I'm not sure how that works. Is this just a one-time requirement to re-send?
Yes
Might be easier to just pass the account secret key via --api-key flag: https://stripe.com/docs/cli/flags#flags-api_key
Replaying it will solve our issue
stripe events --account=acct_1Kg6hJFtyGL6NzGn resend evt_3LVir5FtyGL6NzGn14Qw6CgQ --live --api-key=sk_live_xxx
Well, you haven't gone wrong. You'll have done stripe login which generates a RAK: https://stripe.com/docs/keys#limit-access
I'm not sure how it determines what permissions to grant it
But the 'cheat' is to just pass the account secret key in instances like this where it's just a one-off
ok
Let me know if that worked
{
"error": {
"message": "No CLI endpoints found to retry delivery. Run 'stripe listen' and retry the request to see the event in the CLI, or provide a specific webhook endpoint.",
"param": "for_stripecli",
"type": "invalid_request_error"
}
}
To be clear, we want to resend this in production
To our platform webhook listener
This one: https://www.eventrac.co.uk/webhook/stripe ?
Got it ๐
๐
Thanks for your help