We're managing an old Rails app that uses Stripe but our Stripe version 26 months behind the current API. We're looking to upgrade to the current Stripe API but because many changes will affect our system, we'd really like a way to test out the changes before we change the live API that our live site is using.
So I have two questions:
1) When working with the API we rely heavily on the distinction between Live and Test modes. Is there any way to upgrade the Test mode API only (without upgrading Live) so we can identify and correct for any breakage without actually breaking the user experience?
2) Is it possible to upgrade the API one version at a time, rather than all-at-once, to make the transition more manageable for us?
It's extremely poorly documented, but it turns out you can change the Stripe API version to any version you want on a per-request basis by setting Stripe.api_version = 'YYYY-MM-DD'
before sending a request using the Ruby bindings (https://stripe.com/docs/api/ruby#versioning), or by sending a Stripe-Version
HTTP header.
So we'll plan to configure our specs to use the latest API version for all requests, and test for breakage that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With