Skip to content

dj-stripe 3.0.0 (20XX-XX-XX)

Attention

3.0.0 is a significantly backwards-incompatible release. Migrating a 2.x database is unsupported due to significant changes to the data models.

Release highlights

  • A new field stripe_data json field has been added to all supported models. This field contains a copy of the entire object as-is in the Stripe API.

Breaking changes

Attention

Many superfluous model fields have been removed, in favour of using stripe_data. We retain model fields for useful foreign keys and other frequently-used fields.

  • Migrations have been reset.
  • Removed deprecated DJSTRIPE_WEBHOOK_TOLERANCE setting.
  • Removed deprecated DJSTRIPE_WEBHOOK_SECRET setting.
  • Removed deprecated DJSTRIPE_WEBHOOK_VALIDATION setting.
  • Removed deprecated DJSTRIPE_WEBHOOK_URL setting.
  • Removed legacy Customer.add_card() method. Use Custoner.add_payment_method() instead.
  • Most of the models visible in the Django Admin are now read-only. (Note: This does not change anything functionally, as editing models was not replicated upstream.)
  • DJSTRIPE_FOREIGN_KEY_TO_FIELD setting has been removed, which drops support for legacy djstripe_id foreign keys.
  • Support for webhook endpoints without UUID has been dropped
  • Removed djstripe_update_invoiceitem_ids management command.
  • Removed CountrySpec model as it does not make sense to store it in the database.

Other changes

  • Dropped unique_together constraint on the Customer model. This was done because given the same livemode and djstripe_owner_account, a subscriber can be associated with multiple customers and that is Stripe's default behavior.
  • Added missing model fields to Checkout Sessions.
  • LineItem instances can also get synced using the djstripe_sync_models management command.
  • Updated check_stripe_api_key django system check to not be a blocker for new dj-stripe users by raising Info warnings on the console. If the Stripe keys were not defined in the settings file, the Critical warning was preventing users to add them directly from the admin as mentioned in the docs. This was creating a chicken-egg situation where one could only add keys in the admin before they were defined in settings.
  • Added paused as a valid status to the SubscriptionStatus enum