Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
corporate: Store the Stripe API version.
Vishnu KS1a1b9b28ff45
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex ab052f6678d..3402ac5a46f 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -51,6 +51,9 @@ MIN_INVOICED_LICENSES = 30MAX_INVOICED_LICENSES = 1000DEFAULT_INVOICE_DAYS_UNTIL_DUE = 30+# The version of Stripe API the billing system supports.+STRIPE_API_VERSION = "2020-08-27"+def get_latest_seat_count(realm: Realm) -> int:non_guests = (diff --git a/docs/subsystems/billing.md b/docs/subsystems/billing.mdindex 230a55eeda9..3057888f5e7 100644--- a/docs/subsystems/billing.md+++ b/docs/subsystems/billing.md@@ -6,6 +6,10 @@ system requires a little bit of setup.To set up the development environment to work on the billing code:- Create a Stripe account+- Ensure that the [API version](https://stripe.com/docs/api/versioning) of+ your Stripe account is same as `STRIPE_API_VERSION` defined in+ `corporate/lib/stripe.py`. You can upgrade to a higher version from+ the Stripe dashboard.- Go to <https://dashboard.stripe.com/account/apikeys>, and add thepublishable key and secret key as `stripe_publishable_key` and`stripe_secret_key` to `zproject/dev-secrets.conf`.@@ -21,9 +25,10 @@ our code is:- Upgrade the API version.- Run `tools/test-backend --generate-stripe-fixtures`- Fix any failing tests, and manually look through `git diff` to understand- the changes.-- If there are no material changes, commit the diff, and open a PR.-- Ask Rishi or Tim to go to <https://dashboard.stripe.com/developers> in the+ the changes. Ensure that there are no material changes.+- Update the value of `STRIPE_API_VERSION` in `corporate/lib/stripe.py`.+- Commit the diff, and open a PR.+- Ask to Tim to go to <https://dashboard.stripe.com/developers> in thezulipchat Stripe account, and upgrade the API version there.We currently aren't set up to do version upgrades where there are breaking