Skip to content

Commit b930fc9

Browse files
Merge pull request #1719 from stripe/latest-codegen-beta
Update generated code for beta
2 parents be80db2 + 21b2cc4 commit b930fc9

118 files changed

Lines changed: 3179 additions & 1009 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 14.2.0 - 2026-01-16
4+
* [#1720](https://github.com/stripe/stripe-python/pull/1720) Update generated code
5+
* Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account`
6+
* Add support for event notification `V2CoreAccountLinkReturnedEvent`
7+
* Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `v2.core.AccountPerson`
8+
* [#1687](https://github.com/stripe/stripe-python/pull/1687) Fix DeprecationWarning when encoding StripeObject metadata (fixes #1651)
9+
* [#1703](https://github.com/stripe/stripe-python/pull/1703) Update ci to run on Python 3.14 as well
10+
311
## 14.2.0b1 - 2025-12-16
412
This release changes the pinned API version to `2025-12-15.preview`.
513

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
499f00588b1b41670a44a1e00598db81222ce169
1+
529796460735eb8ef64a29787291f1b4d4b29f1c

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2149
1+
v2160

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ print(customer.last_response.code)
192192
print(customer.last_response.headers)
193193
```
194194
195+
### How to use undocumented parameters and properties
196+
197+
In some cases, you might encounter parameters on an API request or fields on an API response that aren’t available in the SDKs.
198+
This might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK.
199+
See [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=python#undocumented-params-and-fields) to send those parameters or access those fields.
200+
195201
### Writing a Plugin
196202
197203
If you're writing a plugin that uses the library, we'd appreciate it if you

stripe/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ def add_beta_version(
423423
from stripe._oauth import OAuth as OAuth
424424
from stripe._oauth_service import OAuthService as OAuthService
425425
from stripe._order import Order as Order
426-
from stripe._order_line_item_service import (
427-
OrderLineItemService as OrderLineItemService,
428-
)
429426
from stripe._order_service import OrderService as OrderService
430427
from stripe._payment_attempt_record import (
431428
PaymentAttemptRecord as PaymentAttemptRecord,
@@ -856,7 +853,6 @@ def add_beta_version(
856853
"OAuth": ("stripe._oauth", False),
857854
"OAuthService": ("stripe._oauth_service", False),
858855
"Order": ("stripe._order", False),
859-
"OrderLineItemService": ("stripe._order_line_item_service", False),
860856
"OrderService": ("stripe._order_service", False),
861857
"PaymentAttemptRecord": ("stripe._payment_attempt_record", False),
862858
"PaymentAttemptRecordService": (

stripe/_account.py

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,16 +1345,6 @@ class Branding(StripeObject):
13451345
A CSS hex color value representing the secondary branding color for this account
13461346
"""
13471347

1348-
class Capital(StripeObject):
1349-
payout_destination: Optional[Dict[str, str]]
1350-
"""
1351-
Per-currency mapping of user-selected destination accounts used to pay out loans.
1352-
"""
1353-
payout_destination_selector: Optional[Dict[str, List[str]]]
1354-
"""
1355-
Per-currency mapping of all destination accounts eligible to receive loan payouts.
1356-
"""
1357-
13581348
class CardIssuing(StripeObject):
13591349
class TosAcceptance(StripeObject):
13601350
date: Optional[int]
@@ -1492,10 +1482,51 @@ class Schedule(StripeObject):
14921482
_inner_class_types = {"schedule": Schedule}
14931483

14941484
class PaypayPayments(StripeObject):
1485+
class Site(StripeObject):
1486+
class Accessible(StripeObject):
1487+
pass
1488+
1489+
class InDevelopment(StripeObject):
1490+
password_provided: Optional[bool]
1491+
"""
1492+
Field to indicate that the website password has been provided.
1493+
"""
1494+
username: Optional[str]
1495+
"""
1496+
The username needed to access your business's website.
1497+
"""
1498+
1499+
class Restricted(StripeObject):
1500+
payment_flow_file: Optional[str]
1501+
"""
1502+
File explaining the payment flow for your business.
1503+
"""
1504+
1505+
accessible: Optional[Accessible]
1506+
in_development: Optional[InDevelopment]
1507+
restricted: Optional[Restricted]
1508+
type: Optional[
1509+
Literal["accessible", "in_development", "restricted"]
1510+
]
1511+
"""
1512+
The status of your business's website.
1513+
"""
1514+
_inner_class_types = {
1515+
"accessible": Accessible,
1516+
"in_development": InDevelopment,
1517+
"restricted": Restricted,
1518+
}
1519+
1520+
additional_files: Optional[List[str]]
1521+
"""
1522+
Additional files that are required to support the onboarding process of your business.
1523+
"""
14951524
goods_type: Optional[Literal["digital_content", "other"]]
14961525
"""
14971526
Whether your business sells digital content or not.
14981527
"""
1528+
site: Optional[Site]
1529+
_inner_class_types = {"site": Site}
14991530

15001531
class SepaDebitPayments(StripeObject):
15011532
creditor_id: Optional[str]
@@ -1530,7 +1561,6 @@ class TosAcceptance(StripeObject):
15301561
bacs_debit_payments: Optional[BacsDebitPayments]
15311562
bank_bca_onboarding: Optional[BankBcaOnboarding]
15321563
branding: Branding
1533-
capital: Optional[Capital]
15341564
card_issuing: Optional[CardIssuing]
15351565
card_payments: CardPayments
15361566
dashboard: Dashboard
@@ -1545,7 +1575,6 @@ class TosAcceptance(StripeObject):
15451575
"bacs_debit_payments": BacsDebitPayments,
15461576
"bank_bca_onboarding": BankBcaOnboarding,
15471577
"branding": Branding,
1548-
"capital": Capital,
15491578
"card_issuing": CardIssuing,
15501579
"card_payments": CardPayments,
15511580
"dashboard": Dashboard,

stripe/_account_session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Features(StripeObject):
7777
"""
7878
instant_payouts: bool
7979
"""
80-
Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
80+
Whether to allow creation of instant payouts. The default value is `enabled` when Stripe is responsible for negative account balances, and `use_dashboard_rules` otherwise.
8181
"""
8282
standard_payouts: bool
8383
"""
@@ -213,7 +213,7 @@ class Features(StripeObject):
213213
"""
214214
instant_payouts: bool
215215
"""
216-
Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
216+
Whether to allow creation of instant payouts. The default value is `enabled` when Stripe is responsible for negative account balances, and `use_dashboard_rules` otherwise.
217217
"""
218218

219219
enabled: bool
@@ -398,7 +398,7 @@ class Features(StripeObject):
398398
"""
399399
instant_payouts: bool
400400
"""
401-
Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
401+
Whether to allow creation of instant payouts. The default value is `enabled` when Stripe is responsible for negative account balances, and `use_dashboard_rules` otherwise.
402402
"""
403403
standard_payouts: bool
404404
"""

stripe/_api_requestor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data):
413413
return error.NotCancelableError(**error_args)
414414
elif type == "quota_exceeded":
415415
return error.QuotaExceededError(**error_args)
416+
elif type == "rate_limit":
417+
return error.RateLimitError(**error_args)
416418
elif type == "recipient_not_notifiable":
417419
return error.RecipientNotNotifiableError(**error_args)
418420
elif type == "temporary_session_expired":

stripe/_api_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
# File generated from our OpenAPI spec
33
class _ApiVersion:
4-
CURRENT = "2025-12-15.preview"
4+
CURRENT = "2026-01-28.preview"

stripe/_balance_transaction.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class FeeDetail(StripeObject):
7777
The date that the transaction's net funds become available in the Stripe balance.
7878
"""
7979
balance_type: Literal[
80-
"issuing", "payments", "refund_and_dispute_prefunding"
80+
"issuing", "payments", "refund_and_dispute_prefunding", "risk_reserved"
8181
]
8282
"""
8383
The balance that this transaction impacts.
@@ -183,6 +183,8 @@ class FeeDetail(StripeObject):
183183
"payout_minimum_balance_release",
184184
"refund",
185185
"refund_failure",
186+
"reserve_hold",
187+
"reserve_release",
186188
"reserve_transaction",
187189
"reserved_funds",
188190
"stripe_balance_payment_debit",
@@ -198,7 +200,7 @@ class FeeDetail(StripeObject):
198200
"transfer_refund",
199201
]
200202
"""
201-
Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
203+
Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
202204
"""
203205

204206
@classmethod

0 commit comments

Comments
 (0)