dj-stripe automatically syncs your Stripe Data to your local database as pre-implemented Django Models allowing you to use the Django ORM, in your code, to work with the data making it easier and faster.
MIT License
Published by kavdev almost 4 years ago
This is a bugfix-only version:
Published by kavdev almost 4 years ago
This is a bugfix-only version:
Published by jleclanche almost 4 years ago
This is a bugfix-only release for Python 2 and migration issues found
in dj-stripe 1.1.0.
If you are on an older version of dj-stripe, you should upgrade to 1.1.x
first with pip install "djstripe<1.2"
before upgrading to 1.2.x.
Please make sure to read the 1.1.0 release notes below.
Published by kavdev almost 4 years ago
Published by therefromhere almost 4 years ago
Published by jleclanche almost 4 years ago
2.3.0
.PaymentMethod
has been renamed to DjstripePaymentMethod
(#841). An alias remainsstripe_objects
module.stripe_timestamp
field.Charge.receipt_number
field.StripeSource
alias for Card
SubscriptionView
, CancelSubscriptionView
andCancelSubscriptionForm
.DJSTRIPE_SUBSCRIPTION_REDIRECT
.stripe_id
fields have been renamed id
.Charge.source_type
has been deprecated. Use Charge.source.type
.Charge.source_stripe_id
has been deprecated. Use Charge.source.id
.date
, destination_type
(type
), failure_code
,failure_message
, statement_descriptor
and status
.REMOTE_ADDR
is missing (#640).ApplicationFee
ApplicationFeeRefund
BalanceTransaction
CountrySpec
ScheduledQuery
SubscriptionItem
TransferReversal
UsageRecord
fee
and fee_details
attributes of both the Charge
and Transfer
objectsbalance_transaction
foreign key. Note that fee_details
has been deprecated onfraudulent
attribute on Charge
is now a property that checks thefraud_details
field.Customer.sources
no longer refers to a Card queryset, but to a Source queryset. Incustomer.sources
to customer.legacy_cards
instead. The legacy_cards
attributeCustomer.sources_v3
is now named Customer.sources
.Customer.payment_methods
is now available, which allows you toCard.customer
is now nullable and cards are no longer deleted when theirDJSTRIPE_WEBHOOK_SECRET
setting to your secret to start using it.StripeObject
has been renamed StripeModel
. An alias remains but will be removedCustomer
object can now be configured by changing theDJSTRIPE_SUBSCRIBER_CUSTOMER_KEY
setting. Setting this to None or an empty stringStripeModel.sync_from_stripe_data()
will now automatically retrieve relatedCoupon.name
Transfer.balance_transaction
Published by jleclanche almost 4 years ago
This is a bugfix-only version:
invoiceitem.updated
(#848).evt_00000000000000
is not used anymore.SubscriptionItem.quantity
on metered Plans (#865).Plan.create()
(#870).Published by jleclanche almost 4 years ago
This is a bugfix-only version:
REMOTE_ADDR
is an empty string.field_name
parameter to sync_from_stripe_data
Published by jleclanche almost 4 years ago
This is a bugfix-only version:
_get_or_create_from_stripe_object
, wrap create _create_from_stripe_object
inTransactionManagementError
on race condition in webhookPublished by jleclanche almost 4 years ago
This is a bugfix-only version:
Published by therefromhere over 4 years ago
JSONField
dependency back toTaxRate
events (#1094).Invoice.sync_from_stripe_data
(#1052).Subscription
& Charge
.sync_from_stripe_data
(#1054)._stripe_object_set_total_tax_amounts
unique handling (#1139).Invoice
fields (see https://stripe.com/docs/upgrades#2018-11-08 ):
.closed
.forgiven
.billing
(renamed to .collection_method
)enums.InvoiceStatus
(#1020).Subscription.billing
(use .collection_method
instead)Subscription.start
(use .start_date
instead)Subscription.tax_percent
(use .default_tax_rates
instead)Invoice.status
and enums.InvoiceStatus
(#1020).Invoice
fields (#1020, #1087):
.discount
.default_source
.status
Subscription
fields (#1087):
.default_payment_method
.default_source
.next_pending_invoice_item_invoice
.pending_invoice_item_interval
.pending_update
.start_date
Both jsonfield and jsonfield2 use the same import path, so if
upgrading from dj-stripe~=2.2.0 in an existing virtualenv, be sure to
uninstall jsonfield2 first. eg:
# ensure jsonfield is uninstalled before we install jsonfield2
pip uninstall jsonfield2 -y && pip install "dj-stripe>=2.3.0dev"
Otherwise, pip uninstall jsonfield2
will remove jsonfield's
jsonfield
module from site-packages
, which would cause errors like
ImportError: cannot import name 'JSONField' from 'jsonfield' (unknown location)
If you have hit this ImportError already after upgrading, running this
should resolve it:
# remove both jsonfield packages before reinstall to fix ImportError:
pip uninstall jsonfield jsonfield2 -y && pip install "dj-stripe>=2.3.0dev"
Note that this is only necessary if upgrading from dj-stripe 2.2.x,
which temporarily depended on jsonfield2. This process is not necessary
if upgrading from an earlier version of dj-stripe.
Published by therefromhere over 4 years ago
Changed JSONField dependency back to jsonfield from jsonfield2, since jsonfield2 has now been merged back into jsonfield (See #1118).
Published by therefromhere almost 5 years ago
This is a bugfix-only version:
TaxRate
events (#1094).Published by therefromhere almost 5 years ago
This is a bugfix-only version:
Published by therefromhere almost 5 years ago
JSONField
dependency package fromUpcomingInvoice
, so it's no longer a subclass ofInvoice
(to allow Invoice
to use ManyToManyFields
).Account
fields (see https://stripe.com/docs/upgrades#2019-02-19 ):
.business_name
.business_primary_color
.business_url
(changed to a property).debit_negative_balances
.decline_charge_on
.display_name
.legal_entity
.payout_schedule
.payout_statement_descriptor
.statement_descriptor
.support_email
.support_phone
.support_url
.timezone
.verification
Account.business_logo
property.branding_icon
)Customer.account_balance
property.balance
)Invoice.application_fee
,Invoice.date
PaymentMethodType
(useDjstripePaymentMethodType
instead)Invoice.billing
to .collection_method
(added deprecatedInvoice
model to add missing fields.TaxRate
model, and Invoice.default_tax_rates
,InvoiceItem.tax_rates
, Invoice.total_tax_amounts
,Subscription.default_tax_rates
, SubscriptionItem.tax_rates
StripeQuantumCurrencyAmountField
andStripeDecimalCurrencyAmountField
to support Stripe Large Chargescustomer.subscription.deleted
updatesstatus="canceled"
instead of deleting it from ourRefund.reason
value, increases field width (#1075).Refund.status
definition, reduces field width (#1076).Invoice.status
(renamed toInvoice.legacy_status
) to make way for the Stripe fieldBoth jsonfield and jsonfield2 use the same import path, so if
upgrading to dj-stripe>=2.2 in an existing virtualenv, be sure to
uninstall jsonfield first. eg:
# ensure jsonfield is uninstalled before we install jsonfield2
pip uninstall jsonfield -y && pip install "dj-stripe>=2.2.0"
Otherwise, pip uninstall jsonfield
will remove jsonfield2’s
jsonfield
module from site-packages
, which would cause errors like
ImportError: cannot import name 'JSONField' from 'jsonfield' (unknown location)
If you have hit this ImportError already after upgrading, running this
should resolve it:
# remove both jsonfield packages before reinstall to fix ImportError:
pip uninstall jsonfield jsonfield2 -y && pip install "dj-stripe>=2.2.0"
See Integrating Stripe Elements
for notes about usage of the Stripe Elements frontend JS library.
In summary: If you haven't yet migrated to PaymentIntents, prefer
stripe.createSource()
to stripe.createToken()
.
Published by therefromhere about 5 years ago
This is a bugfix-only release:
Customer.subscription
and .valid_subscriptions()
to ignorestatus=incomplete_expired
(#1006).paymentmethod.detached
event with card_xxx
PaymentMethod.detach()
(#943).help_text
on all currency fields to make it clear ifStripeQuantumCurrencyAmountField
)StripeDecimalCurrencyAmountField
) (#999)Published by therefromhere about 5 years ago
This is a bugfix-only version:
Published by therefromhere about 5 years ago
As per our migration policy unreleased migrations on the master branch (migration numbers >=0004) have been squashed.
If you have been using the 2.1.0dev branch from master, you'll need to run the squashed migrations migrations before upgrading to >=2.1.0.
The simplest way to do this is to pip install dj-stripe==2.1.0rc0
and migrate, alternatively check out this tag (2.1.0rc0
).
Published by therefromhere about 5 years ago
2.32.0
, also2.36.0
is excluded due to a regression (#991).Charge.fee_details
property.Transfer.fee_details
property.field_name
parameter tosync_from_stripe_data
StripeObject
of StripeModel
PaymentMethod
of DjstripePaymentMethod
Charge.source_type
andCharge.source_stripe_id
enums.PaymentMethodType
has been deprecated, use enums.DjstripePaymentMethodType
SubscriptionItem.quantity
nullable as per Plans withusage_type="metered"
(follow-up to #865)djstripe_sync_models
anddjstripe_process_events
(#727, #89)Customer.purge()
(#916)Subscription.is_status_temporarily_current()
(#852)Customer
model: address
, invoice_prefix
,invoice_settings
, phone
, preferred_locales
, tax_exempt
Changes from API 2018-11-08:
Invoice.auto_advance
, deprecated Invoice.closed
andInvoice.forgiven
, seeChanges from API 2019-02-19:
Major changes to Account fields, see
https://stripe.com/docs/upgrades#2019-02-19 , updated Account
fields to match API 2019-02-19:
Added Account.business_profile
, .business_type
, .company
,
.individual
, .requirements
, .settings
Deprecated the existing fields, to be removed in 2.2
Special handling of the icon and logo fields:
- Renamed
Account.business_logo
toAccount.branding_icon
(note that in Stripe's APIAccount.business_logo
was renamed
toAccount.settings.branding_icon
, and
Account.business_logo_large
(which we didn't have a field
for) was renamed toAccount.settings.branding_logo
)- Added deprecated property for
Account.business_logo
- Added
Account.branding_logo
as a ForeignKey- Populate
Account.branding_icon
and.branding_logo
from the
newAccount.settings.branding.icon
and.logo
Changes from API 2019-03-14:
Invoice.application_fee
toInvoice.application_fee_amount
(added deprecated property for theInvoice.date
, in place of Invoice.created
(addedInvoice.status_transitions
Customer.account_balance
to Customer.balance
(addedCustomer.payment_methods
toCustomer.customer_payment_methods
SubscriptionStatus.incomplete
andSubscriptionStatus.incomplete_expired
statuses (#974)BalanceTransactionType
values (#983)As per our migration policy, unreleased migrations on the master
branch have been squashed.
If you have been using the 2.1.0dev branch from master, you'll need to
run the squashed migrations migrations before upgrading to >=2.1.0.
The simplest way to do this is to pip install dj-stripe==2.1.0rc0
and
migrate, alternatively check out the 2.1.0rc0
git tag.
Published by kavdev over 6 years ago
This release resets all migrations to 0001_initial
. Migrations were previously in an unmaintainable state, and this is an unavoidable step.
You will not be able to upgrade directly to dj-stripe 1.2.0 from dj-stripe < 1.1.0. You must go through 1.1.0 first, run manage.py migrate djstripe
, then upgrade to 1.2.0. Once on 1.2.0, you'll need to clear your migrations table of dj-stripe entries and then run manage.py migrate djstripe --fake