From acd1bccfdfae25259404801aeff107d24726fe0f Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:38:28 -0700 Subject: [PATCH 1/4] Deserialize into correct v2 EventData types (#1414) * Add event data deserialization * Fix python attribute checking * fix pr feedback --- ...ling_meter_error_report_triggered_event.py | 29 ++++++++- .../_v1_billing_meter_no_meter_found_event.py | 29 ++++++++- tests/test_v2_event.py | 60 +++++++++++++++---- 3 files changed, 103 insertions(+), 15 deletions(-) diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py index f20157177..a3af378fb 100644 --- a/stripe/events/_v1_billing_meter_error_report_triggered_event.py +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.billing._meter import Meter from stripe.v2._event import Event -from typing import List, cast +from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal @@ -88,6 +91,30 @@ class Request(StripeObject): Data for the v1.billing.meter.error_report_triggered event """ + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1BillingMeterErrorReportTriggeredEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1BillingMeterErrorReportTriggeredEvent.V1BillingMeterErrorReportTriggeredEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + class RelatedObject(StripeObject): id: str """ diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py index 680c094aa..5f8d64479 100644 --- a/stripe/events/_v1_billing_meter_no_meter_found_event.py +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -1,8 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.v2._event import Event -from typing import List +from typing import Any, Dict, List, Optional from typing_extensions import Literal @@ -86,3 +89,27 @@ class Request(StripeObject): """ Data for the v1.billing.meter.no_meter_found event """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1BillingMeterNoMeterFoundEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1BillingMeterNoMeterFoundEvent.V1BillingMeterNoMeterFoundEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 9ffc910d9..32bd3fabb 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -5,6 +5,9 @@ import stripe from stripe import ThinEvent +from stripe.events._v1_billing_meter_error_report_triggered_event import ( + V1BillingMeterErrorReportTriggeredEvent, +) from tests.test_webhook import DUMMY_WEBHOOK_SECRET, generate_header EventParser = Callable[[str], ThinEvent] @@ -17,13 +20,13 @@ def v2_payload_no_data(self): { "id": "evt_234", "object": "v2.core.event", - "type": "financial_account.balance.opened", + "type": "v1.billing.meter.error_report_triggered", "livemode": True, "created": "2022-02-15T00:27:45.330Z", "related_object": { - "id": "fa_123", - "type": "financial_account", - "url": "/v2/financial_accounts/fa_123", + "id": "mtr_123", + "type": "billing.meter", + "url": "/v1/billing/meters/mtr_123", "stripe_context": "acct_123", }, "reason": { @@ -39,19 +42,19 @@ def v2_payload_with_data(self): { "id": "evt_234", "object": "v2.core.event", - "type": "financial_account.balance.opened", + "type": "v1.billing.meter.error_report_triggered", "livemode": False, "created": "2022-02-15T00:27:45.330Z", + "context": "acct_123", "related_object": { - "id": "fa_123", - "type": "financial_account", - "url": "/v2/financial_accounts/fa_123", - "stripe_context": "acct_123", + "id": "mtr_123", + "type": "billing.meter", + "url": "/v1/billing/meters/mtr_123", }, "data": { - "containing_compartment_id": "compid", - "id": "foo", - "type": "bufo", + "reason": { + "error_count": 1, + } }, } ) @@ -89,7 +92,7 @@ def test_parses_thin_event( assert event.id == "evt_234" assert event.related_object - assert event.related_object.id == "fa_123" + assert event.related_object.id == "mtr_123" assert event.reason assert event.reason.id == "foo" @@ -110,3 +113,34 @@ def test_validates_signature( stripe_client.parse_thin_event( v2_payload_no_data, "bad header", DUMMY_WEBHOOK_SECRET ) + + def test_v2_events_data_type(self, http_client_mock, v2_payload_with_data): + method = "get" + path = "/v2/core/events/evt_123" + http_client_mock.stub_request( + method, + path=path, + rbody=v2_payload_with_data, + rcode=200, + rheaders={}, + ) + client = stripe.StripeClient( + api_key="keyinfo_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + event = client.v2.core.events.retrieve("evt_123") + + http_client_mock.assert_requested( + method, + api_base=stripe.DEFAULT_API_BASE, + path=path, + api_key="keyinfo_test_123", + ) + assert event.id is not None + assert isinstance(event, V1BillingMeterErrorReportTriggeredEvent) + assert event.data is not None + assert isinstance( + event.data, + V1BillingMeterErrorReportTriggeredEvent.V1BillingMeterErrorReportTriggeredEventData, + ) + assert event.data.reason.error_count == 1 From d53a190ef5bf8a1ebbc683af2af3b601770589da Mon Sep 17 00:00:00 2001 From: David Brownman Date: Fri, 18 Oct 2024 11:42:23 -0700 Subject: [PATCH 2/4] Bump version to 11.1.1 --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcc240bd7..e89347ffc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 11.1.1 - 2024-10-18 +* [#1414](https://github.com/stripe/stripe-python/pull/1414) Deserialize into correct v2 EventData types + * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent` +* [#1415](https://github.com/stripe/stripe-python/pull/1415) update object tags for meter-related classes + + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. +* [#1412](https://github.com/stripe/stripe-python/pull/1412) Clean up examples + ## 11.1.0 - 2024-10-03 * [#1409](https://github.com/stripe/stripe-python/pull/1409) Update the class for `ThinEvent` to include `livemode` * [#1408](https://github.com/stripe/stripe-python/pull/1408) Update generated code diff --git a/VERSION b/VERSION index 68d8f15e2..668182d21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.0 +11.1.1 diff --git a/stripe/_version.py b/stripe/_version.py index e67067092..043e1f3c1 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.1.0" +VERSION = "11.1.1" From f71b687b9ab5f722c58c56659d6d078775de50c0 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:14:41 -0700 Subject: [PATCH 3/4] Update generated code (#1411) * Update generated code for v1268 * Update generated code for v1314 * Update generated code for v1315 * Update generated code for v1317 * Update generated code for v1318 * Update generated code for v1318 * Update generated code for v1319 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 129 +++- stripe/_account_login_link_service.py | 4 +- stripe/_account_service.py | 168 ++++- stripe/_account_session.py | 62 +- stripe/_account_session_service.py | 30 +- stripe/_api_version.py | 2 +- stripe/_charge.py | 78 +++ stripe/_confirmation_token.py | 136 +++- stripe/_credit_note.py | 9 +- stripe/_credit_note_line_item.py | 3 + stripe/_credit_note_preview_lines_service.py | 2 +- stripe/_credit_note_service.py | 4 +- stripe/_customer.py | 34 +- stripe/_customer_payment_method_service.py | 6 + stripe/_customer_service.py | 20 +- stripe/_customer_tax_id_service.py | 8 +- stripe/_dispute.py | 344 ++++++++++ stripe/_dispute_service.py | 166 +++++ stripe/_event.py | 2 + stripe/_invoice.py | 60 +- stripe/_invoice_line_item.py | 4 + stripe/_invoice_line_item_service.py | 1 + stripe/_invoice_service.py | 34 +- stripe/_invoice_upcoming_lines_service.py | 10 +- stripe/_mandate.py | 10 + stripe/_object_classes.py | 1 + stripe/_payment_intent.py | 617 +++++++++++++++++- stripe/_payment_intent_service.py | 561 +++++++++++++++- stripe/_payment_link.py | 4 +- stripe/_payment_link_service.py | 3 +- stripe/_payment_method.py | 140 +++- stripe/_payment_method_configuration.py | 64 +- .../_payment_method_configuration_service.py | 40 +- stripe/_payment_method_domain.py | 22 + stripe/_payment_method_service.py | 69 +- stripe/_person.py | 2 +- stripe/_refund.py | 8 +- stripe/_setup_attempt.py | 10 + stripe/_setup_intent.py | 179 ++++- stripe/_setup_intent_service.py | 195 +++++- stripe/_subscription.py | 13 +- stripe/_subscription_service.py | 8 +- stripe/_tax_id.py | 16 +- stripe/_tax_id_service.py | 8 +- stripe/_tax_rate.py | 24 + stripe/_tax_rate_service.py | 2 + stripe/_token.py | 6 +- stripe/_token_service.py | 6 +- stripe/_usage_record_summary.py | 4 + stripe/_webhook_endpoint.py | 5 + stripe/_webhook_endpoint_service.py | 5 + stripe/billing/_credit_balance_summary.py | 12 +- .../_credit_balance_summary_service.py | 4 +- stripe/billing/_credit_balance_transaction.py | 20 +- stripe/billing/_credit_grant.py | 31 +- stripe/billing/_credit_grant_service.py | 12 +- stripe/billing/_meter.py | 2 + stripe/billing_portal/_configuration.py | 71 +- .../billing_portal/_configuration_service.py | 50 +- stripe/checkout/_session.py | 142 +++- stripe/checkout/_session_service.py | 78 +++ stripe/forwarding/_request.py | 10 +- stripe/forwarding/_request_service.py | 6 +- stripe/issuing/_card.py | 118 +++- stripe/issuing/_card_service.py | 2 +- stripe/tax/_calculation.py | 37 +- stripe/tax/_calculation_line_item.py | 1 + stripe/tax/_calculation_service.py | 8 +- stripe/tax/_registration.py | 164 +++++ stripe/tax/_registration_service.py | 91 +++ stripe/tax/_transaction.py | 9 +- stripe/terminal/_configuration.py | 52 ++ stripe/terminal/_configuration_service.py | 36 + .../_confirmation_token_service.py | 65 +- stripe/test_helpers/issuing/_card_service.py | 50 ++ stripe/treasury/_financial_account.py | 2 +- stripe/v2/__init__.py | 1 + stripe/v2/_core_service.py | 2 + stripe/v2/_event_destination.py | 124 ++++ stripe/v2/core/__init__.py | 3 + stripe/v2/core/_event_destination_service.py | 478 ++++++++++++++ stripe/v2/core/_event_service.py | 2 +- 83 files changed, 4856 insertions(+), 167 deletions(-) create mode 100644 stripe/v2/_event_destination.py create mode 100644 stripe/v2/core/_event_destination_service.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8f166ae2e..c626f7dd8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1268 \ No newline at end of file +v1319 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index db36e83a8..b13e39411 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -170,6 +170,10 @@ class Capabilities(StripeObject): """ The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. """ + alma_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Alma capability of the account, or whether the account can directly process Alma payments. + """ amazon_pay_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. @@ -262,6 +266,10 @@ class Capabilities(StripeObject): """ The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. """ + kakao_pay_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + """ klarna_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. @@ -270,6 +278,10 @@ class Capabilities(StripeObject): """ The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. """ + kr_card_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + """ legacy_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the legacy payments capability of the account. @@ -292,6 +304,10 @@ class Capabilities(StripeObject): """ The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. """ + naver_pay_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + """ oxxo_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. @@ -300,6 +316,10 @@ class Capabilities(StripeObject): """ The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. """ + payco_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Payco capability of the account, or whether the account can directly process Payco payments. + """ paynow_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. @@ -314,6 +334,12 @@ class Capabilities(StripeObject): """ The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. """ + samsung_pay_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + """ sepa_bank_transfer_payments: Optional[ Literal["active", "inactive", "pending"] ] @@ -794,6 +820,12 @@ class Error(StripeObject): """ _inner_class_types = {"alternatives": Alternative, "errors": Error} + class Groups(StripeObject): + payments_pricing: Optional[str] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class Requirements(StripeObject): class Alternative(StripeObject): alternative_fields_due: List[str] @@ -1292,6 +1324,10 @@ class CreateParams(RequestOptions): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["Account.CreateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["Account.CreateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -1461,6 +1497,12 @@ class CreateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "Account.CreateParamsCapabilitiesAmazonPayPayments" ] @@ -1581,6 +1623,12 @@ class CreateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "Account.CreateParamsCapabilitiesKlarnaPayments" ] @@ -1593,6 +1641,12 @@ class CreateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "Account.CreateParamsCapabilitiesLegacyPayments" ] @@ -1623,6 +1677,12 @@ class CreateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "Account.CreateParamsCapabilitiesOxxoPayments" ] @@ -1635,6 +1695,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "Account.CreateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "Account.CreateParamsCapabilitiesPaynowPayments" ] @@ -1653,6 +1719,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "Account.CreateParamsCapabilitiesSepaBankTransferPayments" ] @@ -1740,6 +1812,12 @@ class CreateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesAlmaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -1860,6 +1938,12 @@ class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesKakaoPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -1872,6 +1956,12 @@ class CreateParamsCapabilitiesKonbiniPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesKrCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -1902,6 +1992,12 @@ class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesNaverPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -1914,6 +2010,12 @@ class CreateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesPaycoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -1932,6 +2034,12 @@ class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesSamsungPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -2353,6 +2461,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class CreateParamsIndividual(TypedDict): address: NotRequired["Account.CreateParamsIndividualAddress"] """ @@ -2394,7 +2508,7 @@ class CreateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -3865,7 +3979,7 @@ class RetrievePersonParams(RequestOptions): capabilities: Optional[Capabilities] charges_enabled: Optional[bool] """ - Whether the account can create live charges. + Whether the account can process charges. """ company: Optional[Company] controller: Optional[Controller] @@ -3894,6 +4008,10 @@ class RetrievePersonParams(RequestOptions): External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. """ future_requirements: Optional[FutureRequirements] + groups: Optional[Groups] + """ + The groups associated with the account. + """ id: str """ Unique identifier for the object. @@ -3916,7 +4034,7 @@ class RetrievePersonParams(RequestOptions): """ payouts_enabled: Optional[bool] """ - Whether Stripe can send payouts to this account. + Whether the funds in this account can be paid out. """ requirements: Optional[Requirements] settings: Optional[Settings] @@ -4790,7 +4908,7 @@ def create_login_link( cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] ) -> "LoginLink": """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -4810,7 +4928,7 @@ async def create_login_link_async( cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] ) -> "LoginLink": """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -5029,6 +5147,7 @@ async def list_persons_async( "company": Company, "controller": Controller, "future_requirements": FutureRequirements, + "groups": Groups, "requirements": Requirements, "settings": Settings, "tos_acceptance": TosAcceptance, diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py index aa3d3dc7d..0d1d0a30c 100644 --- a/stripe/_account_login_link_service.py +++ b/stripe/_account_login_link_service.py @@ -22,7 +22,7 @@ def create( options: RequestOptions = {}, ) -> LoginLink: """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -46,7 +46,7 @@ async def create_async( options: RequestOptions = {}, ) -> LoginLink: """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index bf8142bc8..9d973845c 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -87,6 +87,10 @@ class CreateParams(TypedDict): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["AccountService.CreateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["AccountService.CreateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -256,6 +260,12 @@ class CreateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesAmazonPayPayments" ] @@ -376,6 +386,12 @@ class CreateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesKlarnaPayments" ] @@ -388,6 +404,12 @@ class CreateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesLegacyPayments" ] @@ -418,6 +440,12 @@ class CreateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesOxxoPayments" ] @@ -430,6 +458,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesPaynowPayments" ] @@ -448,6 +482,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesSepaBankTransferPayments" ] @@ -539,6 +579,12 @@ class CreateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesAlmaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -659,6 +705,12 @@ class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesKakaoPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -671,6 +723,12 @@ class CreateParamsCapabilitiesKonbiniPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesKrCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -701,6 +759,12 @@ class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesNaverPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -713,6 +777,12 @@ class CreateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesPaycoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -731,6 +801,12 @@ class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesSamsungPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -1158,6 +1234,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class CreateParamsIndividual(TypedDict): address: NotRequired["AccountService.CreateParamsIndividualAddress"] """ @@ -1203,7 +1285,7 @@ class CreateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1777,6 +1859,10 @@ class UpdateParams(TypedDict): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["AccountService.UpdateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["AccountService.UpdateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -1942,6 +2028,12 @@ class UpdateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesAmazonPayPayments" ] @@ -2062,6 +2154,12 @@ class UpdateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesKlarnaPayments" ] @@ -2074,6 +2172,12 @@ class UpdateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesLegacyPayments" ] @@ -2104,6 +2208,12 @@ class UpdateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesOxxoPayments" ] @@ -2116,6 +2226,12 @@ class UpdateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesPaynowPayments" ] @@ -2134,6 +2250,12 @@ class UpdateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesSepaBankTransferPayments" ] @@ -2225,6 +2347,12 @@ class UpdateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesAlmaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -2345,6 +2473,12 @@ class UpdateParamsCapabilitiesJpBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesKakaoPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -2357,6 +2491,12 @@ class UpdateParamsCapabilitiesKonbiniPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesKrCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -2387,6 +2527,12 @@ class UpdateParamsCapabilitiesMxBankTransferPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesNaverPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -2399,6 +2545,12 @@ class UpdateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesPaycoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -2417,6 +2569,12 @@ class UpdateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesSamsungPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -2806,6 +2964,12 @@ class UpdateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class UpdateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class UpdateParamsIndividual(TypedDict): address: NotRequired["AccountService.UpdateParamsIndividualAddress"] """ @@ -2851,7 +3015,7 @@ class UpdateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 4b844424d..eee61b8fb 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, cast +from typing import ClassVar, List, Optional, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack @@ -23,9 +23,13 @@ class AccountSession(CreateableAPIResource["AccountSession"]): class Components(StripeObject): class AccountManagement(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -37,9 +41,13 @@ class Features(StripeObject): class AccountOnboarding(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -51,13 +59,17 @@ class Features(StripeObject): class Balances(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: bool """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: bool """ @@ -88,9 +100,13 @@ class Features(StripeObject): class NotificationBanner(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -154,13 +170,17 @@ class Features(StripeObject): class Payouts(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: bool """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: bool """ @@ -325,9 +345,13 @@ class CreateParamsComponentsAccountManagement(TypedDict): """ class CreateParamsComponentsAccountManagementFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -343,9 +367,13 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsBalances(TypedDict): @@ -361,13 +389,17 @@ class CreateParamsComponentsBalances(TypedDict): """ class CreateParamsComponentsBalancesFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ @@ -406,9 +438,13 @@ class CreateParamsComponentsNotificationBanner(TypedDict): """ class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -484,13 +520,17 @@ class CreateParamsComponentsPayouts(TypedDict): """ class CreateParamsComponentsPayoutsFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 52ea8afa3..fbdf22315 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -103,9 +103,13 @@ class CreateParamsComponentsAccountManagement(TypedDict): """ class CreateParamsComponentsAccountManagementFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -121,9 +125,13 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsBalances(TypedDict): @@ -139,13 +147,17 @@ class CreateParamsComponentsBalances(TypedDict): """ class CreateParamsComponentsBalancesFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ @@ -184,9 +196,13 @@ class CreateParamsComponentsNotificationBanner(TypedDict): """ class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -262,13 +278,17 @@ class CreateParamsComponentsPayouts(TypedDict): """ class CreateParamsComponentsPayoutsFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ diff --git a/stripe/_api_version.py b/stripe/_api_version.py index e23615373..16c42a5c5 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-09-30.acacia" + CURRENT = "2024-10-28.acacia" diff --git a/stripe/_charge.py b/stripe/_charge.py index 9d0463bd5..3a08da9f8 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -282,6 +282,9 @@ class Alipay(StripeObject): Transaction ID of this particular Alipay transaction. """ + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -1285,6 +1288,12 @@ class Receipt(StripeObject): """ _inner_class_types = {"receipt": Receipt} + class KakaoPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Klarna(StripeObject): class PayerDetails(StripeObject): class Address(StripeObject): @@ -1330,6 +1339,45 @@ class Store(StripeObject): """ _inner_class_types = {"store": Store} + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): country: Optional[str] """ @@ -1376,6 +1424,12 @@ class Multibanco(StripeObject): Reference number associated with this Multibanco payment. """ + class NaverPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Oxxo(StripeObject): number: Optional[str] """ @@ -1427,6 +1481,12 @@ class P24(StripeObject): Przelewy24 rarely provides this information so the attribute is usually empty. """ + class Payco(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Paynow(StripeObject): reference: Optional[str] """ @@ -1487,6 +1547,12 @@ class Promptpay(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class SepaCreditTransfer(StripeObject): bank_name: Optional[str] """ @@ -1645,6 +1711,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1661,18 +1728,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] @@ -1696,6 +1768,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1712,18 +1785,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, "sofort": Sofort, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 239f20322..4afa0d288 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -107,6 +107,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -1026,6 +1029,9 @@ class Networks(StripeObject): """ _inner_class_types = {"networks": Networks} + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): class Dob(StripeObject): day: Optional[int] @@ -1050,6 +1056,41 @@ class Dob(StripeObject): class Konbini(StripeObject): pass + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): email: Optional[str] """ @@ -1066,6 +1107,12 @@ class Mobilepay(StripeObject): class Multibanco(StripeObject): pass + class NaverPay(StripeObject): + funding: Literal["card", "points"] + """ + Whether to fund this transaction with Naver Pay points or a card. + """ + class Oxxo(StripeObject): pass @@ -1104,6 +1151,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class Payco(StripeObject): + pass + class Paynow(StripeObject): pass @@ -1127,6 +1177,9 @@ class Promptpay(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + pass + class SepaDebit(StripeObject): class GeneratedFrom(StripeObject): charge: Optional[ExpandableField["Charge"]] @@ -1280,6 +1333,7 @@ class Zip(StripeObject): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1301,18 +1355,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1322,6 +1381,7 @@ class Zip(StripeObject): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1338,18 +1398,23 @@ class Zip(StripeObject): "grabpay", "ideal", "interac_present", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1369,6 +1434,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1386,18 +1452,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -1506,6 +1577,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1592,6 +1669,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataKlarna" ] @@ -1604,6 +1687,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataLink" ] @@ -1626,6 +1715,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataOxxo" ] @@ -1636,6 +1731,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataPaynow" ] @@ -1670,6 +1771,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataSepaDebit" ] @@ -1699,6 +1806,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1712,18 +1820,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1775,6 +1888,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1960,12 +2076,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataKlarnaDob" @@ -1991,6 +2110,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -2000,6 +2122,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2038,6 +2166,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2059,6 +2190,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 6e5ae51ff..0d298d755 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -245,7 +245,7 @@ class CreateParams(RequestOptions): class CreateParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -462,7 +462,7 @@ class PreviewLinesParams(RequestOptions): class PreviewLinesParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -587,7 +587,7 @@ class PreviewParams(RequestOptions): class PreviewParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -735,6 +735,9 @@ class VoidCreditNoteParams(RequestOptions): The link to download the PDF of the credit note. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + """ reason: Optional[ Literal[ "duplicate", "fraudulent", "order_change", "product_unsatisfactory" diff --git a/stripe/_credit_note_line_item.py b/stripe/_credit_note_line_item.py index 04505cf83..9b22896f8 100644 --- a/stripe/_credit_note_line_item.py +++ b/stripe/_credit_note_line_item.py @@ -129,6 +129,9 @@ class TaxAmount(StripeObject): String representing the object's type. Objects of the same type share the same value. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + """ quantity: Optional[int] """ The number of units of product being credited. diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index 10cc91426..bce76c93a 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -93,7 +93,7 @@ class ListParams(TypedDict): class ListParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 774b1a8c8..f68cf465d 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -89,7 +89,7 @@ class CreateParams(TypedDict): class CreateParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -264,7 +264,7 @@ class PreviewParams(TypedDict): class PreviewParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ diff --git a/stripe/_customer.py b/stripe/_customer.py index 001126339..a4a2b108d 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -382,7 +382,7 @@ class CreateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -481,7 +481,7 @@ class CreateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -522,6 +522,7 @@ class CreateParamsTaxIdDatum(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -557,6 +558,8 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -580,15 +583,18 @@ class CreateParamsTaxIdDatum(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -626,6 +632,7 @@ class CreateTaxIdParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -661,6 +668,8 @@ class CreateTaxIdParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -684,15 +693,18 @@ class CreateTaxIdParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -845,6 +857,7 @@ class ListPaymentMethodsParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -859,18 +872,23 @@ class ListPaymentMethodsParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1046,7 +1064,7 @@ class ModifyParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1145,7 +1163,7 @@ class ModifyParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1169,7 +1187,9 @@ class ModifyParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["deferred", "immediately"]] + validate_location: NotRequired[ + Literal["auto", "deferred", "immediately"] + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. """ diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index e1749bf91..6bc307d5b 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -39,6 +39,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -53,18 +54,23 @@ class ListParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 100c7c367..9caaa851d 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -142,7 +142,7 @@ class CreateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -243,7 +243,7 @@ class CreateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -284,6 +284,7 @@ class CreateParamsTaxIdDatum(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -319,6 +320,8 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -342,15 +345,18 @@ class CreateParamsTaxIdDatum(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -529,7 +535,7 @@ class UpdateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -630,7 +636,7 @@ class UpdateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -654,7 +660,9 @@ class UpdateParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["deferred", "immediately"]] + validate_location: NotRequired[ + Literal["auto", "deferred", "immediately"] + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. """ diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index af1ce221e..6ba3e2efd 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -26,6 +26,7 @@ class CreateParams(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -61,6 +62,8 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -84,15 +87,18 @@ class CreateParams(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_dispute.py b/stripe/_dispute.py index e75cf056f..22f5c33e1 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -37,6 +37,150 @@ class Dispute( OBJECT_NAME: ClassVar[Literal["dispute"]] = "dispute" class Evidence(StripeObject): + class EnhancedEvidence(StripeObject): + class VisaCompellingEvidence3(StripeObject): + class DisputedTransaction(StripeObject): + class ShippingAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + customer_account_id: Optional[str] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: Optional[str] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: Optional[str] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: Optional[str] + """ + The email address of the customer. + """ + customer_purchase_ip: Optional[str] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: Optional[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: Optional[str] + """ + A description of the product or service that was sold. + """ + shipping_address: Optional[ShippingAddress] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = {"shipping_address": ShippingAddress} + + class PriorUndisputedTransaction(StripeObject): + class ShippingAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: Optional[str] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: Optional[str] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: Optional[str] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: Optional[str] + """ + The email address of the customer. + """ + customer_purchase_ip: Optional[str] + """ + The IP address that the customer used when making the purchase. + """ + product_description: Optional[str] + """ + A description of the product or service that was sold. + """ + shipping_address: Optional[ShippingAddress] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = {"shipping_address": ShippingAddress} + + disputed_transaction: Optional[DisputedTransaction] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: List[PriorUndisputedTransaction] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = { + "disputed_transaction": DisputedTransaction, + "prior_undisputed_transactions": PriorUndisputedTransaction, + } + + visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] + _inner_class_types = { + "visa_compelling_evidence_3": VisaCompellingEvidence3, + } + access_activity_log: Optional[str] """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -89,6 +233,7 @@ class Evidence(StripeObject): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: EnhancedEvidence product_description: Optional[str] """ A description of the product or service that was sold. @@ -145,12 +290,40 @@ class Evidence(StripeObject): """ Any additional evidence or statements. """ + _inner_class_types = {"enhanced_evidence": EnhancedEvidence} class EvidenceDetails(StripeObject): + class EnhancedEligibility(StripeObject): + class VisaCompellingEvidence3(StripeObject): + required_actions: List[ + Literal[ + "missing_customer_identifiers", + "missing_disputed_transaction_description", + "missing_merchandise_or_services", + "missing_prior_undisputed_transaction_description", + "missing_prior_undisputed_transactions", + ] + ] + """ + List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + """ + status: Literal[ + "not_qualified", "qualified", "requires_action" + ] + """ + Visa Compelling Evidence 3.0 eligibility status. + """ + + visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] + _inner_class_types = { + "visa_compelling_evidence_3": VisaCompellingEvidence3, + } + due_by: Optional[int] """ Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. """ + enhanced_eligibility: EnhancedEligibility has_evidence: bool """ Whether evidence has been staged for this dispute. @@ -163,6 +336,7 @@ class EvidenceDetails(StripeObject): """ The number of times evidence has been submitted. Typically, you may only submit evidence once. """ + _inner_class_types = {"enhanced_eligibility": EnhancedEligibility} class PaymentMethodDetails(StripeObject): class AmazonPay(StripeObject): @@ -341,6 +515,12 @@ class ModifyParamsEvidence(TypedDict): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ product_description: NotRequired[str] """ A description of the product or service that was sold. Has a maximum character count of 20,000. @@ -398,6 +578,166 @@ class ModifyParamsEvidence(TypedDict): Any additional evidence or statements. Has a maximum character count of 20,000. """ + class ModifyParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, + ): + disputed_transaction: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, + ): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, + ): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -424,6 +764,10 @@ class RetrieveParams(RequestOptions): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ + enhanced_eligibility_types: List[Literal["visa_compelling_evidence_3"]] + """ + List of eligibility types that are included in `enhanced_evidence`. + """ evidence: Evidence evidence_details: EvidenceDetails id: str diff --git a/stripe/_dispute_service.py b/stripe/_dispute_service.py index e55049146..97c4f7897 100644 --- a/stripe/_dispute_service.py +++ b/stripe/_dispute_service.py @@ -141,6 +141,12 @@ class UpdateParamsEvidence(TypedDict): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: NotRequired[ + "Literal['']|DisputeService.UpdateParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ product_description: NotRequired[str] """ A description of the product or service that was sold. Has a maximum character count of 20,000. @@ -198,6 +204,166 @@ class UpdateParamsEvidence(TypedDict): Any additional evidence or statements. Has a maximum character count of 20,000. """ + class UpdateParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, + ): + disputed_transaction: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, + ): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, + ): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + def list( self, params: "DisputeService.ListParams" = {}, diff --git a/stripe/_event.py b/stripe/_event.py index a54c62909..1b9ed4c48 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -276,6 +276,7 @@ class RetrieveParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -319,6 +320,7 @@ class RetrieveParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 3c2bd5886..8d7d66e0a 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -221,6 +221,7 @@ class CustomerTaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -256,6 +257,8 @@ class CustomerTaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -279,16 +282,19 @@ class CustomerTaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -758,10 +764,15 @@ class Filters(StripeObject): "giropay", "grabpay", "ideal", + "jp_credit_transfer", + "kakao_pay", "konbini", + "kr_card", "link", "multibanco", + "naver_pay", "p24", + "payco", "paynow", "paypal", "promptpay", @@ -1238,6 +1249,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -1264,6 +1276,10 @@ class CreateParams(RequestOptions): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -1457,7 +1473,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -2045,7 +2061,7 @@ class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -2082,6 +2098,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -2117,6 +2134,8 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -2140,15 +2159,18 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2984,6 +3006,10 @@ class ModifyParams(RequestOptions): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -3151,7 +3177,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -3891,7 +3917,7 @@ class UpcomingLinesParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -3928,6 +3954,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -3963,6 +3990,8 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -3986,15 +4015,18 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -5026,7 +5058,7 @@ class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -5063,6 +5095,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -5098,6 +5131,8 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -5121,15 +5156,18 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -6124,6 +6162,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -6469,6 +6508,9 @@ class VoidInvoiceParams(RequestOptions): The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. """ total_pretax_credit_amounts: Optional[List[TotalPretaxCreditAmount]] + """ + Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + """ total_tax_amounts: List[TotalTaxAmount] """ The aggregate amounts calculated per tax rate for all line items. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 827490207..f7a943ad8 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -319,6 +319,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -386,6 +387,9 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): The plan of the subscription, if the line item is a subscription or a proration. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + """ price: Optional["Price"] """ The price of the line item. diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 3130ebda8..62dade07b 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -216,6 +216,7 @@ class UpdateParamsTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 016c3c1bb..0e17cf433 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -218,6 +218,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -244,6 +245,10 @@ class CreateParams(TypedDict): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -443,7 +448,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -1037,7 +1042,7 @@ class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1074,6 +1079,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -1109,6 +1115,8 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -1132,15 +1140,18 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2256,7 +2267,7 @@ class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -2293,6 +2304,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -2328,6 +2340,8 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -2351,15 +2365,18 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3362,6 +3379,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -3388,6 +3406,10 @@ class UpdateParams(TypedDict): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -3559,7 +3581,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 12e58adf8..745aa73b2 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -250,7 +250,7 @@ class ListParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -287,6 +287,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -322,6 +323,8 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -345,15 +348,18 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index e93bf7b68..a4bebee61 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -109,6 +109,12 @@ class Card(StripeObject): class Cashapp(StripeObject): pass + class KakaoPay(StripeObject): + pass + + class KrCard(StripeObject): + pass + class Link(StripeObject): pass @@ -147,6 +153,8 @@ class UsBankAccount(StripeObject): bacs_debit: Optional[BacsDebit] card: Optional[Card] cashapp: Optional[Cashapp] + kakao_pay: Optional[KakaoPay] + kr_card: Optional[KrCard] link: Optional[Link] paypal: Optional[Paypal] revolut_pay: Optional[RevolutPay] @@ -163,6 +171,8 @@ class UsBankAccount(StripeObject): "bacs_debit": BacsDebit, "card": Card, "cashapp": Cashapp, + "kakao_pay": KakaoPay, + "kr_card": KrCard, "link": Link, "paypal": Paypal, "revolut_pay": RevolutPay, diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index cbb749a12..fe1b3d96f 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -154,5 +154,6 @@ stripe.v2.billing.MeterEventAdjustment.OBJECT_NAME: stripe.v2.billing.MeterEventAdjustment, stripe.v2.billing.MeterEventSession.OBJECT_NAME: stripe.v2.billing.MeterEventSession, stripe.v2.Event.OBJECT_NAME: stripe.v2.Event, + stripe.v2.EventDestination.OBJECT_NAME: stripe.v2.EventDestination, # V2 Object classes: The end of the section generated from our OpenAPI spec } diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 974f9e729..482373185 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1055,6 +1055,12 @@ class Alipay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Alma(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class AmazonPay(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1484,6 +1490,22 @@ class Ideal(StripeObject): class InteracPresent(StripeObject): pass + class KakaoPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Klarna(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1532,6 +1554,22 @@ class Konbini(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KrCard(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Link(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1580,6 +1618,12 @@ class Multibanco(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class NaverPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Oxxo(StripeObject): expires_after_days: int """ @@ -1608,6 +1652,12 @@ class P24(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Payco(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Paynow(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -1692,6 +1742,12 @@ class RevolutPay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class SamsungPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class SepaDebit(StripeObject): class MandateOptions(StripeObject): pass @@ -1866,6 +1922,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1882,18 +1939,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1906,6 +1968,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1922,18 +1985,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -2028,11 +2096,9 @@ class TransferData(StripeObject): class ApplyCustomerBalanceParams(RequestOptions): amount: NotRequired[int] """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. - - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). + Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - The maximum amount is the amount of the PaymentIntent. + A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. """ @@ -2269,6 +2335,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -2351,6 +2421,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna" ] @@ -2363,6 +2439,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -2383,6 +2465,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -2391,6 +2479,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow" ] @@ -2425,6 +2517,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -2450,6 +2548,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2463,18 +2562,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2526,6 +2630,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2711,12 +2818,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -2742,6 +2852,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -2751,6 +2864,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2789,6 +2908,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2810,6 +2932,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -2881,6 +3006,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" ] @@ -2977,6 +3108,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna" ] @@ -2989,6 +3126,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink" ] @@ -3007,6 +3150,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo" ] @@ -3019,6 +3168,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow" ] @@ -3049,6 +3204,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" ] @@ -3211,6 +3372,16 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3783,6 +3954,28 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3888,6 +4081,28 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3952,6 +4167,16 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -3988,6 +4213,16 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -4116,6 +4351,16 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -4630,6 +4875,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAmazonPay" ] @@ -4712,6 +4961,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarna" ] @@ -4724,6 +4979,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -4744,6 +5005,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -4752,6 +5019,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPaynow" ] @@ -4786,6 +5057,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit" ] @@ -4811,6 +5088,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -4824,18 +5102,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -4887,6 +5170,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -5072,12 +5358,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob" @@ -5103,6 +5392,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -5112,6 +5404,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -5150,6 +5448,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -5171,6 +5472,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -5242,6 +5546,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAmazonPay" ] @@ -5338,6 +5648,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna" ] @@ -5350,6 +5666,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink" ] @@ -5368,6 +5690,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo" ] @@ -5380,6 +5708,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow" ] @@ -5410,6 +5744,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -5572,6 +5912,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6144,6 +6494,28 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6249,6 +6621,28 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6313,6 +6707,16 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -6349,6 +6753,16 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -6477,6 +6891,16 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -6985,6 +7409,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAmazonPay" ] @@ -7067,6 +7495,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarna" ] @@ -7079,6 +7513,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -7099,6 +7539,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -7107,6 +7553,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPaynow" ] @@ -7141,6 +7591,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit" ] @@ -7166,6 +7622,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -7179,18 +7636,23 @@ class ModifyParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -7242,6 +7704,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAlma(TypedDict): + pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -7427,12 +7892,15 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob" @@ -7458,6 +7926,9 @@ class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): class ModifyParamsPaymentMethodDataKonbini(TypedDict): pass + class ModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + class ModifyParamsPaymentMethodDataLink(TypedDict): pass @@ -7467,6 +7938,12 @@ class ModifyParamsPaymentMethodDataMobilepay(TypedDict): class ModifyParamsPaymentMethodDataMultibanco(TypedDict): pass + class ModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -7505,6 +7982,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayco(TypedDict): + pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): pass @@ -7526,6 +8006,9 @@ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -7597,6 +8080,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAmazonPay" ] @@ -7693,6 +8182,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna" ] @@ -7705,6 +8200,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink" ] @@ -7723,6 +8224,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo" ] @@ -7735,6 +8242,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow" ] @@ -7765,6 +8278,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit" ] @@ -7927,6 +8446,16 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8499,6 +9028,28 @@ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8604,6 +9155,28 @@ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ModifyParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8668,6 +9241,16 @@ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -8704,6 +9287,16 @@ class ModifyParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ModifyParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -8832,6 +9425,16 @@ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ModifyParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 9be12ae19..8fa22ca1b 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -14,11 +14,9 @@ class PaymentIntentService(StripeService): class ApplyCustomerBalanceParams(TypedDict): amount: NotRequired[int] """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. + Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). - - The maximum amount is the amount of the PaymentIntent. + A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. """ @@ -259,6 +257,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -349,6 +353,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarna" ] @@ -361,6 +371,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataLink" ] @@ -383,6 +399,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataOxxo" ] @@ -395,6 +417,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataPaynow" ] @@ -431,6 +459,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -460,6 +494,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -473,18 +508,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -538,6 +578,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -723,12 +766,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -754,6 +800,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -763,6 +812,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -801,6 +856,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -822,6 +880,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -893,6 +954,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" ] @@ -989,6 +1056,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarna" ] @@ -1001,6 +1074,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsLink" ] @@ -1019,6 +1098,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsOxxo" ] @@ -1031,6 +1116,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaynow" ] @@ -1061,6 +1152,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebit" ] @@ -1223,6 +1320,16 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1795,6 +1902,28 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1900,6 +2029,28 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1964,6 +2115,16 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -2000,6 +2161,16 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -2128,6 +2299,16 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -2646,6 +2827,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -2736,6 +2923,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataKlarna" ] @@ -2748,6 +2941,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataLink" ] @@ -2770,6 +2969,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataOxxo" ] @@ -2782,6 +2987,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataPaynow" ] @@ -2818,6 +3029,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -2847,6 +3064,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2860,18 +3078,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2925,6 +3148,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -3110,12 +3336,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataKlarnaDob" @@ -3141,6 +3370,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -3150,6 +3382,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -3188,6 +3426,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3209,6 +3450,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -3280,6 +3524,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAmazonPay" ] @@ -3376,6 +3626,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKlarna" ] @@ -3388,6 +3644,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsLink" ] @@ -3406,6 +3668,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsOxxo" ] @@ -3418,6 +3686,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPaynow" ] @@ -3448,6 +3722,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -3610,6 +3890,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4182,6 +4472,28 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4287,6 +4599,28 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4351,6 +4685,16 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -4387,6 +4731,16 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -4515,6 +4869,16 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -5055,6 +5419,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataAmazonPay" ] @@ -5145,6 +5515,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataKlarna" ] @@ -5157,6 +5533,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataLink" ] @@ -5179,6 +5561,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataOxxo" ] @@ -5191,6 +5579,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataPaynow" ] @@ -5227,6 +5621,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataSepaDebit" ] @@ -5256,6 +5656,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -5269,18 +5670,23 @@ class UpdateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -5334,6 +5740,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAlma(TypedDict): + pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -5519,12 +5928,15 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataKlarnaDob" @@ -5550,6 +5962,9 @@ class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): class UpdateParamsPaymentMethodDataKonbini(TypedDict): pass + class UpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + class UpdateParamsPaymentMethodDataLink(TypedDict): pass @@ -5559,6 +5974,12 @@ class UpdateParamsPaymentMethodDataMobilepay(TypedDict): class UpdateParamsPaymentMethodDataMultibanco(TypedDict): pass + class UpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -5597,6 +6018,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayco(TypedDict): + pass + class UpdateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -5618,6 +6042,9 @@ class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -5689,6 +6116,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" ] @@ -5785,6 +6218,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarna" ] @@ -5797,6 +6236,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsLink" ] @@ -5815,6 +6260,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsOxxo" ] @@ -5827,6 +6278,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPaynow" ] @@ -5857,6 +6314,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebit" ] @@ -6019,6 +6482,16 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6591,6 +7064,28 @@ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6696,6 +7191,28 @@ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class UpdateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6760,6 +7277,16 @@ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -6796,6 +7323,16 @@ class UpdateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class UpdateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class UpdateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -6924,6 +7461,16 @@ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class UpdateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 9f22c9806..200e09f7e 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -775,6 +775,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", @@ -1678,7 +1679,7 @@ class ModifyParams(RequestOptions): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -2430,6 +2431,7 @@ class RetrieveParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 3ff76553a..0121889d8 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -116,6 +116,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", @@ -1021,7 +1022,7 @@ class UpdateParams(TypedDict): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 992ccf063..bcbc2a95c 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -69,6 +69,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -981,6 +984,9 @@ class Networks(StripeObject): """ _inner_class_types = {"networks": Networks} + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): class Dob(StripeObject): day: Optional[int] @@ -1005,6 +1011,41 @@ class Dob(StripeObject): class Konbini(StripeObject): pass + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): email: Optional[str] """ @@ -1021,6 +1062,12 @@ class Mobilepay(StripeObject): class Multibanco(StripeObject): pass + class NaverPay(StripeObject): + funding: Literal["card", "points"] + """ + Whether to fund this transaction with Naver Pay points or a card. + """ + class Oxxo(StripeObject): pass @@ -1059,6 +1106,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class Payco(StripeObject): + pass + class Paynow(StripeObject): pass @@ -1088,6 +1138,9 @@ class RadarOptions(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + pass + class SepaDebit(StripeObject): class GeneratedFrom(StripeObject): charge: Optional[ExpandableField["Charge"]] @@ -1268,6 +1321,10 @@ class CreateParams(RequestOptions): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentMethod.CreateParamsAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired["PaymentMethod.CreateParamsAmazonPay"] """ If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. @@ -1346,6 +1403,10 @@ class CreateParams(RequestOptions): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired["PaymentMethod.CreateParamsKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["PaymentMethod.CreateParamsKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -1354,6 +1415,10 @@ class CreateParams(RequestOptions): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["PaymentMethod.CreateParamsKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentMethod.CreateParamsLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -1370,6 +1435,10 @@ class CreateParams(RequestOptions): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired["PaymentMethod.CreateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentMethod.CreateParamsOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -1378,6 +1447,10 @@ class CreateParams(RequestOptions): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentMethod.CreateParamsPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ payment_method: NotRequired[str] """ The PaymentMethod to share. @@ -1406,6 +1479,10 @@ class CreateParams(RequestOptions): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired["PaymentMethod.CreateParamsSamsungPay"] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit"] """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -1428,6 +1505,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1442,18 +1520,23 @@ class CreateParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1502,6 +1585,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAlma(TypedDict): + pass + class CreateParamsAmazonPay(TypedDict): pass @@ -1721,12 +1807,15 @@ class CreateParamsIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsInteracPresent(TypedDict): pass + class CreateParamsKakaoPay(TypedDict): + pass + class CreateParamsKlarna(TypedDict): dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob"] """ @@ -1750,6 +1839,9 @@ class CreateParamsKlarnaDob(TypedDict): class CreateParamsKonbini(TypedDict): pass + class CreateParamsKrCard(TypedDict): + pass + class CreateParamsLink(TypedDict): pass @@ -1759,6 +1851,12 @@ class CreateParamsMobilepay(TypedDict): class CreateParamsMultibanco(TypedDict): pass + class CreateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsOxxo(TypedDict): pass @@ -1797,6 +1895,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayco(TypedDict): + pass + class CreateParamsPaynow(TypedDict): pass @@ -1818,6 +1919,9 @@ class CreateParamsRadarOptions(TypedDict): class CreateParamsRevolutPay(TypedDict): pass + class CreateParamsSamsungPay(TypedDict): + pass + class CreateParamsSepaDebit(TypedDict): iban: str """ @@ -1897,6 +2001,7 @@ class ListParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1911,18 +2016,23 @@ class ListParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1965,6 +2075,10 @@ class ModifyParams(RequestOptions): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ + naver_pay: NotRequired["PaymentMethod.ModifyParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ us_bank_account: NotRequired["PaymentMethod.ModifyParamsUsBankAccount"] """ If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. @@ -2041,6 +2155,12 @@ class ModifyParamsCardNetworks(TypedDict): class ModifyParamsLink(TypedDict): pass + class ModifyParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ @@ -2065,6 +2185,7 @@ class RetrieveParams(RequestOptions): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -2094,8 +2215,10 @@ class RetrieveParams(RequestOptions): """ ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] livemode: bool """ @@ -2107,12 +2230,14 @@ class RetrieveParams(RequestOptions): """ mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] object: Literal["payment_method"] """ String representing the object's type. Objects of the same type share the same value. """ oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] @@ -2122,6 +2247,7 @@ class RetrieveParams(RequestOptions): Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. """ revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -2131,6 +2257,7 @@ class RetrieveParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2147,18 +2274,23 @@ class RetrieveParams(RequestOptions): "grabpay", "ideal", "interac_present", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2635,6 +2767,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -2652,19 +2785,24 @@ async def retrieve_async( "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "radar_options": RadarOptions, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 033ac855a..4630c094e 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -125,6 +125,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Alma(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class AmazonPay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -938,6 +960,10 @@ class CreateParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfiguration.CreateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfiguration.CreateParamsAmazonPay" ] @@ -1118,7 +1144,7 @@ class CreateParams(RequestOptions): "PaymentMethodConfiguration.CreateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfiguration.CreateParamsWechatPay" @@ -1187,6 +1213,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAmazonPayDisplayPreference" @@ -1752,6 +1792,10 @@ class ModifyParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfiguration.ModifyParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAmazonPay" ] @@ -1928,7 +1972,7 @@ class ModifyParams(RequestOptions): "PaymentMethodConfiguration.ModifyParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfiguration.ModifyParamsWechatPay" @@ -1997,6 +2041,20 @@ class ModifyParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class ModifyParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class ModifyParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class ModifyParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAmazonPayDisplayPreference" @@ -2529,6 +2587,7 @@ class RetrieveParams(RequestOptions): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] apple_pay: Optional[ApplePay] application: Optional[str] @@ -2735,6 +2794,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "apple_pay": ApplePay, "au_becs_debit": AuBecsDebit, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index d43649ab1..e0138a5ef 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -35,6 +35,10 @@ class CreateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfigurationService.CreateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfigurationService.CreateParamsAmazonPay" ] @@ -239,7 +243,7 @@ class CreateParams(TypedDict): "PaymentMethodConfigurationService.CreateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfigurationService.CreateParamsWechatPay" @@ -308,6 +312,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsAmazonPayDisplayPreference" @@ -883,6 +901,10 @@ class UpdateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfigurationService.UpdateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsAmazonPay" ] @@ -1083,7 +1105,7 @@ class UpdateParams(TypedDict): "PaymentMethodConfigurationService.UpdateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsWechatPay" @@ -1152,6 +1174,20 @@ class UpdateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class UpdateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class UpdateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class UpdateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsAmazonPayDisplayPreference" diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index 533bdf5ba..3fb016792 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -27,6 +27,23 @@ class PaymentMethodDomain( "payment_method_domain" ) + class AmazonPay(StripeObject): + class StatusDetails(StripeObject): + error_message: str + """ + The error message associated with the status of the payment method on the domain. + """ + + status: Literal["active", "inactive"] + """ + The status of the payment method on the domain. + """ + status_details: Optional[StatusDetails] + """ + Contains additional details about the status of a payment method for a specific payment method domain. + """ + _inner_class_types = {"status_details": StatusDetails} + class ApplePay(StripeObject): class StatusDetails(StripeObject): error_message: str @@ -157,6 +174,10 @@ class ValidateParams(RequestOptions): Specifies which fields in the response should be expanded. """ + amazon_pay: AmazonPay + """ + Indicates the status of a specific payment method on a payment method domain. + """ apple_pay: ApplePay """ Indicates the status of a specific payment method on a payment method domain. @@ -483,6 +504,7 @@ async def validate_async( # pyright: ignore[reportGeneralTypeIssues] ) _inner_class_types = { + "amazon_pay": AmazonPay, "apple_pay": ApplePay, "google_pay": GooglePay, "link": Link, diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 45c33c23e..741d1437b 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -45,6 +45,10 @@ class CreateParams(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentMethodService.CreateParamsAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired["PaymentMethodService.CreateParamsAmazonPay"] """ If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. @@ -125,6 +129,10 @@ class CreateParams(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired["PaymentMethodService.CreateParamsKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["PaymentMethodService.CreateParamsKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -133,6 +141,10 @@ class CreateParams(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["PaymentMethodService.CreateParamsKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentMethodService.CreateParamsLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -149,6 +161,10 @@ class CreateParams(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired["PaymentMethodService.CreateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentMethodService.CreateParamsOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -157,6 +173,10 @@ class CreateParams(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentMethodService.CreateParamsPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ payment_method: NotRequired[str] """ The PaymentMethod to share. @@ -187,6 +207,10 @@ class CreateParams(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired["PaymentMethodService.CreateParamsSamsungPay"] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired["PaymentMethodService.CreateParamsSepaDebit"] """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -209,6 +233,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -223,18 +248,23 @@ class CreateParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -285,6 +315,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAlma(TypedDict): + pass + class CreateParamsAmazonPay(TypedDict): pass @@ -504,12 +537,15 @@ class CreateParamsIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsInteracPresent(TypedDict): pass + class CreateParamsKakaoPay(TypedDict): + pass + class CreateParamsKlarna(TypedDict): dob: NotRequired["PaymentMethodService.CreateParamsKlarnaDob"] """ @@ -533,6 +569,9 @@ class CreateParamsKlarnaDob(TypedDict): class CreateParamsKonbini(TypedDict): pass + class CreateParamsKrCard(TypedDict): + pass + class CreateParamsLink(TypedDict): pass @@ -542,6 +581,12 @@ class CreateParamsMobilepay(TypedDict): class CreateParamsMultibanco(TypedDict): pass + class CreateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsOxxo(TypedDict): pass @@ -580,6 +625,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayco(TypedDict): + pass + class CreateParamsPaynow(TypedDict): pass @@ -601,6 +649,9 @@ class CreateParamsRadarOptions(TypedDict): class CreateParamsRevolutPay(TypedDict): pass + class CreateParamsSamsungPay(TypedDict): + pass + class CreateParamsSepaDebit(TypedDict): iban: str """ @@ -680,6 +731,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -694,18 +746,23 @@ class ListParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -754,6 +811,10 @@ class UpdateParams(TypedDict): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ + naver_pay: NotRequired["PaymentMethodService.UpdateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ us_bank_account: NotRequired[ "PaymentMethodService.UpdateParamsUsBankAccount" ] @@ -832,6 +893,12 @@ class UpdateParamsCardNetworks(TypedDict): class UpdateParamsLink(TypedDict): pass + class UpdateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ diff --git a/stripe/_person.py b/stripe/_person.py index 7082f215b..315874c14 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -588,7 +588,7 @@ class Document(StripeObject): """ gender: Optional[str] """ - The person's gender (International regulations require either "male" or "female"). + The person's gender. """ id: str """ diff --git a/stripe/_refund.py b/stripe/_refund.py index 6dae4382a..7a79cbe89 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -51,6 +51,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -227,6 +230,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_bank_transfer: Optional[AuBankTransfer] blik: Optional[Blik] @@ -262,6 +266,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_bank_transfer": AuBankTransfer, "blik": Blik, @@ -311,9 +316,6 @@ class EmailSent(StripeObject): _inner_class_types = {"email_sent": EmailSent} display_details: Optional[DisplayDetails] - """ - Contains the refund details. - """ type: str """ Type of the next action to perform. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index d9d8d570b..f5c5943e9 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -329,9 +329,15 @@ class Ideal(StripeObject): (if supported) at the time of authorization or settlement. They cannot be set or mutated. """ + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): pass + class KrCard(StripeObject): + pass + class Link(StripeObject): pass @@ -393,7 +399,9 @@ class UsBankAccount(StripeObject): card_present: Optional[CardPresent] cashapp: Optional[Cashapp] ideal: Optional[Ideal] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] + kr_card: Optional[KrCard] link: Optional[Link] paypal: Optional[Paypal] revolut_pay: Optional[RevolutPay] @@ -415,7 +423,9 @@ class UsBankAccount(StripeObject): "card_present": CardPresent, "cashapp": Cashapp, "ideal": Ideal, + "kakao_pay": KakaoPay, "klarna": Klarna, + "kr_card": KrCard, "link": Link, "paypal": Paypal, "revolut_pay": RevolutPay, diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index ed2da02a6..e55a0d367 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -765,6 +765,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -845,6 +849,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -855,6 +865,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -875,6 +891,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -883,6 +905,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -913,6 +939,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -936,6 +968,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -949,18 +982,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1012,6 +1050,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1197,12 +1238,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob"] """ @@ -1226,6 +1270,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -1235,6 +1282,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1273,6 +1326,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -1294,6 +1350,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -1901,6 +1960,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1981,6 +2044,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -1991,6 +2060,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.CreateParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -2011,6 +2084,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.CreateParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -2019,6 +2098,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -2049,6 +2132,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataSepaDebit" ] @@ -2072,6 +2161,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2085,18 +2175,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2148,6 +2243,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2333,12 +2431,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarnaDob"] """ @@ -2362,6 +2463,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -2371,6 +2475,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2409,6 +2519,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2430,6 +2543,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -3004,6 +3120,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAmazonPay" ] @@ -3084,6 +3204,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -3094,6 +3220,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -3114,6 +3244,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -3122,6 +3258,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -3152,6 +3292,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit" ] @@ -3175,6 +3321,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -3188,18 +3335,23 @@ class ModifyParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -3251,6 +3403,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAlma(TypedDict): + pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -3436,12 +3591,15 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob"] """ @@ -3465,6 +3623,9 @@ class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): class ModifyParamsPaymentMethodDataKonbini(TypedDict): pass + class ModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + class ModifyParamsPaymentMethodDataLink(TypedDict): pass @@ -3474,6 +3635,12 @@ class ModifyParamsPaymentMethodDataMobilepay(TypedDict): class ModifyParamsPaymentMethodDataMultibanco(TypedDict): pass + class ModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -3512,6 +3679,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayco(TypedDict): + pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3533,6 +3703,9 @@ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index d65aaa4b6..73cfb2e9e 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -138,6 +138,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -228,6 +234,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataKlarna" ] @@ -240,6 +252,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataLink" ] @@ -262,6 +280,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataOxxo" ] @@ -274,6 +298,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataPaynow" ] @@ -310,6 +340,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -339,6 +375,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -352,18 +389,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -417,6 +459,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -602,12 +647,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -633,6 +681,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -642,6 +693,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -680,6 +737,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -701,6 +761,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -1316,6 +1379,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1402,6 +1471,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataKlarna" ] @@ -1414,6 +1489,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataLink" ] @@ -1436,6 +1517,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataOxxo" ] @@ -1446,6 +1533,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataPaynow" ] @@ -1480,6 +1573,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -1509,6 +1608,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1522,18 +1622,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1585,6 +1690,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1770,12 +1878,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataKlarnaDob" @@ -1801,6 +1912,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -1810,6 +1924,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1848,6 +1968,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -1869,6 +1992,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -2461,6 +2587,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataAmazonPay" ] @@ -2547,6 +2679,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataKlarna" ] @@ -2559,6 +2697,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataLink" ] @@ -2581,6 +2725,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataOxxo" ] @@ -2591,6 +2741,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataPaynow" ] @@ -2625,6 +2781,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataSepaDebit" ] @@ -2654,6 +2816,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2667,18 +2830,23 @@ class UpdateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2730,6 +2898,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAlma(TypedDict): + pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2915,12 +3086,15 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataKlarnaDob" @@ -2946,6 +3120,9 @@ class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): class UpdateParamsPaymentMethodDataKonbini(TypedDict): pass + class UpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + class UpdateParamsPaymentMethodDataLink(TypedDict): pass @@ -2955,6 +3132,12 @@ class UpdateParamsPaymentMethodDataMobilepay(TypedDict): class UpdateParamsPaymentMethodDataMultibanco(TypedDict): pass + class UpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2993,6 +3176,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayco(TypedDict): + pass + class UpdateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3014,6 +3200,9 @@ class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 93c9edeb6..681c609b3 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -372,10 +372,15 @@ class Filters(StripeObject): "giropay", "grabpay", "ideal", + "jp_credit_transfer", + "kakao_pay", "konbini", + "kr_card", "link", "multibanco", + "naver_pay", "p24", + "payco", "paynow", "paypal", "promptpay", @@ -470,7 +475,7 @@ class CancelParams(RequestOptions): """ invoice_now: NotRequired[bool] """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. """ prorate: NotRequired[bool] """ @@ -922,7 +927,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -1758,7 +1763,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -2020,7 +2025,7 @@ class ModifyParamsTrialSettingsEndBehavior(TypedDict): class ResumeParams(RequestOptions): billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). """ expand: NotRequired[List[str]] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index adad3f820..b3160ca51 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -25,7 +25,7 @@ class CancelParams(TypedDict): """ invoice_now: NotRequired[bool] """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. """ prorate: NotRequired[bool] """ @@ -487,7 +487,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -893,7 +893,7 @@ class ListParamsCurrentPeriodStart(TypedDict): class ResumeParams(TypedDict): billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). """ expand: NotRequired[List[str]] """ @@ -1379,7 +1379,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 3c6ab718e..3cf29c0b2 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -89,6 +89,7 @@ class CreateParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -124,6 +125,8 @@ class CreateParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -147,15 +150,18 @@ class CreateParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -260,6 +266,7 @@ class RetrieveParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -295,6 +302,8 @@ class RetrieveParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -318,16 +327,19 @@ class RetrieveParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 87e07bc5b..1f6cf5c58 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -30,6 +30,7 @@ class CreateParams(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -65,6 +66,8 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -88,15 +91,18 @@ class CreateParams(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 8a19bb5d5..fa5efcfe8 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -4,6 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id from typing import ClassVar, Dict, List, Optional, cast @@ -23,6 +24,16 @@ class TaxRate( OBJECT_NAME: ClassVar[Literal["tax_rate"]] = "tax_rate" + class FlatAmount(StripeObject): + amount: int + """ + Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + currency: str + """ + Three-letter ISO currency code, in lowercase. + """ + class CreateParams(RequestOptions): active: NotRequired[bool] """ @@ -75,6 +86,7 @@ class CreateParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -176,6 +188,7 @@ class ModifyParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -217,6 +230,10 @@ class RetrieveParams(RequestOptions): this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. """ + flat_amount: Optional[FlatAmount] + """ + The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + """ id: str """ Unique identifier for the object. @@ -251,6 +268,10 @@ class RetrieveParams(RequestOptions): """ Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. """ + rate_type: Optional[Literal["flat_amount", "percentage"]] + """ + Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + """ state: Optional[str] """ [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. @@ -266,6 +287,7 @@ class RetrieveParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -400,3 +422,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"flat_amount": FlatAmount} diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index 61399dec6..b8de81f3b 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -62,6 +62,7 @@ class CreateParams(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -169,6 +170,7 @@ class UpdateParams(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/_token.py b/stripe/_token.py index 11558266a..03ef8faa1 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -349,7 +349,7 @@ class CreateParamsAccountIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1115,7 +1115,7 @@ class RetrieveParams(RequestOptions): def create(cls, **params: Unpack["Token.CreateParams"]) -> "Token": """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( "Token", @@ -1132,7 +1132,7 @@ async def create_async( ) -> "Token": """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( "Token", diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 9fe918393..30be56d21 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -320,7 +320,7 @@ class CreateParamsAccountIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1092,7 +1092,7 @@ def create( ) -> Token: """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( Token, @@ -1112,7 +1112,7 @@ async def create_async( ) -> Token: """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( Token, diff --git a/stripe/_usage_record_summary.py b/stripe/_usage_record_summary.py index fa46e82e3..2276bf95e 100644 --- a/stripe/_usage_record_summary.py +++ b/stripe/_usage_record_summary.py @@ -6,6 +6,10 @@ class UsageRecordSummary(StripeObject): + """ + A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. + """ + OBJECT_NAME: ClassVar[Literal["usage_record_summary"]] = ( "usage_record_summary" ) diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index bd4140848..d6200f448 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -135,6 +135,7 @@ class CreateParams(RequestOptions): "2024-04-10", "2024-06-20", "2024-09-30.acacia", + "2024-10-28.acacia", ] ] """ @@ -271,6 +272,7 @@ class CreateParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -314,6 +316,7 @@ class CreateParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", @@ -560,6 +563,7 @@ class ModifyParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -603,6 +607,7 @@ class ModifyParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index c29a6db8c..30bd28342 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -116,6 +116,7 @@ class CreateParams(TypedDict): "2024-04-10", "2024-06-20", "2024-09-30.acacia", + "2024-10-28.acacia", ] ] """ @@ -252,6 +253,7 @@ class CreateParams(TypedDict): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -295,6 +297,7 @@ class CreateParams(TypedDict): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", @@ -547,6 +550,7 @@ class UpdateParams(TypedDict): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -590,6 +594,7 @@ class UpdateParams(TypedDict): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index d91252dbf..03e1a5de3 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -19,7 +19,7 @@ class CreditBalanceSummary(SingletonAPIResource["CreditBalanceSummary"]): """ - Indicates the credit balance for credits granted to a customer. + Indicates the billing credit balance for billing credits granted to a customer. """ OBJECT_NAME: ClassVar[Literal["billing.credit_balance_summary"]] = ( @@ -44,7 +44,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -65,7 +65,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -95,11 +95,11 @@ class RetrieveParamsFilter(TypedDict): "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScope" ] """ - The credit applicability scope for which to fetch balance summary. + The billing credit applicability scope for which to fetch credit balance summary. """ credit_grant: NotRequired[str] """ - The credit grant for which to fetch balance summary. + The credit grant for which to fetch credit balance summary. """ type: Literal["applicability_scope", "credit_grant"] """ @@ -114,7 +114,7 @@ class RetrieveParamsFilterApplicabilityScope(TypedDict): balances: List[Balance] """ - The credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. """ customer: ExpandableField["Customer"] """ diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py index 045e093b0..096de2915 100644 --- a/stripe/billing/_credit_balance_summary_service.py +++ b/stripe/billing/_credit_balance_summary_service.py @@ -27,11 +27,11 @@ class RetrieveParamsFilter(TypedDict): "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScope" ] """ - The credit applicability scope for which to fetch balance summary. + The billing credit applicability scope for which to fetch credit balance summary. """ credit_grant: NotRequired[str] """ - The credit grant for which to fetch balance summary. + The credit grant for which to fetch credit balance summary. """ type: Literal["applicability_scope", "credit_grant"] """ diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py index ff8de6bad..712bd7f14 100644 --- a/stripe/billing/_credit_balance_transaction.py +++ b/stripe/billing/_credit_balance_transaction.py @@ -43,7 +43,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -72,24 +72,24 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} class CreditsApplied(StripeObject): invoice: ExpandableField["Invoice"] """ - The invoice to which the credits were applied. + The invoice to which the billing credits were applied. """ invoice_line_item: str """ - The invoice line item to which the credits were applied. + The invoice line item to which the billing credits were applied. """ amount: Amount credits_applied: Optional[CreditsApplied] """ - Details of how the credits were applied to an invoice. Only present if `type` is `credits_applied`. + Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. """ type: Literal["credits_applied", "credits_expired", "credits_voided"] """ @@ -138,19 +138,19 @@ class RetrieveParams(RequestOptions): """ credit: Optional[Credit] """ - Credit details for this balance transaction. Only present if type is `credit`. + Credit details for this credit balance transaction. Only present if type is `credit`. """ credit_grant: ExpandableField["CreditGrant"] """ - The credit grant associated with this balance transaction. + The credit grant associated with this credit balance transaction. """ debit: Optional[Debit] """ - Debit details for this balance transaction. Only present if type is `debit`. + Debit details for this credit balance transaction. Only present if type is `debit`. """ effective_at: int """ - The effective time of this balance transaction. + The effective time of this credit balance transaction. """ id: str """ @@ -170,7 +170,7 @@ class RetrieveParams(RequestOptions): """ type: Optional[Literal["credit", "debit"]] """ - The type of balance transaction (credit or debit). + The type of credit balance transaction (credit or debit). """ @classmethod diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 51858796d..29a9b52e7 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -28,7 +28,10 @@ class CreditGrant( UpdateableAPIResource["CreditGrant"], ): """ - A credit grant is a resource that records a grant of some credit to a customer. + A credit grant is an API resource that documents the allocation of some billing credits to a customer. + + Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + end """ OBJECT_NAME: ClassVar[Literal["billing.credit_grant"]] = ( @@ -52,7 +55,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -60,7 +63,7 @@ class ApplicabilityConfig(StripeObject): class Scope(StripeObject): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ scope: Scope @@ -81,11 +84,11 @@ class CreateParams(RequestOptions): """ customer: str """ - Id of the customer to whom the credit should be granted. + ID of the customer to whom the billing credits should be granted. """ effective_at: NotRequired[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -93,7 +96,7 @@ class CreateParams(RequestOptions): """ expires_at: NotRequired[int] """ - The time when the credit will expire. If not specified, the credit will never expire. + The time when the billing credits will expire. If not specified, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -101,7 +104,7 @@ class CreateParams(RequestOptions): """ name: NotRequired[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ class CreateParamsAmount(TypedDict): @@ -111,7 +114,7 @@ class CreateParamsAmount(TypedDict): """ type: Literal["monetary"] """ - Specify the type of this amount. We currently only support `monetary` credits. + Specify the type of this amount. We currently only support `monetary` billing credits. """ class CreateParamsAmountMonetary(TypedDict): @@ -171,7 +174,7 @@ class ModifyParams(RequestOptions): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -194,7 +197,7 @@ class VoidGrantParams(RequestOptions): applicability_config: ApplicabilityConfig category: Literal["paid", "promotional"] """ - The category of this credit grant. + The category of this credit grant. This is for tracking purposes and will not be displayed to the customer. """ created: int """ @@ -202,15 +205,15 @@ class VoidGrantParams(RequestOptions): """ customer: ExpandableField["Customer"] """ - Id of the customer to whom the credit was granted. + ID of the customer to whom the billing credits are granted. """ effective_at: Optional[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. + The time when the billing credits become effective i.e when they are eligible to be used. """ expires_at: Optional[int] """ - The time when the credit will expire. If not present, the credit will never expire. + The time when the billing credits will expire. If not present, the billing credits will never expire. """ id: str """ @@ -226,7 +229,7 @@ class VoidGrantParams(RequestOptions): """ name: Optional[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ object: Literal["billing.credit_grant"] """ diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index 011a189fb..904df9c2b 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -27,11 +27,11 @@ class CreateParams(TypedDict): """ customer: str """ - Id of the customer to whom the credit should be granted. + ID of the customer to whom the billing credits should be granted. """ effective_at: NotRequired[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -39,7 +39,7 @@ class CreateParams(TypedDict): """ expires_at: NotRequired[int] """ - The time when the credit will expire. If not specified, the credit will never expire. + The time when the billing credits will expire. If not specified, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -47,7 +47,7 @@ class CreateParams(TypedDict): """ name: NotRequired[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ class CreateParamsAmount(TypedDict): @@ -57,7 +57,7 @@ class CreateParamsAmount(TypedDict): """ type: Literal["monetary"] """ - Specify the type of this amount. We currently only support `monetary` credits. + Specify the type of this amount. We currently only support `monetary` billing credits. """ class CreateParamsAmountMonetary(TypedDict): @@ -123,7 +123,7 @@ class UpdateParams(TypedDict): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index e857a9950..bf7e3ec16 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -29,6 +29,8 @@ class Meter( ): """ A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + + Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) """ OBJECT_NAME: ClassVar[Literal["billing.meter"]] = "billing.meter" diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 41dd41f34..f42349e68 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -125,6 +125,21 @@ class Product(StripeObject): The product ID. """ + class ScheduleAtPeriodEnd(StripeObject): + class Condition(StripeObject): + type: Literal[ + "decreasing_item_amount", "shortening_interval" + ] + """ + The type of condition. + """ + + conditions: List[Condition] + """ + List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + """ + _inner_class_types = {"conditions": Condition} + default_allowed_updates: List[ Literal["price", "promotion_code", "quantity"] ] @@ -145,7 +160,11 @@ class Product(StripeObject): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. """ - _inner_class_types = {"products": Product} + schedule_at_period_end: Optional[ScheduleAtPeriodEnd] + _inner_class_types = { + "products": Product, + "schedule_at_period_end": ScheduleAtPeriodEnd, + } customer_update: CustomerUpdate invoice_history: InvoiceHistory @@ -173,7 +192,9 @@ class LoginPage(StripeObject): """ class CreateParams(RequestOptions): - business_profile: "Configuration.CreateParamsBusinessProfile" + business_profile: NotRequired[ + "Configuration.CreateParamsBusinessProfile" + ] """ The business information shown to customers in the portal. """ @@ -337,6 +358,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -348,6 +375,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -539,6 +584,12 @@ class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -550,6 +601,22 @@ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class ModifyParamsLoginPage(TypedDict): enabled: bool """ diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 9edf1db04..ae3a1e47c 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -11,7 +11,9 @@ class ConfigurationService(StripeService): class CreateParams(TypedDict): - business_profile: "ConfigurationService.CreateParamsBusinessProfile" + business_profile: NotRequired[ + "ConfigurationService.CreateParamsBusinessProfile" + ] """ The business information shown to customers in the portal. """ @@ -175,6 +177,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -186,6 +194,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -383,6 +409,12 @@ class UpdateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -394,6 +426,22 @@ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class UpdateParamsLoginPage(TypedDict): enabled: bool """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 66bbac645..d4fe136d1 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -348,6 +348,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -383,6 +384,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -406,16 +409,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -847,6 +853,22 @@ class Ideal(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KakaoPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Klarna(StripeObject): setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] @@ -877,6 +899,22 @@ class Konbini(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KrCard(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Link(StripeObject): setup_future_usage: Optional[Literal["none", "off_session"]] """ @@ -913,6 +951,12 @@ class Multibanco(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class NaverPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Oxxo(StripeObject): expires_after_days: int """ @@ -941,6 +985,12 @@ class P24(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Payco(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Paynow(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -995,6 +1045,12 @@ class RevolutPay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class SamsungPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class SepaDebit(StripeObject): setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] @@ -1101,17 +1157,22 @@ class Filters(StripeObject): giropay: Optional[Giropay] grabpay: Optional[Grabpay] ideal: Optional[Ideal] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1134,17 +1195,22 @@ class Filters(StripeObject): "giropay": Giropay, "grabpay": Grabpay, "ideal": Ideal, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -1828,6 +1894,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1842,18 +1909,23 @@ class CreateParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2589,6 +2661,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Ideal payment method options. """ + kakao_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ klarna: NotRequired["Session.CreateParamsPaymentMethodOptionsKlarna"] """ contains details about the Klarna payment method options. @@ -2597,6 +2675,10 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Konbini payment method options. """ + kr_card: NotRequired["Session.CreateParamsPaymentMethodOptionsKrCard"] + """ + contains details about the Korean card payment method options. + """ link: NotRequired["Session.CreateParamsPaymentMethodOptionsLink"] """ contains details about the Link payment method options. @@ -2613,6 +2695,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] """ contains details about the OXXO payment method options. @@ -2621,6 +2709,10 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the P24 payment method options. """ + payco: NotRequired["Session.CreateParamsPaymentMethodOptionsPayco"] + """ + contains details about the PAYCO payment method options. + """ paynow: NotRequired["Session.CreateParamsPaymentMethodOptionsPaynow"] """ contains details about the PayNow payment method options. @@ -2639,6 +2731,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the RevolutPay payment method options. """ + samsung_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -3007,6 +3105,18 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3035,6 +3145,18 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): setup_future_usage: NotRequired[Literal["none", "off_session"]] """ @@ -3071,6 +3193,18 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -3103,6 +3237,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3189,6 +3326,9 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 82d78f1be..c83951d3f 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -226,6 +226,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -240,18 +241,23 @@ class CreateParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1017,6 +1023,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Ideal payment method options. """ + kakao_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsKlarna" ] @@ -1029,6 +1041,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + contains details about the Korean card payment method options. + """ link: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsLink" ] @@ -1047,6 +1065,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ oxxo: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsOxxo" ] @@ -1057,6 +1081,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the P24 payment method options. """ + payco: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsPayco" + ] + """ + contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsPaynow" ] @@ -1079,6 +1109,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the RevolutPay payment method options. """ + samsung_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -1451,6 +1487,18 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1479,6 +1527,18 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): setup_future_usage: NotRequired[Literal["none", "off_session"]] """ @@ -1515,6 +1575,18 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -1547,6 +1619,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1633,6 +1708,9 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] diff --git a/stripe/forwarding/_request.py b/stripe/forwarding/_request.py index f371f380c..4fa54e14f 100644 --- a/stripe/forwarding/_request.py +++ b/stripe/forwarding/_request.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, Dict, List, Optional, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack @@ -98,6 +98,10 @@ class CreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ payment_method: str """ The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. @@ -197,6 +201,10 @@ class RetrieveParams(RequestOptions): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["forwarding.request"] """ String representing the object's type. Objects of the same type share the same value. diff --git a/stripe/forwarding/_request_service.py b/stripe/forwarding/_request_service.py index b9049a234..7b95f680d 100644 --- a/stripe/forwarding/_request_service.py +++ b/stripe/forwarding/_request_service.py @@ -5,7 +5,7 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.forwarding._request import Request -from typing import List, cast +from typing import Dict, List, cast from typing_extensions import Literal, NotRequired, TypedDict @@ -15,6 +15,10 @@ class CreateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ payment_method: str """ The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 37dc34817..f87a51c09 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -1211,7 +1211,7 @@ class CreateParams(RequestOptions): """ second_line: NotRequired["Literal['']|str"] """ - The second line to print on the card. + The second line to print on the card. Max length: 24 characters. """ shipping: NotRequired["Card.CreateParamsShipping"] """ @@ -3410,6 +3410,12 @@ class ShipCardParams(RequestOptions): Specifies which fields in the response should be expanded. """ + class SubmitCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + brand: str """ The brand of the card. @@ -4069,6 +4075,116 @@ async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_submit_card( + cls, card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + cls._static_request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def submit_card( + card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @overload + def submit_card( + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @class_method_variant("_cls_submit_card") + def submit_card( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + self.resource._request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_submit_card_async( + cls, card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + await cls._static_request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def submit_card_async( + card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @overload + async def submit_card_async( + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @class_method_variant("_cls_submit_card_async") + async def submit_card_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + await self.resource._request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + @property def test_helpers(self): return self.TestHelpers(self) diff --git a/stripe/issuing/_card_service.py b/stripe/issuing/_card_service.py index 3a0dcb9ff..06c07db93 100644 --- a/stripe/issuing/_card_service.py +++ b/stripe/issuing/_card_service.py @@ -48,7 +48,7 @@ class CreateParams(TypedDict): """ second_line: NotRequired["Literal['']|str"] """ - The second line to print on the card. + The second line to print on the card. Max length: 24 characters. """ shipping: NotRequired["CardService.CreateParamsShipping"] """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 07f6d8442..1e5f051eb 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -66,6 +66,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -101,6 +102,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -124,16 +127,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -235,6 +241,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -313,14 +320,32 @@ class TaxRateDetails(StripeObject): class TaxBreakdown(StripeObject): class TaxRateDetails(StripeObject): + class FlatAmount(StripeObject): + amount: int + """ + Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + currency: str + """ + Three-letter ISO currency code, in lowercase. + """ + country: Optional[str] """ Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ + flat_amount: Optional[FlatAmount] + """ + The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + """ percentage_decimal: str """ The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. """ + rate_type: Optional[Literal["flat_amount", "percentage"]] + """ + Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + """ state: Optional[str] """ State, county, province, or region. @@ -336,6 +361,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -344,6 +370,7 @@ class TaxRateDetails(StripeObject): """ The tax type, such as `vat` or `sales_tax`. """ + _inner_class_types = {"flat_amount": FlatAmount} amount: int """ @@ -482,6 +509,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -517,6 +545,8 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -540,15 +570,18 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index 376dd7a36..17f903b36 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -48,6 +48,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index cc367fc97..fbe7ec2ab 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -122,6 +122,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -157,6 +158,8 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -180,15 +183,18 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 43bcb69a7..f779ceb69 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -87,6 +87,12 @@ class Bh(StripeObject): Type of registration in `country`. """ + class By(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Ca(StripeObject): class ProvinceStandard(StripeObject): province: str @@ -119,6 +125,12 @@ class Co(StripeObject): Type of registration in `country`. """ + class Cr(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Cy(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -175,6 +187,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ec(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Ee(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -397,6 +415,18 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ma(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + + class Md(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Mt(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -503,6 +533,18 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Rs(StripeObject): + type: Literal["standard"] + """ + Type of registration in `country`. + """ + + class Ru(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Sa(StripeObject): type: Literal["simplified"] """ @@ -569,6 +611,12 @@ class Tr(StripeObject): Type of registration in `country`. """ + class Tz(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Us(StripeObject): class LocalAmusementTax(StripeObject): jurisdiction: str @@ -614,6 +662,7 @@ class Election(StripeObject): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -625,6 +674,12 @@ class Election(StripeObject): "state_sales_tax": StateSalesTax, } + class Uz(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Vn(StripeObject): type: Literal["simplified"] """ @@ -643,14 +698,17 @@ class Za(StripeObject): be: Optional[Be] bg: Optional[Bg] bh: Optional[Bh] + by: Optional[By] ca: Optional[Ca] ch: Optional[Ch] cl: Optional[Cl] co: Optional[Co] + cr: Optional[Cr] cy: Optional[Cy] cz: Optional[Cz] de: Optional[De] dk: Optional[Dk] + ec: Optional[Ec] ee: Optional[Ee] eg: Optional[Eg] es: Optional[Es] @@ -672,6 +730,8 @@ class Za(StripeObject): lt: Optional[Lt] lu: Optional[Lu] lv: Optional[Lv] + ma: Optional[Ma] + md: Optional[Md] mt: Optional[Mt] mx: Optional[Mx] my: Optional[My] @@ -683,6 +743,8 @@ class Za(StripeObject): pl: Optional[Pl] pt: Optional[Pt] ro: Optional[Ro] + rs: Optional[Rs] + ru: Optional[Ru] sa: Optional[Sa] se: Optional[Se] sg: Optional[Sg] @@ -690,7 +752,9 @@ class Za(StripeObject): sk: Optional[Sk] th: Optional[Th] tr: Optional[Tr] + tz: Optional[Tz] us: Optional[Us] + uz: Optional[Uz] vn: Optional[Vn] za: Optional[Za] _inner_class_types = { @@ -700,14 +764,17 @@ class Za(StripeObject): "be": Be, "bg": Bg, "bh": Bh, + "by": By, "ca": Ca, "ch": Ch, "cl": Cl, "co": Co, + "cr": Cr, "cy": Cy, "cz": Cz, "de": De, "dk": Dk, + "ec": Ec, "ee": Ee, "eg": Eg, "es": Es, @@ -729,6 +796,8 @@ class Za(StripeObject): "lt": Lt, "lu": Lu, "lv": Lv, + "ma": Ma, + "md": Md, "mt": Mt, "mx": Mx, "my": My, @@ -740,6 +809,8 @@ class Za(StripeObject): "pl": Pl, "pt": Pt, "ro": Ro, + "rs": Rs, + "ru": Ru, "sa": Sa, "se": Se, "sg": Sg, @@ -747,7 +818,9 @@ class Za(StripeObject): "sk": Sk, "th": Th, "tr": Tr, + "tz": Tz, "us": Us, + "uz": Uz, "vn": Vn, "za": Za, } @@ -805,6 +878,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in BH. """ + by: NotRequired["Registration.CreateParamsCountryOptionsBy"] + """ + Options for the registration in BY. + """ ca: NotRequired["Registration.CreateParamsCountryOptionsCa"] """ Options for the registration in CA. @@ -821,6 +898,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in CO. """ + cr: NotRequired["Registration.CreateParamsCountryOptionsCr"] + """ + Options for the registration in CR. + """ cy: NotRequired["Registration.CreateParamsCountryOptionsCy"] """ Options for the registration in CY. @@ -837,6 +918,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in DK. """ + ec: NotRequired["Registration.CreateParamsCountryOptionsEc"] + """ + Options for the registration in EC. + """ ee: NotRequired["Registration.CreateParamsCountryOptionsEe"] """ Options for the registration in EE. @@ -917,6 +1002,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in LV. """ + ma: NotRequired["Registration.CreateParamsCountryOptionsMa"] + """ + Options for the registration in MA. + """ + md: NotRequired["Registration.CreateParamsCountryOptionsMd"] + """ + Options for the registration in MD. + """ mt: NotRequired["Registration.CreateParamsCountryOptionsMt"] """ Options for the registration in MT. @@ -961,6 +1054,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in RO. """ + rs: NotRequired["Registration.CreateParamsCountryOptionsRs"] + """ + Options for the registration in RS. + """ + ru: NotRequired["Registration.CreateParamsCountryOptionsRu"] + """ + Options for the registration in RU. + """ sa: NotRequired["Registration.CreateParamsCountryOptionsSa"] """ Options for the registration in SA. @@ -989,10 +1090,18 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TR. """ + tz: NotRequired["Registration.CreateParamsCountryOptionsTz"] + """ + Options for the registration in TZ. + """ us: NotRequired["Registration.CreateParamsCountryOptionsUs"] """ Options for the registration in US. """ + uz: NotRequired["Registration.CreateParamsCountryOptionsUz"] + """ + Options for the registration in UZ. + """ vn: NotRequired["Registration.CreateParamsCountryOptionsVn"] """ Options for the registration in VN. @@ -1074,6 +1183,12 @@ class CreateParamsCountryOptionsBh(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsBy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCa(TypedDict): province_standard: NotRequired[ "Registration.CreateParamsCountryOptionsCaProvinceStandard" @@ -1110,6 +1225,12 @@ class CreateParamsCountryOptionsCo(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsCr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCy(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsCyStandard" @@ -1182,6 +1303,12 @@ class CreateParamsCountryOptionsDkStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsEc(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsEe(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsEeStandard" @@ -1452,6 +1579,18 @@ class CreateParamsCountryOptionsLvStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsMa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsMd(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsMt(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsMtStandard" @@ -1578,6 +1717,18 @@ class CreateParamsCountryOptionsRoStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsRs(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsRu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsSa(TypedDict): type: Literal["simplified"] """ @@ -1656,6 +1807,12 @@ class CreateParamsCountryOptionsTr(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsTz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUs(TypedDict): local_amusement_tax: NotRequired[ "Registration.CreateParamsCountryOptionsUsLocalAmusementTax" @@ -1683,6 +1840,7 @@ class CreateParamsCountryOptionsUs(TypedDict): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -1723,6 +1881,12 @@ class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): The type of the election for the state sales tax registration. """ + class CreateParamsCountryOptionsUz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index fd7ccda89..86c979db5 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -66,6 +66,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in BH. """ + by: NotRequired["RegistrationService.CreateParamsCountryOptionsBy"] + """ + Options for the registration in BY. + """ ca: NotRequired["RegistrationService.CreateParamsCountryOptionsCa"] """ Options for the registration in CA. @@ -82,6 +86,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in CO. """ + cr: NotRequired["RegistrationService.CreateParamsCountryOptionsCr"] + """ + Options for the registration in CR. + """ cy: NotRequired["RegistrationService.CreateParamsCountryOptionsCy"] """ Options for the registration in CY. @@ -98,6 +106,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in DK. """ + ec: NotRequired["RegistrationService.CreateParamsCountryOptionsEc"] + """ + Options for the registration in EC. + """ ee: NotRequired["RegistrationService.CreateParamsCountryOptionsEe"] """ Options for the registration in EE. @@ -178,6 +190,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in LV. """ + ma: NotRequired["RegistrationService.CreateParamsCountryOptionsMa"] + """ + Options for the registration in MA. + """ + md: NotRequired["RegistrationService.CreateParamsCountryOptionsMd"] + """ + Options for the registration in MD. + """ mt: NotRequired["RegistrationService.CreateParamsCountryOptionsMt"] """ Options for the registration in MT. @@ -222,6 +242,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in RO. """ + rs: NotRequired["RegistrationService.CreateParamsCountryOptionsRs"] + """ + Options for the registration in RS. + """ + ru: NotRequired["RegistrationService.CreateParamsCountryOptionsRu"] + """ + Options for the registration in RU. + """ sa: NotRequired["RegistrationService.CreateParamsCountryOptionsSa"] """ Options for the registration in SA. @@ -250,10 +278,18 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TR. """ + tz: NotRequired["RegistrationService.CreateParamsCountryOptionsTz"] + """ + Options for the registration in TZ. + """ us: NotRequired["RegistrationService.CreateParamsCountryOptionsUs"] """ Options for the registration in US. """ + uz: NotRequired["RegistrationService.CreateParamsCountryOptionsUz"] + """ + Options for the registration in UZ. + """ vn: NotRequired["RegistrationService.CreateParamsCountryOptionsVn"] """ Options for the registration in VN. @@ -335,6 +371,12 @@ class CreateParamsCountryOptionsBh(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsBy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCa(TypedDict): province_standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsCaProvinceStandard" @@ -371,6 +413,12 @@ class CreateParamsCountryOptionsCo(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsCr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCy(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsCyStandard" @@ -443,6 +491,12 @@ class CreateParamsCountryOptionsDkStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsEc(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsEe(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsEeStandard" @@ -713,6 +767,18 @@ class CreateParamsCountryOptionsLvStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsMa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsMd(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsMt(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsMtStandard" @@ -839,6 +905,18 @@ class CreateParamsCountryOptionsRoStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsRs(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsRu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsSa(TypedDict): type: Literal["simplified"] """ @@ -917,6 +995,12 @@ class CreateParamsCountryOptionsTr(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsTz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUs(TypedDict): local_amusement_tax: NotRequired[ "RegistrationService.CreateParamsCountryOptionsUsLocalAmusementTax" @@ -944,6 +1028,7 @@ class CreateParamsCountryOptionsUs(TypedDict): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -984,6 +1069,12 @@ class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): The type of the election for the state sales tax registration. """ + class CreateParamsCountryOptionsUz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 8711f8d18..3b4a299ba 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -66,6 +66,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -101,6 +102,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -124,16 +127,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -241,6 +247,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 84a7dda32..9982e73d4 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -219,6 +219,20 @@ class Nzd(StripeObject): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class Pln(StripeObject): + fixed_amounts: Optional[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: Optional[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: Optional[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class Sek(StripeObject): fixed_amounts: Optional[List[int]] """ @@ -272,6 +286,7 @@ class Usd(StripeObject): myr: Optional[Myr] nok: Optional[Nok] nzd: Optional[Nzd] + pln: Optional[Pln] sek: Optional[Sek] sgd: Optional[Sgd] usd: Optional[Usd] @@ -287,6 +302,7 @@ class Usd(StripeObject): "myr": Myr, "nok": Nok, "nzd": Nzd, + "pln": Pln, "sek": Sek, "sgd": Sgd, "usd": Usd, @@ -405,6 +421,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["Configuration.CreateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["Configuration.CreateParamsTippingSek"] """ Tipping configuration for SEK @@ -572,6 +592,20 @@ class CreateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class CreateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class CreateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -760,6 +794,10 @@ class ModifyParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["Configuration.ModifyParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["Configuration.ModifyParamsTippingSek"] """ Tipping configuration for SEK @@ -927,6 +965,20 @@ class ModifyParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class ModifyParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class ModifyParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index a47d12507..ab58a57db 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -127,6 +127,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["ConfigurationService.CreateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["ConfigurationService.CreateParamsTippingSek"] """ Tipping configuration for SEK @@ -294,6 +298,20 @@ class CreateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class CreateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class CreateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -492,6 +510,10 @@ class UpdateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["ConfigurationService.UpdateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["ConfigurationService.UpdateParamsTippingSek"] """ Tipping configuration for SEK @@ -659,6 +681,20 @@ class UpdateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class UpdateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class UpdateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index c52789f0a..d9eceea8e 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -69,6 +69,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -159,6 +165,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarna" ] @@ -171,6 +183,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataLink" ] @@ -193,6 +211,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataOxxo" ] @@ -205,6 +229,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataPaynow" ] @@ -241,6 +271,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -270,6 +306,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -283,18 +320,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -348,6 +390,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -533,12 +578,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarnaDob" @@ -564,6 +612,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -573,6 +624,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -611,6 +668,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -632,6 +692,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/test_helpers/issuing/_card_service.py b/stripe/test_helpers/issuing/_card_service.py index 5add490c4..ede80012f 100644 --- a/stripe/test_helpers/issuing/_card_service.py +++ b/stripe/test_helpers/issuing/_card_service.py @@ -33,6 +33,12 @@ class ShipCardParams(TypedDict): Specifies which fields in the response should be expanded. """ + class SubmitCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + def deliver_card( self, card: str, @@ -208,3 +214,47 @@ async def ship_card_async( options=options, ), ) + + def submit_card( + self, + card: str, + params: "CardService.SubmitCardParams" = {}, + options: RequestOptions = {}, + ) -> Card: + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + Card, + self._request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def submit_card_async( + self, + card: str, + params: "CardService.SubmitCardParams" = {}, + options: RequestOptions = {}, + ) -> Card: + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + Card, + await self._request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 3afd750e4..f4ba9cc49 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -761,7 +761,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): """ status: Literal["closed", "open"] """ - The enum specifying what state the account is in. + Status of this FinancialAccount. """ status_details: StatusDetails supported_currencies: List[str] diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index d8a2170e1..73418d2cf 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -7,4 +7,5 @@ from stripe.v2._billing_service import BillingService as BillingService from stripe.v2._core_service import CoreService as CoreService from stripe.v2._event import Event as Event +from stripe.v2._event_destination import EventDestination as EventDestination # The end of the section generated from our OpenAPI spec diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py index 96c4a6f2e..f8e6b1dad 100644 --- a/stripe/v2/_core_service.py +++ b/stripe/v2/_core_service.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_service import StripeService +from stripe.v2.core._event_destination_service import EventDestinationService from stripe.v2.core._event_service import EventService class CoreService(StripeService): def __init__(self, requestor): super().__init__(requestor) + self.event_destinations = EventDestinationService(self._requestor) self.events = EventService(self._requestor) diff --git a/stripe/v2/_event_destination.py b/stripe/v2/_event_destination.py new file mode 100644 index 000000000..1490f0c71 --- /dev/null +++ b/stripe/v2/_event_destination.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Dict, List, Optional +from typing_extensions import Literal + + +class EventDestination(StripeObject): + OBJECT_NAME: ClassVar[Literal["v2.core.event_destination"]] = ( + "v2.core.event_destination" + ) + + class StatusDetails(StripeObject): + class Disabled(StripeObject): + reason: Literal["no_aws_event_source_exists", "user"] + """ + Reason event destination has been disabled. + """ + + disabled: Optional[Disabled] + """ + Details about why the event destination has been disabled. + """ + _inner_class_types = {"disabled": Disabled} + + class AmazonEventbridge(StripeObject): + aws_account_id: str + """ + The AWS account ID. + """ + aws_event_source_arn: str + """ + The ARN of the AWS event source. + """ + aws_event_source_status: Literal[ + "active", "deleted", "pending", "unknown" + ] + """ + The state of the AWS event source. + """ + + class WebhookEndpoint(StripeObject): + signing_secret: Optional[str] + """ + The signing secret of the webhook endpoint, only includable on creation. + """ + url: Optional[str] + """ + The URL of the webhook endpoint, includable. + """ + + created: str + """ + Time at which the object was created. + """ + description: str + """ + An optional description of what the event destination is used for. + """ + enabled_events: List[str] + """ + The list of events to enable for this endpoint. + """ + event_payload: Literal["snapshot", "thin"] + """ + Payload type of events being subscribed to. + """ + events_from: Optional[List[Literal["other_accounts", "self"]]] + """ + Where events should be routed from. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[Dict[str, str]] + """ + Metadata. + """ + name: str + """ + Event destination name. + """ + object: Literal["v2.core.event_destination"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + snapshot_api_version: Optional[str] + """ + If using the snapshot event payload, the API version events are rendered as. + """ + status: Literal["disabled", "enabled"] + """ + Status. It can be set to either enabled or disabled. + """ + status_details: Optional[StatusDetails] + """ + Additional information about event destination status. + """ + type: Literal["amazon_eventbridge", "webhook_endpoint"] + """ + Event destination type. + """ + updated: str + """ + Time at which the object was last updated. + """ + amazon_eventbridge: Optional[AmazonEventbridge] + """ + Amazon EventBridge configuration. + """ + webhook_endpoint: Optional[WebhookEndpoint] + """ + Webhook endpoint configuration. + """ + _inner_class_types = { + "status_details": StatusDetails, + "amazon_eventbridge": AmazonEventbridge, + "webhook_endpoint": WebhookEndpoint, + } diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index 5879a6c60..14173e719 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -1,3 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2.core._event_destination_service import ( + EventDestinationService as EventDestinationService, +) from stripe.v2.core._event_service import EventService as EventService diff --git a/stripe/v2/core/_event_destination_service.py b/stripe/v2/core/_event_destination_service.py new file mode 100644 index 000000000..bb888184e --- /dev/null +++ b/stripe/v2/core/_event_destination_service.py @@ -0,0 +1,478 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.v2._event import Event +from stripe.v2._event_destination import EventDestination +from stripe.v2._list_object import ListObject +from typing import Dict, List, Optional, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationService(StripeService): + class CreateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: List[str] + """ + The list of events to enable for this endpoint. + """ + event_payload: Literal["snapshot", "thin"] + """ + Payload type of events being subscribed to. + """ + events_from: NotRequired[List[Literal["other_accounts", "self"]]] + """ + Where events should be routed from. + """ + include: NotRequired[ + List[ + Literal[ + "webhook_endpoint.signing_secret", "webhook_endpoint.url" + ] + ] + ] + """ + Additional fields to include in the response. + """ + metadata: NotRequired[Dict[str, str]] + """ + Metadata. + """ + name: str + """ + Event destination name. + """ + snapshot_api_version: NotRequired[str] + """ + If using the snapshot event payload, the API version events are rendered as. + """ + type: Literal["amazon_eventbridge", "webhook_endpoint"] + """ + Event destination type. + """ + amazon_eventbridge: NotRequired[ + "EventDestinationService.CreateParamsAmazonEventbridge" + ] + """ + Amazon EventBridge configuration. + """ + webhook_endpoint: NotRequired[ + "EventDestinationService.CreateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + class CreateParamsAmazonEventbridge(TypedDict): + aws_account_id: str + """ + The AWS account ID. + """ + aws_region: str + """ + The region of the AWS event source. + """ + + class CreateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ + + class DeleteParams(TypedDict): + pass + + class DisableParams(TypedDict): + pass + + class EnableParams(TypedDict): + pass + + class ListParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + limit: NotRequired[int] + """ + The page size. + """ + page: NotRequired[str] + """ + The requested page. + """ + + class PingParams(TypedDict): + pass + + class RetrieveParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. + """ + + class UpdateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: NotRequired[List[str]] + """ + The list of events to enable for this endpoint. + """ + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Metadata. + """ + name: NotRequired[str] + """ + Event destination name. + """ + webhook_endpoint: NotRequired[ + "EventDestinationService.UpdateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + class UpdateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ + + def create( + self, + params: "EventDestinationService.CreateParams", + options: RequestOptions = {}, + ) -> EventDestination: + """ + Create a new event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "EventDestinationService.CreateParams", + options: RequestOptions = {}, + ) -> EventDestination: + """ + Create a new event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + def delete( + self, + id: str, + params: "EventDestinationService.DeleteParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Delete an event destination. + """ + return cast( + EventDestination, + self._request( + "delete", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def delete_async( + self, + id: str, + params: "EventDestinationService.DeleteParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Delete an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "delete", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def disable( + self, + id: str, + params: "EventDestinationService.DisableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Disable an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}/disable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def disable_async( + self, + id: str, + params: "EventDestinationService.DisableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Disable an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/disable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def enable( + self, + id: str, + params: "EventDestinationService.EnableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Enable an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def enable_async( + self, + id: str, + params: "EventDestinationService.EnableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Enable an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def list( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + self._request( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + await self._request_async( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + def ping( + self, + id: str, + params: "EventDestinationService.PingParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Send a `ping` event to an event destination. + """ + return cast( + Event, + self._request( + "post", + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def ping_async( + self, + id: str, + params: "EventDestinationService.PingParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Send a `ping` event to an event destination. + """ + return cast( + Event, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "EventDestinationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Retrieves the details of an event destination. + """ + return cast( + EventDestination, + self._request( + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "EventDestinationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Retrieves the details of an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + params: "EventDestinationService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Update the details of an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + params: "EventDestinationService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Update the details of an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py index 999fe8471..712685824 100644 --- a/stripe/v2/core/_event_service.py +++ b/stripe/v2/core/_event_service.py @@ -21,7 +21,7 @@ class ListParams(TypedDict): """ page: NotRequired[str] """ - The requested page number. + The requested page. """ class RetrieveParams(TypedDict): From 7c3a43d72772643aa69517ac173d77e97aa0d4ce Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 29 Oct 2024 14:17:35 -0700 Subject: [PATCH 4/4] Bump version to 11.2.0 --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89347ffc..74c4b3e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +## 11.2.0 - 2024-10-29 +* [#1411](https://github.com/stripe/stripe-python/pull/1411) Update generated code + * Add support for resource `stripe.v2.EventDestinations` + * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` + * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities` + * Add support for `groups` on parameter class `stripe.Account.CreateParams` and resource `stripe.Account` + * Add support for `disable_stripe_user_authentication` on resource classes `stripe.AccountSession.Components.AccountManagement.Features`, `stripe.AccountSession.Components.AccountOnboarding.Features`, `stripe.AccountSession.Components.Balances.Features`, `stripe.AccountSession.Components.NotificationBanner.Features`, and `stripe.AccountSession.Components.Payouts.Features` and parameter classes `stripe.AccountSession.CreateParamsComponentsAccountManagementFeatures`, `stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeatures`, `stripe.AccountSession.CreateParamsComponentsBalancesFeatures`, `stripe.AccountSession.CreateParamsComponentsNotificationBannerFeatures`, and `stripe.AccountSession.CreateParamsComponentsPayoutsFeatures` + * Add support for `alma` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.Refund.DestinationDetails`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration` + * Add support for `kakao_pay`, `kr_card` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.Mandate.PaymentMethodDetails`, `stripe.PaymentIntent.PaymentMethodOptions`, `stripe.SetupAttempt.PaymentMethodDetails`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `naver_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `payco`, `samsung_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `enhanced_evidence` on resource class `stripe.Dispute.Evidence` and parameter class `stripe.Dispute.ModifyParamsEvidence` + * Add support for `enhanced_eligibility` on resource class `stripe.Dispute.EvidenceDetails` + * Add support for `enhanced_eligibility_types` on resource `stripe.Dispute` + * Add support for `automatically_finalizes_at` on parameter classes `stripe.Invoice.CreateParams` and `stripe.Invoice.ModifyParams` + * Add support for `amazon_pay` on resource `stripe.PaymentMethodDomain` + * Add support for `flat_amount`, `rate_type` on resource `stripe.TaxRate` and resource class `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails` + * Add support for `schedule_at_period_end` on parameter classes `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` and `stripe.billing_portal.Configuration.ModifyParamsFeaturesSubscriptionUpdate` and resource class `stripe.billing_portal.Configuration.Features.SubscriptionUpdate` + * Add support for `metadata` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request` + * Add support for `_cls_submit_card` on resource `stripe.issuing.Card` + * Add support for `submit_card` on resource `stripe.issuing.Card` + * Add support for `by`, `cr`, `ec`, `ma`, `md`, `rs`, `ru`, `tz`, `uz` on resource class `stripe.tax.Registration.CountryOptions` and parameter class `stripe.tax.Registration.CreateParamsCountryOptions` + * Add support for `pln` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping` + * Change type of `business_profile` on `stripe.billing_portal.Configuration.CreateParams` from `Configuration.CreateParamsBusinessProfile` to `NotRequired[Configuration.CreateParamsBusinessProfile]` + * Add support for `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, `uz_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, `stripe.PaymentLink.ModifyParams.payment_method_types`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `samsung_pay` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `auto` on enum `stripe.Customer.ModifyParamsTax.validate_location` + * Add support for `issuing_transaction.purchase_details_receipt_updated`, `refund.failed` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `jp_credit_transfer` on enums `stripe.Invoice.PaymentSettings.payment_method_types`, `stripe.Invoice.CreateParamsPaymentSettings.payment_method_types`, `stripe.Invoice.ModifyParamsPaymentSettings.payment_method_types`, `stripe.Subscription.PaymentSettings.payment_method_types`, `stripe.Subscription.CreateParamsPaymentSettings.payment_method_types`, and `stripe.Subscription.ModifyParamsPaymentSettings.payment_method_types` + * Add support for `retail_delivery_fee` on enums `stripe.Invoice.AddLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.Invoice.UpdateLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.InvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_type`, `stripe.tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.CalculationLineItem.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.TaxRate.tax_type`, `stripe.TaxRate.CreateParams.tax_type`, and `stripe.TaxRate.ModifyParams.tax_type` + * Add support for `state_retail_delivery_fee` on enums `stripe.tax.Registration.CountryOptions.Us.type` and `stripe.tax.Registration.CreateParamsCountryOptionsUs.type` + * Add support for `2024-10-28.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version` + ## 11.1.1 - 2024-10-18 * [#1414](https://github.com/stripe/stripe-python/pull/1414) Deserialize into correct v2 EventData types * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent` diff --git a/VERSION b/VERSION index 668182d21..b85c6c7b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.1 +11.2.0 diff --git a/stripe/_version.py b/stripe/_version.py index 043e1f3c1..00a5f7802 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.1.1" +VERSION = "11.2.0"