Skip to content
Open
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b
577fcb57736b925392ea563c0284df9002c75ac9
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2031
v2099
21 changes: 21 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,20 @@ class RegistrationDate(StripeObject):
The four-digit year of registration.
"""

class RepresentativeDeclaration(StripeObject):
date: Optional[int]
"""
The Unix timestamp marking when the representative declaration attestation was made.
"""
ip: Optional[str]
"""
The IP address from which the representative declaration attestation was made.
"""
user_agent: Optional[str]
"""
The user-agent string from the browser where the representative declaration attestation was made.
"""

class Verification(StripeObject):
class Document(StripeObject):
back: Optional[ExpandableField["File"]]
Expand Down Expand Up @@ -767,6 +781,10 @@ class Document(StripeObject):
The company's phone number (used for verification).
"""
registration_date: Optional[RegistrationDate]
representative_declaration: Optional[RepresentativeDeclaration]
"""
This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
"""
structure: Optional[
Literal[
"free_zone_establishment",
Expand Down Expand Up @@ -820,6 +838,7 @@ class Document(StripeObject):
"directorship_declaration": DirectorshipDeclaration,
"ownership_declaration": OwnershipDeclaration,
"registration_date": RegistrationDate,
"representative_declaration": RepresentativeDeclaration,
"verification": Verification,
}

Expand Down Expand Up @@ -950,6 +969,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down Expand Up @@ -1131,6 +1151,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down Expand Up @@ -214,6 +215,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down Expand Up @@ -245,6 +246,7 @@ class Error(StripeObject):
"invalid_url_website_other",
"invalid_value_other",
"unsupported_business_type",
"verification_data_not_found",
"verification_directors_mismatch",
"verification_document_address_mismatch",
"verification_document_address_missing",
Expand Down
7 changes: 5 additions & 2 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ class Crypto(StripeObject):
"""
The wallet address of the customer.
"""
network: Optional[Literal["base", "ethereum", "polygon"]]
network: Optional[Literal["base", "ethereum", "polygon", "solana"]]
"""
The blockchain network that the transaction was sent on.
"""
Expand Down Expand Up @@ -1882,7 +1882,10 @@ class Qris(StripeObject):
pass

class Rechnung(StripeObject):
pass
payment_portal_url: Optional[str]
"""
Payment portal URL.
"""

class RevolutPay(StripeObject):
class Funding(StripeObject):
Expand Down
1 change: 1 addition & 0 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,7 @@ class Zip(StripeObject):
"card_present",
"cashapp",
"crypto",
"custom",
"customer_balance",
"eps",
"fpx",
Expand Down
19 changes: 19 additions & 0 deletions stripe/_credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,33 @@ class PretaxCreditAmount(StripeObject):
"""

class Refund(StripeObject):
class PaymentRecordRefund(StripeObject):
payment_record: str
"""
ID of the payment record.
"""
refund_group: str
"""
ID of the refund group.
"""

amount_refunded: int
"""
Amount of the refund that applies to this credit note, in cents (or local equivalent).
"""
payment_record_refund: Optional[PaymentRecordRefund]
"""
The PaymentRecord refund details associated with this credit note refund.
"""
refund: ExpandableField["RefundResource"]
"""
ID of the refund.
"""
type: Optional[Literal["payment_record_refund", "refund"]]
"""
Type of the refund, one of `refund` or `payment_record_refund`.
"""
_inner_class_types = {"payment_record_refund": PaymentRecordRefund}

class ShippingCost(StripeObject):
class Tax(StripeObject):
Expand Down
4 changes: 4 additions & 0 deletions stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ class Location(StripeObject):
"""
The identified tax location of the customer.
"""
provider: Literal["anrok", "avalara", "sphere", "stripe"]
"""
The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](https://docs.stripe.com/tax/third-party-apps).
"""
_inner_class_types = {"location": Location}

address: Optional[Address]
Expand Down
114 changes: 114 additions & 0 deletions stripe/_customer_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,80 @@ class BuyButton(StripeObject):
Whether the buy button is enabled.
"""

class CustomerSheet(StripeObject):
class Features(StripeObject):
payment_method_allow_redisplay_filters: Optional[
List[Literal["always", "limited", "unspecified"]]
]
"""
A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.

If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
"""
payment_method_remove: Optional[Literal["disabled", "enabled"]]
"""
Controls whether the customer sheet displays the option to remove a saved payment method."

Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
"""

enabled: bool
"""
Whether the customer sheet is enabled.
"""
features: Optional[Features]
"""
This hash defines whether the customer sheet supports certain features.
"""
_inner_class_types = {"features": Features}

class MobilePaymentElement(StripeObject):
class Features(StripeObject):
payment_method_allow_redisplay_filters: Optional[
List[Literal["always", "limited", "unspecified"]]
]
"""
A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.

If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
"""
payment_method_redisplay: Optional[
Literal["disabled", "enabled"]
]
"""
Controls whether or not the mobile payment element shows saved payment methods.
"""
payment_method_remove: Optional[Literal["disabled", "enabled"]]
"""
Controls whether the mobile payment element displays the option to remove a saved payment method."

Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
"""
payment_method_save: Optional[Literal["disabled", "enabled"]]
"""
Controls whether the mobile payment element displays a checkbox offering to save a new payment method.

If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
"""
payment_method_save_allow_redisplay_override: Optional[
Literal["always", "limited", "unspecified"]
]
"""
Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified".

If not specified, defaults to `nil` (no override value).
"""

enabled: bool
"""
Whether the mobile payment element is enabled.
"""
features: Optional[Features]
"""
This hash defines whether the mobile payment element supports certain features.
"""
_inner_class_types = {"features": Features}

class PaymentElement(StripeObject):
class Features(StripeObject):
payment_method_allow_redisplay_filters: List[
Expand Down Expand Up @@ -87,10 +161,43 @@ class PricingTable(StripeObject):
Whether the pricing table is enabled.
"""

class TaxIdElement(StripeObject):
class Features(StripeObject):
tax_id_redisplay: Literal["disabled", "enabled"]
"""
Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`.

When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers.
"""
tax_id_save: Literal["disabled", "enabled"]
"""
Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`.

When enabled, customers can enter and save new tax identification numbers during the payment flow, which will be stored securely and associated with their customer object for future use.
"""

enabled: bool
"""
Whether the Tax ID Element is enabled.
"""
features: Optional[Features]
"""
This hash defines whether the Tax ID Element supports certain features.
"""
_inner_class_types = {"features": Features}

buy_button: BuyButton
"""
This hash contains whether the buy button is enabled.
"""
customer_sheet: CustomerSheet
"""
This hash contains whether the customer sheet is enabled and the features it supports.
"""
mobile_payment_element: MobilePaymentElement
"""
This hash contains whether the mobile payment element is enabled and the features it supports.
"""
payment_element: PaymentElement
"""
This hash contains whether the Payment Element is enabled and the features it supports.
Expand All @@ -99,10 +206,17 @@ class PricingTable(StripeObject):
"""
This hash contains whether the pricing table is enabled.
"""
tax_id_element: Optional[TaxIdElement]
"""
This hash contains whether the Tax ID Element is enabled and the features it supports.
"""
_inner_class_types = {
"buy_button": BuyButton,
"customer_sheet": CustomerSheet,
"mobile_payment_element": MobilePaymentElement,
"payment_element": PaymentElement,
"pricing_table": PricingTable,
"tax_id_element": TaxIdElement,
}

client_secret: str
Expand Down
1 change: 1 addition & 0 deletions stripe/_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]):
"identity_document_downloadable",
"issuing_regulatory_reporting",
"pci_document",
"platform_terms_of_service",
"selfie",
"sigma_scheduled_query",
"tax_document_user_upload",
Expand Down
1 change: 1 addition & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ class LastFinalizationError(StripeObject):
"payment_intent_mandate_invalid",
"payment_intent_payment_attempt_expired",
"payment_intent_payment_attempt_failed",
"payment_intent_rate_limit_exceeded",
"payment_intent_unexpected_state",
"payment_method_bank_account_already_verified",
"payment_method_bank_account_blocked",
Expand Down
7 changes: 5 additions & 2 deletions stripe/_payment_attempt_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ class Crypto(StripeObject):
"""
The wallet address of the customer.
"""
network: Optional[Literal["base", "ethereum", "polygon"]]
network: Optional[Literal["base", "ethereum", "polygon", "solana"]]
"""
The blockchain network that the transaction was sent on.
"""
Expand Down Expand Up @@ -1553,7 +1553,10 @@ class Qris(StripeObject):
pass

class Rechnung(StripeObject):
pass
payment_portal_url: Optional[str]
"""
Payment portal URL.
"""

class RevolutPay(StripeObject):
class Funding(StripeObject):
Expand Down
1 change: 1 addition & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ class LastPaymentError(StripeObject):
"payment_intent_mandate_invalid",
"payment_intent_payment_attempt_expired",
"payment_intent_payment_attempt_failed",
"payment_intent_rate_limit_exceeded",
"payment_intent_unexpected_state",
"payment_method_bank_account_already_verified",
"payment_method_bank_account_blocked",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_payment_intent_amount_details_line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class CardPresent(StripeObject):
class Klarna(StripeObject):
image_url: Optional[str]
product_url: Optional[str]
reference: Optional[str]
subscription_reference: Optional[str]

class Paypal(StripeObject):
category: Optional[
Expand Down
Loading