Skip to content

Releases: dj-stripe/dj-stripe

dj-stripe 2.8.1

08 Aug 11:58
Compare
Choose a tag to compare

This release removes a migration which caused a crash in certain cases.

dj-stripe 2.8.0

08 Aug 11:57
Compare
Choose a tag to compare
It is not possible to upgrade to dj-stripe 2.8.0 from versions older than 2.5.0.
To upgrade from an older version, first upgrade to dj-stripe 2.5.0.

Release highlights

This release introduces support for Stripe Identity.

It is also slated to be the last major release before dj-stripe 3.0, which will introduce
significant, backwards-incompatible changes.

  • Python 3.11 is now supported.
  • Django 4.1 and 4.2 are now supported.
  • Python 3.7 is no longer supported. Python 3.8 or higher is required.
  • Added LineItem model.
  • Added Discount model.
  • Added SourceTransaction, VerificationSession and VerificationReport models.

Deprecated features

  • DJSTRIPE_WEBHOOK_EVENT_CALLBACK is deprecated in favour of the new webhook signals.
  • DJSTRIPE_WEBHOOK_TOLERANCE is deprecated in favour of the new UUID webhooks tolerance model field.

Breaking changes

  • Remove legacy JSONField support. This drops support for installations with the
    DJSTRIPE_USE_NATIVE_JSONFIELD setting set to False.
    NOTE: No migration path is available yet.
    #1820
  • Remove djstripe_sync_plans_from_stripe command (deprecated in 2.4.0).
    Use djstripe_sync_models price instead.
  • Remove Customer.can_charge(), Customer.has_valid_source() ()
  • Remove DJSTRIPE_PRORATION_POLICY setting (deprecated in 2.6.0)
  • Remove deprecated prorate argument to Subscription.update() (Use Stripe's
    proration_behavior argument instead)
  • Remove undocumented set_stripe_api_version() helper function
    and context manager stripe_temporary_api_version().
    The API version is now set on each request individually.
  • Updated Charge.refund(...) helper function
    to correctly create the desired refund. Note that the
    created Refund object is now returned as opposed to
    the Charge object.
  • Resolved ambiguity between LineItem and InvoiceItem models. We previously
    assumed that the lines List object on Invoice and UpcomingInvoice models only
    return InvoiceItem objects. Moreover LineItem objects can also be of type
    subscription if the user adds a Subscription to their Invoice as a lineitem.

Other changes

  • Updated the Stripe API key and webhook django system check to warning instead of critical.
  • Added various missing model field to CheckoutSession and Payout models.
  • Added support for running tests using the real Stripe API calls.
  • stripe.api_version is no longer manipulated by dj-stripe.
  • New webhook signals are available:
    • djstripe.signals.webhook_pre_validate(instance, api_key): Fired before webhook validation
    • djstripe.signals.webhook_post_validate(instance, api_key, valid): Fired after validation (even unsuccessful validations)
    • djstripe.signals.webhook_pre_process(instance, api_key): Fired before webhook processing. Not fired if the validation failed.
    • djstripe.signals.webhook_post_process(instance, api_key): Fired after webhook successful processing.
  • djstripe.signals.webhook_processing_error now also takes instance and api_key arguments
  • Updated deprecated pkg_resources to importlib.

dj-stripe 2.7.2

21 Oct 16:29
Compare
Choose a tag to compare

This is a maintenance release only fixing the installation of dj-stripe on Django 4.0 and 4.1.

Release notes

  • Fix installing with Poetry on Django 4.0 and higher

dj-stripe 2.7.1

20 Oct 14:16
Compare
Choose a tag to compare

Release notes

  • Remove an enum value generating an extra migration
  • Allow Django 4.1 as a dependency (Note: Running dj-stripe 2.7.x with Django 4.1 is
    untested)

dj-stripe 2.7.0

17 Oct 19:46
Compare
Choose a tag to compare

!!! attention

It is not possible to upgrade to dj-stripe 2.7.0 from versions older than 2.4.0.
To upgrade from an older version, first upgrade to dj-stripe 2.4.0.

This release focuses on Webhook Endpoints. For more information on the reasoning behind
the changes, please see the discussion on Github:

#1437

Release highlights

  • Webhook Endpoints are now configured via the Django administration.
  • Multiple Webhook Endpoints are now supported.
  • Webhook Endpoints now have a unique, non-guessable URL.

Deprecated features

  • The DJSTRIPE_WEBHOOK_URL setting is deprecated. It will be removed in dj-stripe
    2.9. It was added to give a way of "hiding" the webhook endpoint URL, but that is no
    longer necessary with the new webhook endpoint system.

Breaking changes

  • Remove the deprecated middleware djstripe.middleware.SubscriptionPaymentMiddleware
  • Remove support for the deprecated DJSTRIPE_SUBSCRIPTION_REDIRECT setting
  • Remove support for the DJSTRIPE_SUBSCRIPTION_REQUIRED_EXCEPTION_URLS setting

Other changes

  • Many Stripe Connect related fixes (Special thanks to Dominik Bartenstein of Zemtu)
  • Allow passing stripe kwargs in Subscription.cancel()
  • Various admin improvements
  • Add support for managing subscription schedules from the admin

dj-stripe 2.6.3

14 Oct 22:52
Compare
Choose a tag to compare

Release notes

  • Update migrations missed in 2.6.2 (#1819)
  • Fix a crash with string representations of uninitialized Card objects

dj-stripe 2.6.2

02 Jul 13:47
2.6.2
Compare
Choose a tag to compare

This is a maintenance release to remove the generation of an unnecessary migration when
running dj-stripe on Django 4.0.
This release does not guarantee Django 4.0 compatibility. Run at your own risk.

Release notes

  • Update migrations to be compatible with Django 4.0 (#1649)

dj-stripe 2.6.1

07 Feb 13:47
2.6.1
Compare
Choose a tag to compare

Release notes

  • Fix for failing webhooks, usually to do with customer subscriptions (#1588)

dj-stripe 2.6.0

15 Jan 12:54
2.6.0
Compare
Choose a tag to compare

dj-stripe 2.6.0 (2022-01-15)

NOTE: It is not possible to upgrade to dj-stripe 2.6.0 from versions older than 2.3.0. To upgrade from an older version, first upgrade to dj-stripe 2.3.0.

Release highlights

  • Support for Python 3.10 and Django 4.0.
  • New models: Mandate, Payout, UsageRecordSummary, WebhookEndpoint (unused)
  • Significant improvements and fixes to Stripe Connect features.
  • Storing Stripe API keys by adding them to the Admin is now supported.
    This allows for use of multiple Stripe API keys (multiple Stripe accounts).
  • Support for syncing Connect accounts via djstripe_sync_models.

Deprecated features

  • The use of the old jsonfield-based JSONField is deprecated and support for it
    will be dropped in dj-stripe 2.8.0. django.models.JSONField is available since
    Django 3.1.0. To switch to the newer JSONFields, set DJSTRIPE_USE_NATIVE_JSONFIELD
    to True. Set it to False to remain on the jsonfield-powered text-based fields.
    A manual migration is necessary to convert existing databases from text to json.
  • The DJSTRIPE_PRORATION_POLICY setting is deprecated and will be ignored in 2.8.
    Specify proration_policy in the Subscription.update() method explicitly instead.
  • Customer.can_charge() is now deprecated. This was a very misleading method which
    resulted in incorrect behaviour when Customers had multiple payment methods. It will
    be removed in dj-stripe 2.8.0. You can use Customer.payment_methods.all() instead.
  • For similar reasons, Customer.has_valid_source() is deprecated and will be removed
    in dj-stripe 2.8.0. You can use Customer.sources.all() instead.

Breaking changes

  • Python 3.6 is no longer supported. The new minimum version of Python is 3.7.12.
  • Django 2.2 and 3.1 are no longer supported.
  • DJSTRIPE_USE_NATIVE_JSONFIELD now defaults to True. If you previously had it set
    to False, or did not have it set, you may want to explicitly set it to False in
    order to support a pre-existing database. A migration path will later be provided
    for this use case.
  • The undocumented get_stripe_api_version() helper function has been removed.
  • Settings for dj-stripe are now in djstripe.settings.djstripe_settings (as opposed
    to top-level in djstripe.settings)
  • Customer.subscribe() method no longer accepts positional arguments, only keywords.
  • charge_immediately support in Customer.subscribe() has been removed (deprecated
    in 2.4). Set collection_method instead.
  • The at_period_end argument to Subscription.cancel() now defaults to False,
    instead of the value of DJSTRIPE_PRORATION_POLICY.

Other changes

  • The Stripe Account that triggered an Event is now available on the field
    WebhookEventTrigger.stripe_trigger_account.
  • Fixed recursive fetch/update loop errors in djstripe_sync_models.
  • Migrations have been optimized and should be faster.
  • dj-stripe now checks the apparent validity of API keys used and will raise
    InvalidStripeAPIKey if the API key looks completely incorrect.
  • Customers can now be subscribed to multiple prices and/or plans by passing the items argument
    to Customer.subscribe().
  • Checkout Session metadata can be used to create/link a Stripe Customer to the
    Customer instance specified by the djstripe_settings.SUBSCRIBER_CUSTOMER_KEY.

dj-stripe 2.6.0 release candidate 1

12 Jan 01:04
2.6.0rc1
Compare
Choose a tag to compare
Pre-release

This is a release candidate for dj-stripe 2.6.0. Please see here for release notes.