The stripe-ios pod sends the API calls with the following stripe version (STPAPIClient.m line 49)
static NSString * const APIVersion = @"2015-10-12";
I'm wondering if this is on purpose? Should I change it to the API version we use on our server? If yes, how?
Hi @odedharth, thanks for opening an issue.
The APIVersion constant inside this SDK is only used for requests made from this SDK directly with Stripe. Therefore, you can still use any API Version for your server/backend. We are definitely looking into upgrading this constant to something more modern. Again, this has no impact on the API version you use elsewhere.
Does that make sense?
It is now reported in the Stripe dashboard when you’re using very old versions (even via SDKs etc), so I imagine that’s why people are keen to get this updated now.
@joeydong-stripe Got it, just wanted to make sure that this will not cause issues.
And yes like @billinghamj mentioned, because of that it shows in the Stripe dashboard a lot of requests from this old API version.
Might still be worth leaving open - it's still worth updating the version, just not urgent.
any update on this issue?
I've been recommended by Stripe's Tech Support (due to an unknown 500 error in testing Apple Pay payments) to upgrade my API version, which is hardcoded in this library. Is there a way to override this? Can I somehow set the Stripe-Version header from my iOS code?
I've been recommended by Stripe's Tech Support (due to an unknown 500 error in testing Apple Pay payments) to upgrade my API version, which is hardcoded in this library. Is there a way to override this? Can I somehow set the Stripe-Version header from my iOS code?
any update?
We are working on updating the binded API version for our next release. We do not currently plan to support manually setting the preferred API version
We've updated the API version in the latest 17.0.0 release to 2019-05-16
Is there a way to change the API version on the fly? Right now I've been using 14.0.0 and would hate to recompile and resubmit all my apps (white labeled).
No, the API version is sent from your app, so it isn't possible to change it without resubmitting your app to the App Store. We don't have any plans to deprecate the old API version, so you shouldn't need to worry about this unless you need some functionality from a newer version.
The problem is Apple pay is broken in the older API. Requesting a token gives me "An unknown error occurred". I've been recommended to change the API version to more recent, ie 2018-11-08, and Apple Pay transactions suddenly work. However, in order for me to change the API version, I have to manually modify STPAPIClient.m in my Podfile post_install. The API version remained at 2015 until recently, and unfortunately your whole SDK changed so my react-native interface (tipsi-stripe) doesn't work at all with your library. I shouldn't have to upgrade a whole SDK interface just to change the API version.
Sent from my iPhone
On Sep 27, 2019, at 7:19 PM, davidme-stripe notifications@github.com wrote:
No, the API version is sent from your app, so it isn't possible to change it without resubmitting your app to the App Store. We don't have any plans to deprecate the old API version, so you shouldn't need to worry about this unless you need some functionality from a newer version.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
@CarlosCondor Sadly, what I have to do is something like this in my Podfile (but it works):
post_install do |installer|
# Modify APIVersion in Stripe 14.0.0 (more recent so working) - fix "unknown error" when processing
# tipsi-stripe doesn't have androidX yet, and not compatible with Stripe 17.0.0
filepath = "Pods/Stripe/Stripe/STPAPIClient.m"
text = File.read(filepath)
replace = text.gsub(/const APIVersion = @"2015-10-12";/, 'const APIVersion = @"2018-11-08";')
File.open(filepath, "w") {|file| file.puts replace}
end
I can't update to a newer version of the SDK because the library I use with it (tipsi-stripe) doesn't yet support the SDK rewrite. So my only choice is to hack the library files (version 14.0.0).
@davidme-stripe Honestly, what would have been even better is having a method ported back to older versions (ie 14.0.0) that can customize the API version. Pretty much every other Stripe library out there can do that. I don't see the sense in having the API version hardcoded and not customizable.
Thanks @tmaly1980, we're looking into why some Apple Pay transactions would fail on the 2015-10-12 but not the 2018-11-08 API. We don't want existing apps in the store to break, so it's important that the 2015-10-12 API continues to work.
We'll take your feedback into account and continue to discuss the idea of a configurable API version internally.
@tmaly1980 It may be worth investigating whether our fork of tipsi-stripe meets your needs. We had to migrate some code to work with the newer Stripe API, and to get access to new features. I'd be happy to fix up some bits that were only modified to suit our needs.
Most helpful comment
Might still be worth leaving open - it's still worth updating the version, just not urgent.