Skip to content
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
826bf48af8bcd391512daeaf283b8486347b14c8
d59a1f4bdea3032b8e282d40badc032cb021fc60
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2253
v2277
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ client = StripeClient("sk_test_...", http_client=stripe.UrllibClient())
```

Without a configured client, by default the library will attempt to load
libraries in the order above (i.e. `urlfetch` is preferred with `urllib2` used
libraries in the order above (i.e. `urlfetch` is preferred with `urllib` used
as a last resort). We usually recommend that people use `requests`.

### Configuring a Proxy
Expand Down
2 changes: 2 additions & 0 deletions examples/event_notification_handler_endpoint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# File copied from our code generator; changes here will be overwritten.
"""
event_notification_handler_endpoint.py - receive and process event notifications (AKA thin events) like "v1.billing.meter.error_report_triggered" using EventNotificationHandler.

Expand Down
2 changes: 2 additions & 0 deletions examples/event_notification_webhook_handler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# File copied from our code generator; changes here will be overwritten.
"""
event_notification_webhook_handler.py - receive and process event notifications (AKA thin events) like the v1.billing.meter.error_report_triggered and v1.billing.meter.no_meter_found events.

Expand Down
8 changes: 8 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ class Capabilities(StripeObject):
"""
The status of the Billie capability of the account, or whether the account can directly process Billie payments.
"""
bizum_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the Bizum capability of the account, or whether the account can directly process Bizum payments.
"""
blik_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the blik payments capability of the account, or whether the account can directly process blik charges.
Expand Down Expand Up @@ -478,6 +482,10 @@ class Capabilities(StripeObject):
"""
The status of the Satispay capability of the account, or whether the account can directly process Satispay payments.
"""
scalapay_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the Scalapay capability of the account, or whether the account can directly process Scalapay payments.
"""
sepa_bank_transfer_payments: Optional[
Literal["active", "inactive", "pending"]
]
Expand Down
6 changes: 3 additions & 3 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@ def serialize_batch_update(
options.get("stripe_version") if options else None
) or _ApiVersion.CURRENT
context = options.get("stripe_context") if options else None
item = {
batch_request = {
"id": item_id,
"path_params": {"account": account},
"params": params,
"stripe_version": stripe_version,
}
if context is not None:
item["context"] = context
return json.dumps(item)
batch_request["context"] = context
return json.dumps(batch_request)
10 changes: 10 additions & 0 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
_default_proxy: Optional[str] = None


def _maybe_emit_stripe_notice(rheaders: Mapping[str, str]) -> None:
notice = rheaders.get("Stripe-Notice")
if notice:
import warnings

warnings.warn(notice)


def is_v2_delete_resp(method: str, api_mode: ApiMode) -> bool:
return method == "delete" and api_mode == "V2"

Expand Down Expand Up @@ -209,6 +217,7 @@ def request(
options=options,
usage=usage,
)
_maybe_emit_stripe_notice(rheaders)
resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode)

obj = _convert_to_stripe_object(
Expand Down Expand Up @@ -243,6 +252,7 @@ async def request_async(
options=options,
usage=usage,
)
_maybe_emit_stripe_notice(rheaders)
resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode)

obj = _convert_to_stripe_object(
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-22.preview"
CURRENT = "2026-05-27.preview"
45 changes: 44 additions & 1 deletion stripe/_balance_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ class BalanceSettings(

class Payments(StripeObject):
class Payouts(StripeObject):
class AutomaticTransferRulesByCurrency(StripeObject):
payout_method: str
"""
The ID of the FinancialAccount that funds will be transferred to during automatic transfers.
"""
transfer_up_to_amount: Optional[int]
"""
The maximum amount in minor units to transfer to the FinancialAccount. Only applicable when `type` is `transfer_up_to_amount`.
"""
type: Literal["transfer_all", "transfer_up_to_amount"]
"""
The type of automatic transfer rule.
"""

class Schedule(StripeObject):
interval: Optional[
Literal["daily", "manual", "monthly", "weekly"]
Expand All @@ -53,6 +67,12 @@ class Schedule(StripeObject):
The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
"""

automatic_transfer_rules_by_currency: Optional[
UntypedStripeObject[List[AutomaticTransferRulesByCurrency]]
]
"""
Configures per-currency rules for automatically transferring funds from the payments balance to a FinancialAccount.
"""
minimum_balance_by_currency: Optional[UntypedStripeObject[int]]
"""
The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts).
Expand All @@ -69,9 +89,27 @@ class Schedule(StripeObject):
"""
Whether the funds in this account can be paid out.
"""
_inner_class_types = {"schedule": Schedule}
_inner_class_types = {
"automatic_transfer_rules_by_currency": AutomaticTransferRulesByCurrency,
"schedule": Schedule,
}
_inner_class_dicts = ["automatic_transfer_rules_by_currency"]

class SettlementTiming(StripeObject):
class StartOfDay(StripeObject):
hour: int
"""
Hour at which the customized start of day begins according to the given timezone. Must be a [supported customized start of day hour](https://docs.stripe.com/connect/customized-start-of-day#available-timezones-and-cutoffs).
"""
minutes: int
"""
Minutes at which the customized start of day begins according to the given timezone. Must be either 0 or 30.
"""
timezone: str
"""
Timezone for the customized start of day. Must be a [supported customized start of day timezone](https://docs.stripe.com/connect/customized-start-of-day#available-timezones-and-cutoffs).
"""

delay_days: int
"""
The number of days charge funds are held before becoming available.
Expand All @@ -80,6 +118,11 @@ class SettlementTiming(StripeObject):
"""
The number of days charge funds are held before becoming available. If present, overrides the default, or minimum available, for the account.
"""
start_of_day: Optional[StartOfDay]
"""
Customized start of day configuration for automatic payouts to group and send payments in local timezones with a customized day starting time. For details, see our [Customized start of day](https://docs.stripe.com/connect/customized-start-of-day) documentation.
"""
_inner_class_types = {"start_of_day": StartOfDay}

debit_negative_balances: Optional[bool]
"""
Expand Down
21 changes: 20 additions & 1 deletion stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,12 @@ class Billie(StripeObject):
The Billie transaction ID associated with this payment.
"""

class Bizum(StripeObject):
transaction_id: Optional[str]
"""
The Bizum transaction ID associated with this payment.
"""

class Blik(StripeObject):
buyer_id: Optional[str]
"""
Expand Down Expand Up @@ -2004,6 +2010,12 @@ class Satispay(StripeObject):
The Satispay transaction ID associated with this payment.
"""

class Scalapay(StripeObject):
transaction_id: Optional[str]
"""
The Scalapay transaction ID associated with this payment.
"""

class SepaCreditTransfer(StripeObject):
bank_name: Optional[str]
"""
Expand Down Expand Up @@ -2123,7 +2135,10 @@ class Swish(StripeObject):
"""

class Twint(StripeObject):
pass
mandate: Optional[str]
"""
ID of the multi use Mandate generated by the PaymentIntent
"""

class Upi(StripeObject):
vpa: Optional[str]
Expand Down Expand Up @@ -2205,6 +2220,7 @@ class Zip(StripeObject):
bacs_debit: Optional[BacsDebit]
bancontact: Optional[Bancontact]
billie: Optional[Billie]
bizum: Optional[Bizum]
blik: Optional[Blik]
boleto: Optional[Boleto]
card: Optional[Card]
Expand Down Expand Up @@ -2245,6 +2261,7 @@ class Zip(StripeObject):
revolut_pay: Optional[RevolutPay]
samsung_pay: Optional[SamsungPay]
satispay: Optional[Satispay]
scalapay: Optional[Scalapay]
sepa_credit_transfer: Optional[SepaCreditTransfer]
sepa_debit: Optional[SepaDebit]
shopeepay: Optional[Shopeepay]
Expand Down Expand Up @@ -2278,6 +2295,7 @@ class Zip(StripeObject):
"bacs_debit": BacsDebit,
"bancontact": Bancontact,
"billie": Billie,
"bizum": Bizum,
"blik": Blik,
"boleto": Boleto,
"card": Card,
Expand Down Expand Up @@ -2318,6 +2336,7 @@ class Zip(StripeObject):
"revolut_pay": RevolutPay,
"samsung_pay": SamsungPay,
"satispay": Satispay,
"scalapay": Scalapay,
"sepa_credit_transfer": SepaCreditTransfer,
"sepa_debit": SepaDebit,
"shopeepay": Shopeepay,
Expand Down
12 changes: 12 additions & 0 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ class Address(StripeObject):
"""
_inner_class_types = {"address": Address}

class Bizum(StripeObject):
pass

class Blik(StripeObject):
pass

Expand Down Expand Up @@ -1335,6 +1338,9 @@ class SamsungPay(StripeObject):
class Satispay(StripeObject):
pass

class Scalapay(StripeObject):
pass

class SepaDebit(StripeObject):
class GeneratedFrom(StripeObject):
charge: Optional[ExpandableField["Charge"]]
Expand Down Expand Up @@ -1518,6 +1524,7 @@ class Zip(StripeObject):
bancontact: Optional[Bancontact]
billie: Optional[Billie]
billing_details: BillingDetails
bizum: Optional[Bizum]
blik: Optional[Blik]
boleto: Optional[Boleto]
card: Optional[Card]
Expand Down Expand Up @@ -1563,6 +1570,7 @@ class Zip(StripeObject):
revolut_pay: Optional[RevolutPay]
samsung_pay: Optional[SamsungPay]
satispay: Optional[Satispay]
scalapay: Optional[Scalapay]
sepa_debit: Optional[SepaDebit]
shopeepay: Optional[Shopeepay]
sofort: Optional[Sofort]
Expand All @@ -1581,6 +1589,7 @@ class Zip(StripeObject):
"bacs_debit",
"bancontact",
"billie",
"bizum",
"blik",
"boleto",
"card",
Expand Down Expand Up @@ -1622,6 +1631,7 @@ class Zip(StripeObject):
"revolut_pay",
"samsung_pay",
"satispay",
"scalapay",
"sepa_debit",
"shopeepay",
"sofort",
Expand Down Expand Up @@ -1653,6 +1663,7 @@ class Zip(StripeObject):
"bancontact": Bancontact,
"billie": Billie,
"billing_details": BillingDetails,
"bizum": Bizum,
"blik": Blik,
"boleto": Boleto,
"card": Card,
Expand Down Expand Up @@ -1693,6 +1704,7 @@ class Zip(StripeObject):
"revolut_pay": RevolutPay,
"samsung_pay": SamsungPay,
"satispay": Satispay,
"scalapay": Scalapay,
"sepa_debit": SepaDebit,
"shopeepay": Shopeepay,
"sofort": Sofort,
Expand Down
25 changes: 25 additions & 0 deletions stripe/_coupon_service.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
import json
from stripe._api_version import _ApiVersion
from stripe._stripe_service import StripeService
from stripe._util import sanitize_id
from typing import Optional, cast
from uuid import uuid4
from typing_extensions import TYPE_CHECKING

if TYPE_CHECKING:
Expand Down Expand Up @@ -216,3 +219,25 @@ async def create_async(
options=options,
),
)

def serialize_batch_create(
self,
params: Optional["CouponCreateParams"] = None,
options: Optional["RequestOptions"] = None,
) -> str:
"""
Serializes a Coupon create request into a batch job JSONL line.
"""
item_id = str(uuid4())
stripe_version = (
options.get("stripe_version") if options else None
) or _ApiVersion.CURRENT
context = options.get("stripe_context") if options else None
batch_request = {
"id": item_id,
"params": params,
"stripe_version": stripe_version,
}
if context is not None:
batch_request["context"] = context
return json.dumps(batch_request)
25 changes: 0 additions & 25 deletions stripe/_credit_note_service.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
import json
from stripe._api_version import _ApiVersion
from stripe._stripe_service import StripeService
from stripe._util import sanitize_id
from typing import Optional, cast
from uuid import uuid4
from importlib import import_module
from typing_extensions import TYPE_CHECKING

Expand Down Expand Up @@ -322,25 +319,3 @@ async def void_credit_note_async(
options=options,
),
)

def serialize_batch_create(
self,
params: Optional["CreditNoteCreateParams"] = None,
options: Optional["RequestOptions"] = None,
) -> str:
"""
Serializes a CreditNote create request into a batch job JSONL line.
"""
item_id = str(uuid4())
stripe_version = (
options.get("stripe_version") if options else None
) or _ApiVersion.CURRENT
context = options.get("stripe_context") if options else None
item = {
"id": item_id,
"params": params,
"stripe_version": stripe_version,
}
if context is not None:
item["context"] = context
return json.dumps(item)
Loading
Loading