Skip to content
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Changelog

## 15.1.0 - 2026-04-23
This release changes the pinned API version to 2026-04-22.dahlia.

* [#1793](https://github.com/stripe/stripe-python/pull/1793) Update generated code
* Add support for `balance_report` and `payout_reconciliation_report` on `AccountSession.Component` and `AccountSessionCreateParamsComponent`
* Add support for `app_distribution` and `sunbit_payments` on `Account.Capability`, `AccountCreateParamsCapability`, and `AccountModifyParamsCapability`
* ⚠️ Add support for new values `fee_credit_funding`, `inbound_transfer_reversal`, and `inbound_transfer` on enum `BalanceTransaction.type`
* Add support for `sunbit` on `Charge.PaymentMethodDetail`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, and `SetupIntentModifyParamsPaymentMethodDatum`
* ⚠️ Add support for new values `phantom_cash` and `usdt` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency`
* Add support for `location` and `reader` on `Charge.PaymentMethodDetail.Klarna`, `PaymentAttemptRecord.PaymentMethodDetail.Klarna`, and `PaymentRecord.PaymentMethodDetail.Klarna`
* Add support for `mandate` on `Charge.PaymentMethodDetail.Pix`, `PaymentAttemptRecord.PaymentMethodDetail.Pix`, and `PaymentRecord.PaymentMethodDetail.Pix`
* Add support for `managed_payments` on `Checkout.Session`, `PaymentIntent`, `PaymentLinkCreateParams`, `PaymentLink`, `SetupIntent`, `Subscription`, and `checkout.SessionCreateParams`
* Add support for new value `sunbit` on enums `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentModifyParams.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, `SetupIntentModifyParams.excluded_payment_method_types`, and `checkout.SessionCreateParams.excluded_payment_method_types`
* Add support for `mandate_options` on `Checkout.Session.PaymentMethodOption.Pix`, `PaymentIntent.PaymentMethodOption.Pix`, `PaymentIntentConfirmParamsPaymentMethodOptionPix`, `PaymentIntentCreateParamsPaymentMethodOptionPix`, `PaymentIntentModifyParamsPaymentMethodOptionPix`, and `checkout.SessionCreateParamsPaymentMethodOptionPix`
* Change type of `PaymentIntentConfirmParamsPaymentMethodOptionPix.setup_future_usage`, `PaymentIntentCreateParamsPaymentMethodOptionPix.setup_future_usage`, `PaymentIntentModifyParamsPaymentMethodOptionPix.setup_future_usage`, and `checkout.SessionCreateParamsPaymentMethodOptionPix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
* Add support for new value `sunbit` on enum `checkout.SessionCreateParams.payment_method_types`
* ⚠️ Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, `Tax.Transaction.CustomerDetail.TaxId.type`, and `TaxId.type`
* ⚠️ Change type of `Checkout.Session.PaymentMethodOption.Pix.setup_future_usage` and `PaymentIntent.PaymentMethodOption.Pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
* Add support for new value `sunbit` on enums `ConfirmationTokenCreateParamsPaymentMethodDatum.type`, `PaymentIntentConfirmParamsPaymentMethodDatum.type`, `PaymentIntentCreateParamsPaymentMethodDatum.type`, `PaymentIntentModifyParamsPaymentMethodDatum.type`, `SetupIntentConfirmParamsPaymentMethodDatum.type`, `SetupIntentCreateParamsPaymentMethodDatum.type`, and `SetupIntentModifyParamsPaymentMethodDatum.type`
* ⚠️ Add support for new value `sunbit` on enums `ConfirmationToken.PaymentMethodPreview.type` and `PaymentMethod.type`
* Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type`
* Add support for new value `sunbit` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
* Add support for `pix` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Mandate.PaymentMethodDetail`, `SetupAttempt.PaymentMethodDetail`, `SetupIntent.PaymentMethodOption`, `SetupIntentConfirmParamsPaymentMethodOption`, `SetupIntentCreateParamsPaymentMethodOption`, `SetupIntentModifyParamsPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOption`
* Add support for `upi` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOption`
* Add support for new values `pix` and `upi` on enums `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types`
* ⚠️ Add support for new values `pix` and `upi` on enums `Invoice.PaymentSetting.payment_method_types` and `Subscription.PaymentSetting.payment_method_types`
* Add support for `card_presence` on `Issuing.Authorization`
* Add support for `allowed_card_presences` and `blocked_card_presences` on `Issuing.Card.SpendingControl`, `Issuing.Cardholder.SpendingControl`, `issuing.CardCreateParamsSpendingControl`, `issuing.CardModifyParamsSpendingControl`, `issuing.CardholderCreateParamsSpendingControl`, and `issuing.CardholderModifyParamsSpendingControl`
* ⚠️ Add support for new value `fulfillment_error` on enum `Issuing.Card.cancellation_reason`
* ⚠️ Add support for new value `fulfillment_error` on enum `Issuing.Card.replacement_reason`
* Add support for `amount` and `currency` on `Mandate.MultiUse`
* Add support for `amount_to_confirm` on `PaymentIntentConfirmParams`
* ⚠️ Add support for new value `sunbit` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`
* Add support for `klarna_display_qr_code` on `PaymentIntent.NextAction`
* Add support for new value `sunbit` on enums `PaymentLinkCreateParams.payment_method_types` and `PaymentLinkModifyParams.payment_method_types`
* ⚠️ Add support for new value `sunbit` on enum `PaymentLink.payment_method_types`
* ⚠️ Add support for new values `low`, `not_assessed`, and `unknown` on enum `Radar.PaymentEvaluation.Signal.FraudulentPayment.risk_level`
* Add support for new value `account` on enum `radar.ValueListCreateParams.item_type`
* ⚠️ Add support for new value `account` on enum `Radar.ValueList.item_type`
* Add support for `moto` on `SetupAttempt.PaymentMethodDetail.Card`
* Add support for `pix_display_qr_code` on `SetupIntent.NextAction`
* Add support for new value `2026-04-22.dahlia` on enum `WebhookEndpointCreateParams.api_version`
* Add support for error codes `action_blocked` and `approval_required` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, and `StripeError`

## 15.1.0a4 - 2026-04-15
* [#1794](https://github.com/stripe/stripe-python/pull/1794) Update generated code for private-preview
* Add support for `latest_version` on `V2.Billing.LicenseFee`, `V2.Billing.PricingPlan`, and `V2.Billing.RateCard`
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a527d1f955ea1eab1b7ccdb63001a69d1786fc37
505d252427d8aaae5b38486880ba3550b08958ec
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2240
v2253
2 changes: 2 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def add_beta_version(
ControlledByDashboardError as ControlledByDashboardError,
FeatureNotEnabledError as FeatureNotEnabledError,
FinancialAccountNotOpenError as FinancialAccountNotOpenError,
FxQuoteExpiredError as FxQuoteExpiredError,
IdempotencyError as IdempotencyError,
InsufficientFundsError as InsufficientFundsError,
InvalidPaymentMethodError as InvalidPaymentMethodError,
Expand Down Expand Up @@ -817,6 +818,7 @@ def add_beta_version(
"ControlledByDashboardError": ("stripe._error", False),
"FeatureNotEnabledError": ("stripe._error", False),
"FinancialAccountNotOpenError": ("stripe._error", False),
"FxQuoteExpiredError": ("stripe._error", False),
"IdempotencyError": ("stripe._error", False),
"InsufficientFundsError": ("stripe._error", False),
"InvalidPaymentMethodError": ("stripe._error", False),
Expand Down
9 changes: 8 additions & 1 deletion stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@ class Features(StripeObject):

class Bills(StripeObject):
class Features(StripeObject):
pass
bill_management: bool
"""
Whether to enable the bill management feature that grants access to bill creation and payment.
"""
send_money: bool
"""
Whether to enable the send money feature that grants access to bill creation and payment.
"""

enabled: bool
"""
Expand Down
2 changes: 2 additions & 0 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data):
return error.FeatureNotEnabledError(**error_args)
elif type == "financial_account_not_open":
return error.FinancialAccountNotOpenError(**error_args)
elif type == "fx_quote_expired":
return error.FxQuoteExpiredError(**error_args)
elif type == "insufficient_funds":
return error.InsufficientFundsError(**error_args)
elif type == "invalid_payment_method":
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-08.preview"
CURRENT = "2026-04-22.preview"
36 changes: 36 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,40 @@ class Fpx(StripeObject):
Unique transaction id generated by FPX for every request from the merchant
"""

class GiftCard(StripeObject):
class Balance(StripeObject):
amount: int
"""
The balance amount in the smallest currency unit.
"""
currency: str
"""
The currency of the balance.
"""

balance: Balance
brand: Literal["fiserv_valuelink", "givex", "svs"]
"""
The brand of the gift card.
"""
exp_month: Optional[int]
"""
The expiration month of the gift card.
"""
exp_year: Optional[int]
"""
The expiration year of the gift card.
"""
first6: str
"""
The first six digits of the gift card number.
"""
transaction_id: str
"""
The transaction ID from the gift card processor.
"""
_inner_class_types = {"balance": Balance}

class Giropay(StripeObject):
bank_code: Optional[str]
"""
Expand Down Expand Up @@ -2247,6 +2281,7 @@ class Zip(StripeObject):
customer_balance: Optional[CustomerBalance]
eps: Optional[Eps]
fpx: Optional[Fpx]
gift_card: Optional[GiftCard]
giropay: Optional[Giropay]
gopay: Optional[Gopay]
grabpay: Optional[Grabpay]
Expand Down Expand Up @@ -2319,6 +2354,7 @@ class Zip(StripeObject):
"customer_balance": CustomerBalance,
"eps": Eps,
"fpx": Fpx,
"gift_card": GiftCard,
"giropay": Giropay,
"gopay": Gopay,
"grabpay": Grabpay,
Expand Down
5 changes: 5 additions & 0 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
if TYPE_CHECKING:
from stripe._charge import Charge
from stripe._customer import Customer
from stripe._payment_method import PaymentMethod
from stripe._setup_attempt import SetupAttempt
from stripe.params._confirmation_token_create_params import (
ConfirmationTokenCreateParams,
Expand Down Expand Up @@ -1368,6 +1369,10 @@ class GeneratedFrom(StripeObject):
"""
The ID of the Charge that generated this PaymentMethod, if any.
"""
payment_method: Optional[ExpandableField["PaymentMethod"]]
"""
The ID of the PaymentMethod that generated this PaymentMethod, if any.
"""
setup_attempt: Optional[ExpandableField["SetupAttempt"]]
"""
The ID of the SetupAttempt that generated this PaymentMethod, if any.
Expand Down
4 changes: 4 additions & 0 deletions stripe/_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ class FinancialAccountNotOpenError(StripeError):
pass


class FxQuoteExpiredError(StripeError):
pass


class InsufficientFundsError(StripeError):
pass

Expand Down
1 change: 1 addition & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ class Filters(StripeObject):
"konbini",
"kr_card",
"link",
"momo",
"multibanco",
"naver_pay",
"nz_bank_account",
Expand Down
24 changes: 22 additions & 2 deletions stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@
"stripe.v2.billing._service_action",
"ServiceAction",
),
"v2.commerce.product_catalog_import": (
"stripe.v2.commerce._product_catalog_import",
"ProductCatalogImport",
),
"v2.core.account": ("stripe.v2.core._account", "Account"),
"v2.core.account_evaluation": (
"stripe.v2.core._account_evaluation",
Expand All @@ -559,6 +563,10 @@
"AccountPersonToken",
),
"v2.core.account_token": ("stripe.v2.core._account_token", "AccountToken"),
"v2.core.approval_request": (
"stripe.v2.core._approval_request",
"ApprovalRequest",
),
"v2.core.batch_job": ("stripe.v2.core._batch_job", "BatchJob"),
"v2.core.claimable_sandbox": (
"stripe.v2.core._claimable_sandbox",
Expand All @@ -581,12 +589,15 @@
"stripe.v2.core.vault._us_bank_account",
"UsBankAccount",
),
"v2.core.workflow": ("stripe.v2.core._workflow", "Workflow"),
"v2.core.workflow_run": ("stripe.v2.core._workflow_run", "WorkflowRun"),
"v2.data.reporting.query_run": (
"stripe.v2.data.reporting._query_run",
"QueryRun",
),
"v2.extend.workflow": ("stripe.v2.extend._workflow", "Workflow"),
"v2.extend.workflow_run": (
"stripe.v2.extend._workflow_run",
"WorkflowRun",
),
"financial_address_credit_simulation": (
"stripe.v2._financial_address_credit_simulation",
"FinancialAddressCreditSimulation",
Expand All @@ -595,6 +606,7 @@
"stripe.v2._financial_address_generated_microdeposits",
"FinancialAddressGeneratedMicrodeposits",
),
"v2.iam.activity_log": ("stripe.v2.iam._activity_log", "ActivityLog"),
"v2.iam.api_key": ("stripe.v2.iam._api_key", "ApiKey"),
"v2.money_management.adjustment": (
"stripe.v2.money_management._adjustment",
Expand Down Expand Up @@ -660,6 +672,14 @@
"stripe.v2.money_management._transaction_entry",
"TransactionEntry",
),
"v2.network.business_profile": (
"stripe.v2.network._business_profile",
"BusinessProfile",
),
"v2.orchestrated_commerce.agreement": (
"stripe.v2.orchestrated_commerce._agreement",
"Agreement",
),
"v2.payments.off_session_payment": (
"stripe.v2.payments._off_session_payment",
"OffSessionPayment",
Expand Down
36 changes: 36 additions & 0 deletions stripe/_payment_attempt_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,40 @@ class Fpx(StripeObject):
Unique transaction id generated by FPX for every request from the merchant
"""

class GiftCard(StripeObject):
class Balance(StripeObject):
amount: int
"""
The balance amount in the smallest currency unit.
"""
currency: str
"""
The currency of the balance.
"""

balance: Balance
brand: Literal["fiserv_valuelink", "givex", "svs"]
"""
The brand of the gift card.
"""
exp_month: Optional[int]
"""
The expiration month of the gift card.
"""
exp_year: Optional[int]
"""
The expiration year of the gift card.
"""
first6: str
"""
The first six digits of the gift card number.
"""
transaction_id: str
"""
The transaction ID from the gift card processor.
"""
_inner_class_types = {"balance": Balance}

class Giropay(StripeObject):
bank_code: Optional[str]
"""
Expand Down Expand Up @@ -2008,6 +2042,7 @@ class Zip(StripeObject):
customer_balance: Optional[CustomerBalance]
eps: Optional[Eps]
fpx: Optional[Fpx]
gift_card: Optional[GiftCard]
giropay: Optional[Giropay]
gopay: Optional[Gopay]
grabpay: Optional[Grabpay]
Expand Down Expand Up @@ -2086,6 +2121,7 @@ class Zip(StripeObject):
"customer_balance": CustomerBalance,
"eps": Eps,
"fpx": Fpx,
"gift_card": GiftCard,
"giropay": Giropay,
"gopay": Gopay,
"grabpay": Grabpay,
Expand Down
Loading
Loading