#rbole
1 messages · Page 1 of 1 (latest)
Can I start a webhook action at a later date?
Do you mean send an older event to a new webhook?
yes, because we have forgotten to set it up.
You'd use the CLI: https://stripe.com/docs/cli/events/resend
ok, how can I use the cli ?
yes i found it, I have now access to the stripe test environment, how can I switch to live system with cli ?
You'd pass the --live flag with the resend command: https://stripe.com/docs/cli/events/resend#events_resend-live
ok, i got this error: The provided key 'rk_live_*********************************************************************************************K3c58z' does not have the required permissions for this endpoint on account 'acct_1JIrRcKxrILBeGDx'. Please use a different key to perform this action.
What's the evt_xxx ID you're trying to resend?
can i send my sk_ live key ?
a successful checkout session
I try to resend the a completed checkout session.
I need the actual evt_xxx ID you're using so I can understand why you're seeing that error
evt_1NpqLDKxrILBeGDx6YWPe4Fz
Did you actually authenticate in the CLI (via stripe login) as the correct account (acct_1JIrRcKxrILBeGDx)?
Can you share the full CLI command you're using
stripe events resend --live evt_1NpqLDKxrILBeGDx6YWPe4Fz
yes I authenticated with stripe login I can call stripe status
You'll actually need to specify the we_xxx ID you want to resend the event to as I wasn't sent anywhere originally: https://stripe.com/docs/cli/events/resend#events_resend-webhook-endpoint
ok, this would be the command? stripe events resend --webhook-endpoint we_1NpqqcKxrILBeGDx4bjl2khQ --live evt_1NpqLDKxrILBeGDx6YWPe4Fz
is that correct?
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
ok, i tried it, but got this error again:
{
"error": {
"message": "The provided key 'rk_live_*********************************************************************************************K3c58z' does not have the required permissions for this endpoint on account 'acct_1JIrRcKxrILBeGDx'. Please use a different key to perform this action.",
"request_log_url": "https://dashboard.stripe.com/logs/req_FTmGpTylpv4FLX?t=1694605692",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Are you using Stripe Connect?
in the .stripe/config.tomal file the live_mode_pub_key is the same like on the stripe dashboard
I did logout with stripe logout and did fresh stripe login, login seems good, but if i call the same command again it failed with the same error.
where is this api key ? from the config.tomal file live_mode_api_key = 'rk_live_***********************************************************************************************plLR'
Hi! I'm taking over this thread.
Looks like you are trying ot use a restricted API key (rk_xxx) that doesn't have enough permission for that action.
So you need to update your API key (or create a new one) with the correct permissions.
the account Id in the config.toml file is different from the accountId on stripe website ?
maybe this is the problem?
Not sure, can you try changing it and see what happens?
manuelly in the config.tomal file ?
also the live_mode_api_key is different rk_live ... in config.tomal and sk_live.. on Stripe website
the pubKey is the same
can I use the --api-key flag to go further ?
I'm not sure how that info in this file is used by your application, so it's hard for me to tell what's exactly the issue.
can I use the --api-key flag to go further ?
Mac terminal want access key-wallet to „default.live_mode_api_key" maybe there is a false one stored ?
Is your issue related to the Stripe CLI?
What happens if you do stripe login, and then try something like stripe trigger payment_intent.succeeded for example.
stripe trigger payment_intent.succeeded
A newer version of the Stripe CLI is available, please update to: v1.17.2
Setting up fixture for: payment_intent
Running fixture for: payment_intent
Trigger succeeded! Check dashboard for event details.
after upgrading the cli version:
stripe trigger payment_intent.succeeded
Setting up fixture for: payment_intent
Running fixture for: payment_intent
Trigger succeeded! Check dashboard for event details.
where come this pk_key from ? my public key on the stripe website is different to the key used for the cli command ??
in the config.toml file the pk_key is the same like in stripe website
So looks like the Stripe CLI is working properly here.
So the issue happens with this command?
stripe events resend --webhook-endpoint we_1NpqqcKxrILBeGDx4bjl2khQ --live evt_1NpqLDKxrILBeGDx6YWPe4Fz
yes
and the cli key appears under the restricted keys in the stripe website
this cli key has only rights to read ??
not to trigger the event again ?
It should be possible to resend events with the CLI, no need to change any API keys https://stripe.com/docs/cli/events/resend
Doing some tests on my end...
ok, in the meantime should I try the command with my api key stripe events resend --api-key xxx --webhook-endpoint we_1NpqqcKxrILBeGDx4bjl2khQ --live evt_1NpqLDKxrILBeGDx6YWPe4Fz
True, you can try that
with the api key the command runs, but i can still cannot trigger the webhook url agaon ?
👋 taking over
When you say command runs but can't trigger the URL, what exactly do you mean?
Did the CLI retry and returned an error?
ok, it sees it can trigger the webhook again, but on my endpoint I get this error: Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
ok I will check it
ok, I found it, now it works perfect, 1000 thanks for your help !