#rbole

1 messages · Page 1 of 1 (latest)

balmy flintBOT
craggy jetty
#

Can I start a webhook action at a later date?
Do you mean send an older event to a new webhook?

velvet prism
#

yes, because we have forgotten to set it up.

craggy jetty
velvet prism
#

ok, how can I use the cli ?

craggy jetty
velvet prism
#

yes i found it, I have now access to the stripe test environment, how can I switch to live system with cli ?

craggy jetty
velvet prism
#

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.

craggy jetty
#

What's the evt_xxx ID you're trying to resend?

velvet prism
#

can i send my sk_ live key ?

craggy jetty
#

No, please don't do that

#

I guess this is a Connect related event?

velvet prism
#

a successful checkout session

craggy jetty
velvet prism
#

I try to resend the a completed checkout session.

craggy jetty
#

I need the actual evt_xxx ID you're using so I can understand why you're seeing that error

velvet prism
#

evt_1NpqLDKxrILBeGDx6YWPe4Fz

craggy jetty
#

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

velvet prism
#

stripe events resend --live evt_1NpqLDKxrILBeGDx6YWPe4Fz

#

yes I authenticated with stripe login I can call stripe status

craggy jetty
velvet prism
#

ok, this would be the command? stripe events resend --webhook-endpoint we_1NpqqcKxrILBeGDx4bjl2khQ --live evt_1NpqLDKxrILBeGDx6YWPe4Fz

#

is that correct?

sterile berry
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

velvet prism
#

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

sterile berry
#

Are you using Stripe Connect?

velvet prism
#

no

#

how can I check my login ist correct ?

sterile berry
#

stripe login

#

Maybe it's Test mode/Live mode key problem

velvet prism
#

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'

south elk
#

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.

velvet prism
#

the account Id in the config.toml file is different from the accountId on stripe website ?

#

maybe this is the problem?

south elk
#

Not sure, can you try changing it and see what happens?

velvet prism
#

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 ?

south elk
#

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.

velvet prism
#

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 ?

south elk
#

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.

velvet prism
#

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

south elk
#

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

velvet prism
#

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 ?

south elk
velvet prism
#

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

south elk
#

True, you can try that

velvet prism
#

with the api key the command runs, but i can still cannot trigger the webhook url agaon ?

balmy flintBOT
mellow echo
#

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

velvet prism
#

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?

mellow echo
#

Seems like signature verification is failing on your end.

velvet prism
#

ok I will check it

velvet prism
#

ok, I found it, now it works perfect, 1000 thanks for your help !