Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ This release changes the pinned API version to 2026-03-25.preview and contains a
* Add support for event notifications `V1AccountSignalsIncludingDelinquencyCreatedEvent`, `V2CoreAccountSignalsFraudulentWebsiteReadyEvent`, and `V2SignalsAccountSignalFraudulentMerchantReadyEvent`
* [#1766](https://github.com/stripe/stripe-python/pull/1766) Merge to private-preview

## 15.0.1 - 2026-04-01
* [#1786](https://github.com/stripe/stripe-python/pull/1786) Fix encoding two-dimensional array request params
* [#1785](https://github.com/stripe/stripe-python/pull/1785) Improve types for `metadata` and other dict-like types
* [#1780](https://github.com/stripe/stripe-python/pull/1780) Fix `str` / `repr` for `StripeObjects` with decimals & add support for plain dicts

## 15.0.0 - 2026-03-25

This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v15) to simplify your upgrade process.
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b5cc8d9d026e6840410576d03adac922b62bc30d
2c60f902831f969f228cecd1f52a81ca240c433c
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2217
v2229
2 changes: 2 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def add_beta_version(
AlreadyExistsError as AlreadyExistsError,
AuthenticationError as AuthenticationError,
BlockedByStripeError as BlockedByStripeError,
CannotProceedError as CannotProceedError,
CardError as CardError,
ControlledByAlternateResourceError as ControlledByAlternateResourceError,
ControlledByDashboardError as ControlledByDashboardError,
Expand Down Expand Up @@ -810,6 +811,7 @@ def add_beta_version(
"AlreadyExistsError": ("stripe._error", False),
"AuthenticationError": ("stripe._error", False),
"BlockedByStripeError": ("stripe._error", False),
"CannotProceedError": ("stripe._error", False),
"CardError": ("stripe._error", False),
"ControlledByAlternateResourceError": ("stripe._error", False),
"ControlledByDashboardError": ("stripe._error", False),
Expand Down
5 changes: 5 additions & 0 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data):
return error.AlreadyExistsError(**error_args)
elif type == "blocked_by_stripe":
return error.BlockedByStripeError(**error_args)
elif type == "cannot_proceed":
return error.CannotProceedError(
**error_args,
reason=error_data.get("reason"),
)
elif type == "controlled_by_alternate_resource":
return error.ControlledByAlternateResourceError(**error_args)
elif type == "controlled_by_dashboard":
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2026-04-01.preview"
CURRENT = "2026-04-08.preview"
4 changes: 4 additions & 0 deletions stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class FeeSource(StripeObject):
"""
Charge ID that created this application fee.
"""
payment_record: Optional[str]
"""
PaymentRecord ID that created this application fee.
"""
payout: Optional[str]
"""
Payout ID that created this application fee.
Expand Down
22 changes: 22 additions & 0 deletions stripe/_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,28 @@ class BlockedByStripeError(StripeError):
pass


class CannotProceedError(StripeError):
def __init__(
self,
message=None,
http_body=None,
http_status=None,
json_body=None,
headers=None,
code=None,
reason=None,
):
super().__init__(
message,
http_body,
http_status,
json_body,
headers,
code,
)
self.reason = reason


class ControlledByAlternateResourceError(StripeError):
pass

Expand Down
9 changes: 9 additions & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ class Bancontact(StripeObject):
Preferred language of the Bancontact authorization page that the customer is redirected to.
"""

class Bizum(StripeObject):
pass

class Card(StripeObject):
class Installments(StripeObject):
enabled: Optional[bool]
Expand Down Expand Up @@ -1034,6 +1037,10 @@ class Filters(StripeObject):
"""
If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
"""
bizum: Optional[Bizum]
"""
If paying by `bizum`, this sub-hash contains details about the Bizum payment method options to pass to the invoice's PaymentIntent.
"""
card: Optional[Card]
"""
If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
Expand Down Expand Up @@ -1077,6 +1084,7 @@ class Filters(StripeObject):
_inner_class_types = {
"acss_debit": AcssDebit,
"bancontact": Bancontact,
"bizum": Bizum,
"card": Card,
"check_scan": CheckScan,
"customer_balance": CustomerBalance,
Expand Down Expand Up @@ -1108,6 +1116,7 @@ class Filters(StripeObject):
"au_becs_debit",
"bacs_debit",
"bancontact",
"bizum",
"boleto",
"card",
"cashapp",
Expand Down
77 changes: 77 additions & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,78 @@ class Recipient(StripeObject):
"delivery": Delivery,
}

class FleetDatum(StripeObject):
class PrimaryFuelFields(StripeObject):
brand: Optional[str]
"""
The fuel brand.
"""

class Station(StripeObject):
class ServiceLocation(StripeObject):
city: Optional[str]
"""
City, district, suburb, town, or village.
"""
country: Optional[str]
"""
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
"""
line1: Optional[str]
"""
Address line 1, such as the street, PO Box, or company name.
"""
line2: Optional[str]
"""
Address line 2, such as the apartment, suite, unit, or building.
"""
postal_code: Optional[str]
"""
ZIP or postal code.
"""
state: Optional[str]
"""
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""

additional_contact_info: Optional[str]
"""
Additional contact information for the station.
"""
customer_service_phone_number: Optional[str]
"""
The customer service phone number of the station.
"""
partner_id_code: Optional[str]
"""
The partner ID code of the station.
"""
phone_number: Optional[str]
"""
The phone number of the station.
"""
service_location: Optional[ServiceLocation]
url: Optional[str]
"""
The URL of the station.
"""
_inner_class_types = {"service_location": ServiceLocation}

class Vat(StripeObject):
iob_indicator: Optional[str]
"""
Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing.
"""

primary_fuel_fields: Optional[PrimaryFuelFields]
station: Optional[Station]
vat: Optional[Vat]
_inner_class_types = {
"primary_fuel_fields": PrimaryFuelFields,
"station": Station,
"vat": Vat,
}

class FlightDatum(StripeObject):
class Affiliate(StripeObject):
code: Optional[str]
Expand Down Expand Up @@ -2878,6 +2950,10 @@ class BillingInterval(StripeObject):
This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.
"""
event_details: Optional[EventDetails]
fleet_data: Optional[List[FleetDatum]]
"""
Fleet data for this PaymentIntent.
"""
flight_data: Optional[List[FlightDatum]]
lodging_data: Optional[List[LodgingDatum]]
order_reference: Optional[str]
Expand All @@ -2892,6 +2968,7 @@ class BillingInterval(StripeObject):
"car_rental": CarRental,
"car_rental_data": CarRentalDatum,
"event_details": EventDetails,
"fleet_data": FleetDatum,
"flight_data": FlightDatum,
"lodging_data": LodgingDatum,
"subscription": Subscription,
Expand Down
16 changes: 16 additions & 0 deletions stripe/_payment_intent_amount_details_line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ class PaymentIntentAmountDetailsLineItem(StripeObject):

class PaymentMethodOptions(StripeObject):
class Card(StripeObject):
class FleetData(StripeObject):
product_type: Optional[str]
"""
The type of product being purchased at this line item.
"""
service_type: Optional[str]
"""
The type of service received at the acceptor location.
"""

commodity_code: Optional[str]
fleet_data: Optional[FleetData]
_inner_class_types = {"fleet_data": FleetData}

class CardPresent(StripeObject):
commodity_code: Optional[str]
Expand Down Expand Up @@ -90,6 +102,10 @@ class Tax(StripeObject):
"""
The quantity of items. Required for L3 rates. An integer greater than 0.
"""
quantity_precision: Optional[int]
"""
The number of decimal places implied in the quantity. For example, if quantity is 10000 and quantity_precision is 2, the actual quantity is 100.00. Defaults to 0 if not provided.
"""
tax: Optional[Tax]
"""
Contains information about the tax on the item.
Expand Down
4 changes: 4 additions & 0 deletions stripe/_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,10 @@ class Zip(StripeObject):
samsung_pay: Optional[SamsungPay]
satispay: Optional[Satispay]
sepa_debit: Optional[SepaDebit]
shared_payment_granted_token: Optional[str]
"""
ID of the shared payment granted token used in the creation of this PaymentMethod.
"""
shopeepay: Optional[Shopeepay]
sofort: Optional[Sofort]
stripe_balance: Optional[StripeBalance]
Expand Down
9 changes: 9 additions & 0 deletions stripe/_quote_preview_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,9 @@ class Bancontact(StripeObject):
Preferred language of the Bancontact authorization page that the customer is redirected to.
"""

class Bizum(StripeObject):
pass

class Card(StripeObject):
class Installments(StripeObject):
enabled: Optional[bool]
Expand Down Expand Up @@ -990,6 +993,10 @@ class Filters(StripeObject):
"""
If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
"""
bizum: Optional[Bizum]
"""
If paying by `bizum`, this sub-hash contains details about the Bizum payment method options to pass to the invoice's PaymentIntent.
"""
card: Optional[Card]
"""
If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
Expand Down Expand Up @@ -1033,6 +1040,7 @@ class Filters(StripeObject):
_inner_class_types = {
"acss_debit": AcssDebit,
"bancontact": Bancontact,
"bizum": Bizum,
"card": Card,
"check_scan": CheckScan,
"customer_balance": CustomerBalance,
Expand Down Expand Up @@ -1064,6 +1072,7 @@ class Filters(StripeObject):
"au_becs_debit",
"bacs_debit",
"bancontact",
"bizum",
"boleto",
"card",
"cashapp",
Expand Down
20 changes: 20 additions & 0 deletions stripe/_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,20 @@ class Bancontact(StripeObject):
Preferred language of the Bancontact authorization page that the customer is redirected to.
"""

class Bizum(StripeObject):
class MandateOptions(StripeObject):
amount: Optional[int]
"""
Amount to be charged for future payments. Required when `amount_type=fixed`.
"""
amount_type: Optional[Literal["fixed"]]
"""
Indicates the mandate amount type.
"""

mandate_options: Optional[MandateOptions]
_inner_class_types = {"mandate_options": MandateOptions}

class Card(StripeObject):
class MandateOptions(StripeObject):
amount: Optional[int]
Expand Down Expand Up @@ -573,6 +587,10 @@ class Filters(StripeObject):
"""
This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
"""
bizum: Optional[Bizum]
"""
This sub-hash contains details about the Bizum payment method options to pass to invoices created by the subscription.
"""
card: Optional[Card]
"""
This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
Expand Down Expand Up @@ -616,6 +634,7 @@ class Filters(StripeObject):
_inner_class_types = {
"acss_debit": AcssDebit,
"bancontact": Bancontact,
"bizum": Bizum,
"card": Card,
"check_scan": CheckScan,
"customer_balance": CustomerBalance,
Expand Down Expand Up @@ -643,6 +662,7 @@ class Filters(StripeObject):
"au_becs_debit",
"bacs_debit",
"bancontact",
"bizum",
"boleto",
"card",
"cashapp",
Expand Down
2 changes: 1 addition & 1 deletion stripe/delegated_checkout/_requested_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ class ApplicableFee(StripeObject):
"""
The SPT used for payment.
"""
status: Literal["completed", "expired", "open"]
status: Literal["completed", "expired", "open", "requires_action"]
"""
The status of the requested session.
"""
Expand Down
Loading
Loading