Issue when attempting to sync tiered Price Model
See original GitHub issueDescribe the bug
The Price model does not include tiers
information when the billing scheme is Tiered
.
Software versions
- dj-stripe version: 2.4.0
- Python version: 3.8.6
- Django version: 3.1
- Stripe API version:
- Database type and version: PSQL 11
Steps To Reproduce
- Create tiered
Price
and add tiers in Stripe Dashboard - Sync
Price
models with manage command
Can you reproduce the issue with the latest version of master?
Yes
Expected Behavior
The Price Model should have the tiers JSONField object populated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Tiered Pricing – Pros and Cons and How to Implement It
Use tiered pricing to value your service Tiered pricing helps you to validate your offer. If you aren't selling at your highest price...
Read more >Troubleshoot Azure File Sync cloud tiering | Microsoft Learn
Troubleshoot common issues with cloud tiering in an Azure File Sync ... File Sync unsuccessfully attempts to tier a file to Azure Files....
Read more >"An error has occurred" while savi… | Apple Developer Forums
In Appstore Connect I'm getting "An error has occurred. Try again later." when trying to set up a price tier (Free) for our...
Read more >A win-win solution?: A critical analysis of tiered pricing ... - NCBI
Background. Tiered pricing - the concept of selling drugs and vaccines in developing countries at prices systematically lower than in industrialized ...
Read more >SaaS Pricing Models Guide: Types, Examples and Top ...
Example: Chargebee is a subscription billing platform that charges the customer by directly syncing the price charged for the pricing tier with revenue....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not familiar with the internals of djstripe yet but i think
https://github.com/dj-stripe/dj-stripe/blob/d6a6b51eb1821eeb6ffc441c5c083ff6b51fc272/djstripe/models/core.py#L1904 might have something to do with it.
And
I have it uncommented, and the call to
api_list
still does not include it which I think is by design so I’m not quite sure how this should be fixed.Maybe something like
price.sync_from_stripe_data(price.api_retrieve())
and have an if statement in the sync function.I also tried
djstripe_sync_plans_from_stripe
which gave the same result as it is also using theapi_list
method.Just in case someone else runs into this with v2.4.1. We had some older code still referencing
subscription.plan.tiers
and in this case, it will only return an empty string. To work around this, just get the whole Price object: