The Fix
pip install stripe==14.4.0a2
Based on closed stripe/stripe-python issue #585 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -1,6 +1,6 @@
from __future__ import absolute_import, division, print_function
-from stripe import api_requestor, util
+from stripe import api_requestor, six, util
from stripe.stripe_object import StripeObject
Option A — Upgrade to fixed release\npip install stripe==14.4.0a2\nWhen NOT to use: This fix is not applicable if the API behavior changes in future versions.\n\n
Why This Fix Works in Production
- Trigger: Thanks for reporting the error in the documentation too, I'll pass that along. (And agreed that the actual behavior is better than what's being described!)
- Mechanism: The library incorrectly used starting_after instead of ending_before for backwards pagination
- Why the fix works: Added support for backwards auto-pagination in the ListObject class, allowing the use of ending_before parameter. (first fixed release: 14.4.0a2).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 2.38.0 in real deployments (not just unit tests).
- The library incorrectly used starting_after instead of ending_before for backwards pagination
- Production symptom (often without a traceback): Thanks for reporting the error in the documentation too, I'll pass that along. (And agreed that the actual behavior is better than what's being described!)
Proof / Evidence
- GitHub issue: #585
- Fix PR: https://github.com/stripe/stripe-python/pull/623
- First fixed release: 14.4.0a2
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.76
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Hi @WinnieP, thanks for the suggestion! I think adding support for paginating backwards should be doable, I'll look into it”
“Sorry for the late reply! stripe-python 2.38.0 now supports paginating backwards.”
Failure Signature (Search String)
- Thanks for reporting the error in the documentation too, I'll pass that along. (And agreed that the actual behavior is better than what's being described!)
Copy-friendly signature
Failure Signature
-----------------
Thanks for reporting the error in the documentation too, I'll pass that along. (And agreed that the actual behavior is better than what's being described!)
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Thanks for reporting the error in the documentation too, I'll pass that along. (And agreed that the actual behavior is better than what's being described!)
Environment
- Python: 2.38.0
What Broke
Users experienced errors when attempting to paginate backwards with ending_before.
Why It Broke
The library incorrectly used starting_after instead of ending_before for backwards pagination
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install stripe==14.4.0a2
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/stripe/stripe-python/pull/623
First fixed release: 14.4.0a2
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the API behavior changes in future versions.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 14.4.0a2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.