Skip to content

Releases: stripe/stripe-python

v8.1.0

01 Feb 22:22
Compare
Choose a tag to compare
  • #1213 Update generated code
    • Add support for swish payment method throughout the API
    • Add support for relationship on parameter classes Account.CreateParamsIndividual and Token.CreateParamsAccountIndividual
    • Add support for jurisdiction_level on resource TaxRate
    • Change type from str to Literal["offline", "online"] of status on field terminal.Reader

See the changelog for more details.

v8.1.0b1

25 Jan 23:47
Compare
Choose a tag to compare
v8.1.0b1 Pre-release
Pre-release
  • #1198 Update generated code for beta
    • Add support for create_preview method on resource Invoice
  • #1211 Merge master into beta

See the changelog for more details.

v8.0.0

25 Jan 17:28
Compare
Choose a tag to compare
  • #1206 stripe-python v8 release
    This release introduces StripeClient and a service-based call pattern. This new interface allows you to easily call Stripe APIs and has several benefits over the existing resource-based pattern:

    • No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
    • No static methods for easier mocking

    For full migration instructions, please refer to the v8 migration guide.

    "⚠️" symbol highlights breaking changes

    ⚠️ Changed

    • ⚠️ Request options like api_key, stripe_account, stripe_version, and idempotency_key can no longer be passed in positionally on resource methods. Please pass these in as keyword arguments.

    BEFORE

    stripe.Customer.create(
      "sk_test_123",  # api key
      "KG5LxwFBepaKHyUD",  # idempotency key
      "2022-11-15",  # stripe version
      "acct_123",  # stripe account
    )

    AFTER

    stripe.Customer.create(
      api_key="sk_test_123",
      idempotency_key="KG5LxwFBepaKHyUD",
      stripe_version="2022-11-15",
      stripe_account="acct_123",
    )
    • ⚠️ Methods that turn a response stream (Quote.pdf) now returns a single value of type StripeResponseStream instead of a tuple containing (StripeResponseStream, api_key).
    • ⚠️ Removed public access to APIRequestor. APIRequestor's main use is internal, and we don't have a good understanding of its external use cases. We had to make several breaking changes to its interface as part of this update, so rather than leaving it public we made it private. If you have a use case for APIRequestor, please open up a Github issue describing it. We'd rather you rely on something specifically designed for your use case than having to reach into the library's internals.

    ⚠️ Removed

    • ⚠️ Remove api_version from File.create parameters. Please use stripe_version instead.
    • ⚠️ Remove util.read_special_variable() utility method (importing directly from stripe.util is deprecated as of v7.8.0)
    • ⚠️ Remove StripeError.construct_error_object(). This method was intended for internal stripe-python use only.
    • ⚠️ Remove ListObject.empty_list(). This method was intended for internal stripe-python use only.
    • ⚠️ Remove SearchResultObject.empty_search_result(). This method was intended for internal stripe-python use only.
    • ⚠️ Remove StripeObject.ReprJSONEncoder. This class was intended for internal stripe-python use only.
    • ⚠️ Remove StripeObject.api_base. This property was defunct and returned None.

See the changelog for more details.

v7.14.0

25 Jan 17:10
Compare
Choose a tag to compare
  • #1199 Update generated code
    • Add support for annual_revenue and estimated_worker_count on Account.business_profile, Account.CreateParams.business_profile, and Account.UpdateParams.business_profile
    • Add support for new value registered_charity on enums Account.CreateParams.company.structure, Account.UpdateParams.company.structure, and Token.CreateParams.account.company.structure
    • Add support for collection_options on AccountLink.CreateParams
    • Add support for liability on Checkout.Session.automatic_tax, PaymentLink.automatic_tax, PaymentLink.CreateParams.automatic_tax, PaymentLink.UpdateParams.automatic_tax, Quote.automatic_tax, Quote.CreateParams.automatic_tax, Quote.UpdateParams.automatic_tax, SubscriptionSchedule.default_settings.automatic_tax, SubscriptionSchedule.phases[].automatic_tax, SubscriptionSchedule.CreateParams.default_settings.automatic_tax, SubscriptionSchedule.CreateParams.phases[].automatic_tax, SubscriptionSchedule.UpdateParams.default_settings.automatic_tax, SubscriptionSchedule.UpdateParams.phases[].automatic_tax, and checkout.Session.CreateParams.automatic_tax
    • Add support for issuer on Checkout.Session.invoice_creation.invoice_data, PaymentLink.invoice_creation.invoice_data, PaymentLink.CreateParams.invoice_creation.invoice_data, PaymentLink.UpdateParams.invoice_creation.invoice_data, Quote.invoice_settings, Quote.CreateParams.invoice_settings, Quote.UpdateParams.invoice_settings, SubscriptionSchedule.default_settings.invoice_settings, SubscriptionSchedule.phases[].invoice_settings, SubscriptionSchedule.CreateParams.default_settings.invoice_settings, SubscriptionSchedule.CreateParams.phases[].invoice_settings, SubscriptionSchedule.UpdateParams.default_settings.invoice_settings, SubscriptionSchedule.UpdateParams.phases[].invoice_settings, and checkout.Session.CreateParams.invoice_creation.invoice_data
    • Add support for invoice_settings on PaymentLink.subscription_data, PaymentLink.CreateParams.subscription_data, PaymentLink.UpdateParams.subscription_data, and checkout.Session.CreateParams.subscription_data
    • Add support for new value challenge on enums Invoice.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure, Invoice.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure, Subscription.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure, and Subscription.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure
    • Add support for promotion_code on Invoice.UpcomingLinesParams.discounts[], Invoice.UpcomingLinesParams.invoice_items[].discounts[], Invoice.UpcomingParams.discounts[], and Invoice.UpcomingParams.invoice_items[].discounts[]
    • Add support for account_type on PaymentMethod.UpdateParams.us_bank_account

See the changelog for more details.

v7.14.0b1

18 Jan 22:52
Compare
Choose a tag to compare
v7.14.0b1 Pre-release
Pre-release
  • #1197 Update generated code for beta
    Release specs are identical.
  • #1192 Update generated code for beta
    • Add support for new value nn on enum ConfirmationToken.PaymentMethodPreview.Ideal.bank
    • Add support for new value NNBANL2G on enum ConfirmationToken.PaymentMethodPreview.Ideal.bic
    • Change Invoice.AutomaticTax.liability, Invoice.issuer, and Subscription.AutomaticTax.liability to be required

See the changelog for more details.

v7.13.0

18 Jan 22:08
Compare
Choose a tag to compare
  • #1193 Update generated code
    • Add support for providing details about BankAccount, Card, and CardToken on Account.CreateExternalAccountParams.external_account and Account.CreateParams.external_account
    • Add support for new value nn on enums Charge.PaymentMethodDetails.Ideal.bank, PaymentIntent.ConfirmParamsPaymentMethodDataIdeal.bank, PaymentIntent.CreateParamsPaymenMethodDataIdeal.bank, PaymentIntent.UpdateParamsPaymentMethodDataIdeal.bank, PaymentMethod.Ideal.bank, PaymentMethod.CreateParamsIdeal.bank, SetupAttempt.PaymentMethodDetails.Ideal.bank, SetupIntent.ConfirmParamsPaymenMethodDataIdeal.bank, SetupIntent.CreateParamsPaymenMethodDataIdeal.bank, and SetupIntent.UpdateParamsPaymenMethodDataIdeal.bank
    • Add support for new value NNBANL2G on enums Charge.PaymentMethodDetails.Ideal.bic, PaymentMethod.Ideal.bic, and SetupAttempt.PaymentMethodDetails.Ideal.bic
    • Change CustomerSession.Components.buy_button and CustomerSession.Components.pricing_table to be required
    • Add support for issuer on Invoice.CreateParams, Invoice.UpcomingLinesParams, Invoice.UpcomingParams, Invoice.UpdateParams, and Invoice
    • Add support for liability on Invoice.automatic_tax, Invoice.CreateParams.automatic_tax, Invoice.UpcomingLinesParams.automatic_tax, Invoice.UpcomingParams.automatic_tax, Invoice.UpdateParams.automatic_tax, Subscription.automatic_tax, Subscription.CreateParams.automatic_tax, and Subscription.UpdateParams.automatic_tax
    • Add support for on_behalf_of on Invoice.UpcomingLinesParams and Invoice.UpcomingParams
    • Add support for pin on issuing.Card.CreateParams
    • Add support for revocation_reason on Mandate.PaymentMethodDetails.bacs_debit
    • Add support for customer_balance on PaymentMethodConfiguration.CreateParams, PaymentMethodConfiguration.UpdateParams, and PaymentMethodConfiguration
    • Add support for invoice_settings on Subscription.CreateParams and Subscription.UpdateParams

See the changelog for more details.

v7.13.0b1

12 Jan 18:59
Compare
Choose a tag to compare
v7.13.0b1 Pre-release
Pre-release
  • #1189 Update generated code for beta
  • #1191 Beta: report raw_request usage
  • #1165 Beta: raw_request_async with HTTPX

See the changelog for more details.

v7.12.0

12 Jan 18:13
Compare
Choose a tag to compare
  • #1188 Update generated code
    • Add support for new resource CustomerSession
    • Add support for create method on resource CustomerSession
    • Remove support for values obligation_inbound, obligation_payout_failure, obligation_payout, and obligation_reversal_outbound from enum BalanceTransaction.type
    • Add support for new values eps and p24 on enums Invoice.payment_settings.payment_method_types[], InvoiceCreateParams.payment_settings.payment_method_types[], InvoiceUpdateParams.payment_settings.payment_method_types[], Subscription.payment_settings.payment_method_types[], SubscriptionCreateParams.payment_settings.payment_method_types[], and SubscriptionUpdateParams.payment_settings.payment_method_types[]
    • Remove support for value obligation from enum Reporting.ReportRunCreateParams.parameters.reporting_category
    • Add support for billing_cycle_anchor_config on SubscriptionCreateParams and Subscription

See the changelog for more details.

v7.12.0b1

04 Jan 20:40
Compare
Choose a tag to compare
v7.12.0b1 Pre-release
Pre-release
  • #1187 Update generated code for beta
    • Updated stable APIs to the latest version

See the changelog for more details.

v7.11.0

04 Jan 19:55
Compare
Choose a tag to compare
  • #1186 Update generated code
    • Add support for retrieve on resource tax.Registration
    • Change type from Optional[PaymentDetails] to PaymentDetails of payment_details on field AccountSession.Components
    • Change type from Optional[Payments] to Payments of payments on field AccountSession.Components
    • Change type from Optional[Payouts] to Payouts of payouts on field AccountSession.Components
    • Change type from Optional[Features] to Features of features on fields AccountSession.Components.PaymentDetails, AccountSession.Components.Payments, and AccountSession.Components.Payouts
    • Change type from Optional[InvoiceSettings] to InvoiceSettings of invoice_settings on field SubscriptionSchedule.DefaultSettings

See the changelog for more details.