Exchange rates API not working
dingo-d opened this issue · 2 comments
Describe the bug
I tried fetching exchange API rates in my WordPress plugin using:
$stripe = new \Stripe\StripeClient('sk_test_...');
$rates = $stripe->exchangeRates->all();
But I get an error that the request URL is not recognized.
Is there a way to get the exchange rates used by Stripe in any way?
To Reproduce
$stripe = new \Stripe\StripeClient('sk_test_...');
$rates = $stripe->exchangeRates->all();
Expected behavior
Get a list of exchange rates for the day.
Code snippets
No response
OS
macOS Ventura
PHP version
PHP 8.0
Library version
stripe-php v10.12.1
API version
latest
Additional context
No response
@dingo-d That API is a bit special, it's been in the library for a few users but it's not a "public API" and is only accessible by a few accounts. We originally intended to ship it publicly but didn't and we kind of left it alone in libraries but it's definitely confusing I'm sorry.
I would recommend using external APIs for exchange rate calculations as this is not something we plan to make public for now and we're not giving access to more developers.
I would recommend using external APIs for exchange rate calculations as this is not something we plan to make public for now and we're not giving access to more developers.
Yeah, I found one that I guess I'd have to use instead.
Shame this wasn't exposed publicly. Even as an extra paid feature, it would really come in handy. Especially for stores using multiple currencies (exchange rates can really differ based on which API you use).
Hope this becomes a feature in the future 🤞🏼