#birdy247 - webhook

1 messages ยท Page 1 of 1 (latest)

obtuse stone
#

Hi there, happy to help

quiet surge
#

Hi

#

I am trying to resend a webhook in production for a connected account

obtuse stone
quiet surge
#

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"
}
}

Learn more about error codes and how to resolve them.

#

Not sure why it thinks we are in test mode

obtuse stone
quiet surge
#

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

livid epoch
#

Which account are you authenticated as in the CLI?

quiet surge
#

The platform

livid epoch
#

acct_16aqJ4Khe5FaU5pL is the platform, yes

quiet surge
#

How do I find that?

livid epoch
#

How do you find what?

quiet surge
#

acct_16aqJ4Khe5FaU5pL is the platform, yes

livid epoch
#

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

quiet surge
#

We want to replay this event

quiet surge
livid epoch
#

Tbh, I'm not sure how that works. Is this just a one-time requirement to re-send?

quiet surge
#

Yes

livid epoch
quiet surge
#

Replaying it will solve our issue

livid epoch
#
stripe events --account=acct_1Kg6hJFtyGL6NzGn resend evt_3LVir5FtyGL6NzGn14Qw6CgQ --live --api-key=sk_live_xxx
quiet surge
#

ok, so its the secret key

#

maybe thats where we went wrong

#

I used PK key

livid epoch
#

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

quiet surge
#

ok

livid epoch
#

Let me know if that worked

quiet surge
#

{
"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

livid epoch
quiet surge
#

yes

#

we_1I6zGOKhe5FaU5pLtOuaA7IB

livid epoch
#

Ah, ok. Then you need another flag: --webhook_endpoint=we_1I6zGOKhe5FaU5pLtOuaA7IB

quiet surge
#

Got it ๐Ÿ™‚

livid epoch
#

๐ŸŽ‰

quiet surge
#

Thanks for your help