#isaacs

1 messages · Page 1 of 1 (latest)

rotund gobletBOT
hardy gate
#

definitely showing up in dashboard, so they're there somewhere

coral sage
#

Do you have multiple Stripe accounts? Could be you're using 2 different secret keys. The other thing it could be is you're in different environments for each request. There's a live and test environment that each have their own keys

hardy gate
#

definitely using the test mode key for the stripe account with the products in the dashboard.

#

also tried minting a brand new test restricted key by logging in with the cli, that one also does not see any products, even after I grant it full access to everything.

#

when I try to create a product with the same ID using that key, I see it colliding, so again, it's there, but it's not showing in the "list all products" api endpoint.

coral sage
#

Can you share a request ID for listing all products?

hardy gate
#

req_AeB5rvataqSwBj

coral sage
#

And can you share 1 of the product ID's you're expecting to see?

hardy gate
#

tier_plan_free_1

#

but really, it should just be showing literally anything, and not nothing.

coral sage
#

Just do this command:
curl -G https://api.stripe.com/v1/products -u sk_test_{redacted}

#

Don't include any other params

#

What happens?

hardy gate
#
HTTP/2 200 
server: nginx
date: Fri, 16 Sep 2022 19:41:52 GMT
content-type: application/json
content-length: 82
access-control-allow-credentials: true
access-control-allow-methods: GET, POST, HEAD, OPTIONS, DELETE
access-control-allow-origin: *
access-control-expose-headers: Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
access-control-max-age: 300
cache-control: no-cache, no-store
request-id: req_4qimB5ZmMfl9uo
stripe-version: 2015-01-11
strict-transport-security: max-age=63072000; includeSubDomains; preload

{
  "object": "list",
  "data": [],
  "has_more": false,
  "url": "/v1/products"
}```
coral sage
#

Ok now can you try with this header in the request: -H "Stripe-Version: 2022-08-01"

#

You're using a very old stripe api version in the list request

#

From 2015

#

There might be some issue there

hardy gate
#

ahhhh interesting

#

yes, that shows all products!

#

thanks

#

how do i change the default API version?

coral sage
#

You have to be careful though

#

It could break your existing integration if you're relying on certain deprecated api calls

#

The recommended way to proceed with an upgrade is to gradually change each api request in your code to use the new version on a per request basis

#

To verify nothing breaks. Then you can upgrade completely

hardy gate
#

this is just my test account, so there's nothing in livemode anyway

#

but yes, thanks for the warning 🙂