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
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2e266cdaf4a7328b80cf9bc2448dfca91811415c
1af5aa444ea8141a2d2b8d86e76c73f788f65e09
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2274
v2277
8 changes: 8 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,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 @@ -483,6 +487,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
52 changes: 49 additions & 3 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@ async def reject_async(
),
)

def serialize_batch_delete(
self,
account: str,
params: Optional["AccountDeleteParams"] = None,
options: Optional["RequestOptions"] = None,
) -> str:
"""
Serializes an Account delete 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,
"path_params": {"account": account},
"params": params,
"stripe_version": stripe_version,
}
if context is not None:
batch_request["context"] = context
return json.dumps(batch_request)

def serialize_batch_update(
self,
account: str,
Expand All @@ -416,12 +440,34 @@ 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)

def serialize_batch_create(
self,
params: Optional["AccountCreateParams"] = None,
options: Optional["RequestOptions"] = None,
) -> str:
"""
Serializes an Account 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)
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 @@ -461,6 +461,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 @@ -2091,6 +2097,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 @@ -2210,7 +2222,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 @@ -2292,6 +2307,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 @@ -2333,6 +2349,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 @@ -2366,6 +2383,7 @@ class Zip(StripeObject):
"bacs_debit": BacsDebit,
"bancontact": Bancontact,
"billie": Billie,
"bizum": Bizum,
"blik": Blik,
"boleto": Boleto,
"card": Card,
Expand Down Expand Up @@ -2407,6 +2425,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 @@ -223,6 +223,9 @@ class Address(StripeObject):
"""
_inner_class_types = {"address": Address}

class Bizum(StripeObject):
pass

class Blik(StripeObject):
pass

Expand Down Expand Up @@ -1389,6 +1392,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 @@ -1576,6 +1582,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 @@ -1622,6 +1629,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 @@ -1640,6 +1648,7 @@ class Zip(StripeObject):
"bacs_debit",
"bancontact",
"billie",
"bizum",
"blik",
"boleto",
"card",
Expand Down Expand Up @@ -1682,6 +1691,7 @@ class Zip(StripeObject):
"revolut_pay",
"samsung_pay",
"satispay",
"scalapay",
"sepa_debit",
"shopeepay",
"sofort",
Expand Down Expand Up @@ -1713,6 +1723,7 @@ class Zip(StripeObject):
"bancontact": Bancontact,
"billie": Billie,
"billing_details": BillingDetails,
"bizum": Bizum,
"blik": Blik,
"boleto": Boleto,
"card": Card,
Expand Down Expand Up @@ -1754,6 +1765,7 @@ class Zip(StripeObject):
"revolut_pay": RevolutPay,
"samsung_pay": SamsungPay,
"satispay": Satispay,
"scalapay": Scalapay,
"sepa_debit": SepaDebit,
"shopeepay": Shopeepay,
"sofort": Sofort,
Expand Down
Loading
Loading