#kryze_

1 messages · Page 1 of 1 (latest)

acoustic ivyBOT
safe grove
#

Can you provide more details?

chilly willow
#

Yes of course,
I created a Shipping option in the Test Environement of Stripe which gave me an ID and I putted it on the array of shipping options :

[{shipping_rate: 'shr_1OHpCiEuhOHWb2vbxN50dyxB'}]

But it said that this value doesn't exists

safe grove
chilly willow
#

There isn't because i only got :
Stripe::InvalidRequestError (No such shipping rate: 'shr_1OHpCiEuhOHWb2vbxN50dyxB'):

safe grove
#

there must be since this is an API error.
If you're not seeing this in your logs then you're most likely using the API key from a different account

chilly willow
#

Is it possible that the key has expired ?

safe grove
#

Unlikely. The error would've been different in that case

chilly willow
#

Because my API keys are right

safe grove
chilly willow
#

Yes it's the right account

safe grove
#

Are you maybe using live mode keys vs test mode?

chilly willow
#

No they have the test part in front of it

safe grove
#

invalid request error comes from Stripe servers. So there has to be a request ID associated with that.
Since you're not seeing that in your account logs, the only thing that makes sense is that you're using the wrong API key/account for this

#

oh do you use connect?

chilly willow
#

I changed something in another workflow and got and error in the logs

safe grove
#

like are you setting Stripe-Account header somewhere?

chilly willow
#

Let me check

#

No, but the thing is, it's a project I worked on until october and I had to add shipping so everything was working fine ! When I added the shipping options in Test mode it returned me an error, but on the same app I have a payement with "Hand to Hand delivery" which don't require delivery, this one throw me an error when I changed the Tax value just to see if it show me something

acoustic ivyBOT
safe grove
#

The new error in your logs is regarding tax rate

No such tax rate: 'txr_1NpXgcJXQ6ZddqMfBmK5GfmK'

chilly willow
#

Yes it's this one, it's the same app, using the same API keys

safe grove
#

that tax rate belongs to acct_1I8i7VJXQ6ZddqMf

#

so these are different stripe accounts

chilly willow
#

Yes it's the production key

#

I putted it here just to check if it was on the production account

safe grove
#

So you are using two different API keys since these are two separate stripe accounts

chilly willow
#

No, wait I'll explain again

#

It's a project for a client, I'm the dev account of it. The tax rate used here has nothing to do with my error. I copied it from the production env just to see if it will throw me an error on the Test version

#

Which it did

safe grove
#

But I am seeing shipping rate errors on the acct_1I8i7VJXQ6ZddqMf

#

so you've mixed up the API keys

chilly willow
#

Is there a place when I can send you the api keys used ?

safe grove
chilly willow
#

I know I'm not sharing in public

safe grove
#

the link I shared above is for a request that belongs to acct_1I8i7VJXQ6ZddqMf

chilly willow
#

Yes I can't see it this one

safe grove
#

what format is the API key?

sk_test_xxx or something else?

chilly willow
#

But my keys are both sk_test and pk_test

safe grove
#

okay let me explain

#

sk_test_xxx is Secret API key for test mode on a Stripe account
Each Stripe account gets their own set of keys

In your case,
'shr_1OHpCiEuhOHWb2vbxN50dyxB' shipping rate was created on account acct_1NflsgEuhOHWb2vb using that account's secret key (sk_test_xx)

The shipping rate request errors you're getting are on account acct_1I8i7VJXQ6ZddqMf which means you're trying to use the shipping rate from acct_1NflsgEuhOHWb2vb account using acct_1I8i7VJXQ6ZddqMf's secret API keys

#

because acct_1I8i7VJXQ6ZddqMf's API key can't find that shipping rate

chilly willow
#

Okay but how is it possible I only have one account, I'm the only dev

#

Where can I see connected account ?

#

see*

#

There should only be me and the proprietary here, which doesn't know anything about computer and API keys

#

I've never even had access to another account besides mine

tacit elm
#

Not sure what you mean. acct_1I8i7VJXQ6ZddqMfand acct_1NflsgEuhOHWb2vb are two separate accounts and they are not connected to each other.

#

You may need to ask your colleagues if they are aware of this other account. Though if the end goal is just testing shipping rates on acct_1NflsgEuhOHWb2vb (the account that you are making API requests on now), it may be easiest to just recreate those shipping rates in test mode on this new account

chilly willow
#

Where can I see connected accounts ?

#

see*

#

Because what I don't understand is :

  • I Created the test shipping rates from my account 3h ago (I don't have access to any other account)
  • The Shipping rates are showing on the test env of the Shop name I'm working on with the orange bar "Test Mode"
  • When I go to API Keys (still in test mode) it show me exactly the same keys as the one in my env
  • When I use my other workflow it logs in the right place (I use still the same keys)
tacit elm
#

It sounds like your dashboard is logged in to a different account than the API key that you are currently using

#

So the other solution to this may be to grab your API keys again from the developer page with your API keys in test mode

chilly willow
#

It's not possible is it possible to be an error on your hand ? I think I found the error but it's strange

#

It still doesn't explain who is this other account

tacit elm
#

Frankly, no it is not. These are two separate accounts that were created separately and set up with similar but slightly different account info.