From fa25f2471e981e7f6ba633267a0e4abc81586766 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 15:19:43 -0700 Subject: [PATCH 1/6] Update generated code (#1836) * Update generated code for v2323 and 1f0a7866ce5b5e12153c09a04349f91486b17d95 * Update generated code for v2324 and 6012b623b1c09ad54d466947da04511a042ee45a --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_api_version.py | 2 +- stripe/_balance_transaction.py | 11 ++-- stripe/_balance_transaction_service.py | 8 +-- stripe/_charge.py | 20 ++++++- stripe/_confirmation_token.py | 15 ++++- stripe/_credit_note.py | 4 ++ stripe/_credit_note_service.py | 4 ++ stripe/_dispute.py | 24 +++++++- stripe/_event.py | 12 ++-- stripe/_invoice.py | 6 ++ stripe/_payment_attempt_record.py | 18 +++--- stripe/_payment_intent.py | 37 ++++++++++++- stripe/_payment_method.py | 15 ++++- stripe/_payment_record.py | 18 +++--- stripe/_setup_attempt.py | 15 ++++- stripe/_setup_intent.py | 5 ++ stripe/_subscription.py | 41 +++++++++++--- stripe/_subscription_service.py | 4 +- stripe/checkout/_session.py | 40 ++++++++++++++ ...erchant_capability_status_updated_event.py | 1 + stripe/financial_connections/_account.py | 22 ++++++++ stripe/identity/_verification_session.py | 2 +- stripe/params/__init__.py | 55 +++++++++++++++++++ stripe/params/_account_create_params.py | 2 +- stripe/params/_account_update_params.py | 2 +- .../_balance_transaction_list_params.py | 2 +- .../_confirmation_token_create_params.py | 2 +- stripe/params/_credit_note_create_params.py | 2 +- .../_credit_note_preview_lines_list_params.py | 2 +- .../_credit_note_preview_lines_params.py | 2 +- stripe/params/_credit_note_preview_params.py | 2 +- stripe/params/_dispute_modify_params.py | 15 +++++ stripe/params/_dispute_update_params.py | 15 +++++ stripe/params/_invoice_add_lines_params.py | 2 +- stripe/params/_invoice_create_params.py | 2 +- .../params/_invoice_create_preview_params.py | 2 +- .../_invoice_line_item_update_params.py | 2 +- stripe/params/_invoice_modify_params.py | 2 +- stripe/params/_invoice_update_lines_params.py | 2 +- stripe/params/_invoice_update_params.py | 2 +- .../params/_payment_intent_confirm_params.py | 43 ++++++++++++++- .../params/_payment_intent_create_params.py | 43 ++++++++++++++- .../params/_payment_intent_modify_params.py | 43 ++++++++++++++- .../params/_payment_intent_search_params.py | 2 +- .../params/_payment_intent_update_params.py | 43 ++++++++++++++- stripe/params/_payment_link_create_params.py | 3 + .../params/_payment_method_create_params.py | 2 +- .../_payment_record_report_refund_params.py | 2 +- stripe/params/_setup_intent_confirm_params.py | 2 +- stripe/params/_setup_intent_create_params.py | 2 +- stripe/params/_setup_intent_modify_params.py | 2 +- stripe/params/_setup_intent_update_params.py | 2 +- stripe/params/_subscription_create_params.py | 27 ++++++++- stripe/params/_subscription_modify_params.py | 29 +++++++++- stripe/params/_subscription_update_params.py | 29 +++++++++- stripe/params/_topup_create_params.py | 22 +++++++- .../params/_webhook_endpoint_create_params.py | 13 +++-- .../params/_webhook_endpoint_modify_params.py | 12 ++-- .../params/_webhook_endpoint_update_params.py | 12 ++-- ..._credit_balance_summary_retrieve_params.py | 2 +- .../billing/_credit_grant_create_params.py | 2 +- stripe/params/checkout/__init__.py | 10 ++++ .../params/checkout/_session_create_params.py | 52 +++++++++++++++++- .../_confirmation_token_create_params.py | 2 +- .../product_catalog/_import_create_params.py | 2 +- .../product_catalog/_import_list_params.py | 4 +- stripe/params/v2/core/__init__.py | 18 ++++-- .../params/v2/core/_account_create_params.py | 15 +++++ .../params/v2/core/_account_update_params.py | 31 ++++++++--- stripe/reserve/_hold.py | 21 ++++++- stripe/terminal/_reader.py | 5 ++ stripe/v2/commerce/_product_catalog_import.py | 6 +- stripe/v2/core/_account.py | 40 +++++++++++++- 75 files changed, 853 insertions(+), 133 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6fae6735a..983636f7b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -d59a1f4bdea3032b8e282d40badc032cb021fc60 \ No newline at end of file +6012b623b1c09ad54d466947da04511a042ee45a \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 30723023b..83c68c9d1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2277 \ No newline at end of file +v2324 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index a2e41e6db..f9abf225b 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-05-27.dahlia" + CURRENT = "2026-06-24.dahlia" CURRENT_MAJOR = "dahlia" diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 2dc1b438d..dc731baa6 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -195,6 +195,7 @@ class FeeDetail(StripeObject): "stripe_fee", "stripe_fx_fee", "tax_fee", + "tax_fund", "topup", "topup_reversal", "transfer", @@ -203,7 +204,7 @@ class FeeDetail(StripeObject): "transfer_refund", ] """ - Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. """ @classmethod @@ -211,9 +212,9 @@ def list( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = cls._static_request( "get", @@ -233,9 +234,9 @@ async def list_async( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = await cls._static_request_async( "get", diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 35023fd93..2166a14fc 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -24,9 +24,9 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", @@ -45,9 +45,9 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", diff --git a/stripe/_charge.py b/stripe/_charge.py index a3da18b49..9f1025c1e 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -457,6 +457,10 @@ class Billie(StripeObject): """ class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -902,6 +906,10 @@ class ShippingAddress(StripeObject): """ Populated if this transaction used 3D Secure authentication. """ + transaction_link_id: Optional[str] + """ + Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + """ wallet: Optional[Wallet] """ If this Card is part of a card wallet, this contains the details of the card wallet. @@ -1118,13 +1126,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. @@ -1793,6 +1805,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ mandate: Optional[str] """ ID of the multi use Mandate generated by the PaymentIntent diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index c2ae3a460..db6911072 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -219,10 +219,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1278,7 +1284,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index a07c5b94f..323b41361 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -388,6 +388,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -416,6 +418,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 4d716f4ce..ab9ea98e9 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -119,6 +119,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -150,6 +152,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_dispute.py b/stripe/_dispute.py index ce304a8d2..dee4b2372 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -35,6 +35,12 @@ class Dispute( class Evidence(StripeObject): class EnhancedEvidence(StripeObject): + class MastercardCompliance(StripeObject): + fee_acknowledged: bool + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + class VisaCompellingEvidence3(StripeObject): class DisputedTransaction(StripeObject): class ShippingAddress(StripeObject): @@ -179,9 +185,11 @@ class VisaCompliance(StripeObject): A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -299,6 +307,14 @@ class VisaCompliance(StripeObject): class EvidenceDetails(StripeObject): class EnhancedEligibility(StripeObject): + class MastercardCompliance(StripeObject): + status: Literal[ + "fee_acknowledged", "requires_fee_acknowledgement" + ] + """ + Mastercard compliance eligibility status. + """ + class VisaCompellingEvidence3(StripeObject): required_actions: List[ Literal[ @@ -327,9 +343,11 @@ class VisaCompliance(StripeObject): Visa compliance eligibility status. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -432,7 +450,11 @@ class Paypal(StripeObject): 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", "visa_compliance"] + Literal[ + "mastercard_compliance", + "visa_compelling_evidence_3", + "visa_compliance", + ] ] """ List of eligibility types that are included in `enhanced_evidence`. diff --git a/stripe/_event.py b/stripe/_event.py index 1013f7cbd..b0dc2e3ff 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -105,7 +105,13 @@ class Request(StripeObject): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -347,12 +353,6 @@ class Request(StripeObject): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] """ Description of the event (for example, `invoice.created` or `charge.refunded`). diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 0fe35d184..2e0baff01 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -427,6 +427,7 @@ class LastFinalizationError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -466,6 +467,10 @@ class LastFinalizationError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -1016,6 +1021,7 @@ class Filters(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 9198dae9d..0e518b494 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -417,6 +417,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -676,12 +680,6 @@ class GooglePay(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ - stored_credential_usage: Optional[ - Literal["recurring", "unscheduled"] - ] - """ - The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. - """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -898,13 +896,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index f4a280aa2..ee3c27e8a 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -212,6 +212,7 @@ class LastPaymentError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -251,6 +252,10 @@ class LastPaymentError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -2522,6 +2527,18 @@ class Satispay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ + setup_future_usage: Optional[ + Literal["none", "off_session", "on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class Scalapay(StripeObject): capture_method: Optional[Literal["manual"]] @@ -2573,6 +2590,22 @@ class Sofort(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -2693,7 +2726,7 @@ class MandateOptions(StripeObject): class WechatPay(StripeObject): app_id: Optional[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: Optional[Literal["android", "ios", "web"]] """ @@ -2771,6 +2804,7 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] @@ -2827,6 +2861,7 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 3039ea29c..c300cf57e 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -170,10 +170,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1247,7 +1253,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 21bf46a29..a48da6c59 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -433,6 +433,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -692,12 +696,6 @@ class GooglePay(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ - stored_credential_usage: Optional[ - Literal["recurring", "unscheduled"] - ] - """ - The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. - """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -914,13 +912,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 5c6ac3fa9..63cc99951 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -365,11 +365,17 @@ class Payto(StripeObject): pass class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class RevolutPay(StripeObject): pass + class Satispay(StripeObject): + pass + class SepaDebit(StripeObject): pass @@ -438,6 +444,7 @@ class UsBankAccount(StripeObject): payto: Optional[Payto] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] + satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] twint: Optional[Twint] @@ -468,6 +475,7 @@ class UsBankAccount(StripeObject): "payto": Payto, "pix": Pix, "revolut_pay": RevolutPay, + "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, "twint": Twint, @@ -498,6 +506,7 @@ class SetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -537,6 +546,10 @@ class SetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 2f9486ae6..1709795f5 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -108,6 +108,7 @@ class LastSetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -147,6 +148,10 @@ class LastSetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/_subscription.py b/stripe/_subscription.py index a66720d4f..69e9754e7 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -246,6 +246,16 @@ class CancellationDetails(StripeObject): """ class InvoiceSettings(StripeObject): + class CustomField(StripeObject): + name: str + """ + The name of the custom field. + """ + value: str + """ + The value of the custom field. + """ + class Issuer(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -260,8 +270,20 @@ class Issuer(StripeObject): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: Optional[List[CustomField]] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: Optional[str] + """ + Footer to be displayed on the invoice. + """ issuer: Issuer - _inner_class_types = {"issuer": Issuer} + _inner_class_types = {"custom_fields": CustomField, "issuer": Issuer} class ManagedPayments(StripeObject): enabled: bool @@ -603,6 +625,7 @@ class Filters(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", @@ -916,7 +939,7 @@ def _cls_cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -942,7 +965,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -955,7 +978,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -968,7 +991,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -992,7 +1015,7 @@ async def _cls_cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1018,7 +1041,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1031,7 +1054,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1044,7 +1067,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index f52f3f673..076cee8c7 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -48,7 +48,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -76,7 +76,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index be7819d7b..706c322d8 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1585,6 +1585,22 @@ class Sofort(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -1698,6 +1714,26 @@ class Filters(StripeObject): "financial_connections": FinancialConnections } + class WechatPay(StripeObject): + app_id: Optional[str] + """ + The app ID registered with WeChat Pay. Only required when client is iOS or Android. + """ + client: Optional[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + acss_debit: Optional[AcssDebit] affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] @@ -1738,10 +1774,12 @@ class Filters(StripeObject): scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] us_bank_account: Optional[UsBankAccount] + wechat_pay: Optional[WechatPay] _inner_class_types = { "acss_debit": AcssDebit, "affirm": Affirm, @@ -1783,10 +1821,12 @@ class Filters(StripeObject): "scalapay": Scalapay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, "us_bank_account": UsBankAccount, + "wechat_pay": WechatPay, } class Permissions(StripeObject): diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index e49fce024..94aeb5f40 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -140,6 +140,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "samsung_pay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", + "sunbit_payments", "swish_payments", "twint_payments", "us_bank_transfer_payments", diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index e81de2959..e4098ccd3 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -149,6 +149,26 @@ class OwnershipRefresh(StripeObject): The status of the last refresh attempt. """ + class StatusDetails(StripeObject): + class Active(StripeObject): + action: Literal["none", "relink_required"] + """ + The action (if any) to proactively relink the Account. + """ + cause: Literal[ + "access_expired", "institution_requirement", "unspecified" + ] + """ + The underlying cause of the Account becoming inactive. + """ + expected_deactivation_date: int + """ + When the Account is expected to become inactive, if applicable. + """ + + active: Optional[Active] + _inner_class_types = {"active": Active} + class TransactionRefresh(StripeObject): id: str """ @@ -235,6 +255,7 @@ class TransactionRefresh(StripeObject): """ The status of the link to the account. """ + status_details: Optional[StatusDetails] subcategory: Literal[ "checking", "credit_card", @@ -890,5 +911,6 @@ async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] "balance": Balance, "balance_refresh": BalanceRefresh, "ownership_refresh": OwnershipRefresh, + "status_details": StatusDetails, "transaction_refresh": TransactionRefresh, } diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 6a3136202..25216c5aa 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -157,7 +157,7 @@ class ProvidedDetails(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted"] + status: Literal["processing", "redacted", "validated"] """ Indicates whether this object and its related objects have been redacted or not. """ diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index e7bf7eff8..dc99b081b 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1005,6 +1005,7 @@ DisputeModifyParams as DisputeModifyParams, DisputeModifyParamsEvidence as DisputeModifyParamsEvidence, DisputeModifyParamsEvidenceEnhancedEvidence as DisputeModifyParamsEvidenceEnhancedEvidence, + DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1019,6 +1020,7 @@ DisputeUpdateParams as DisputeUpdateParams, DisputeUpdateParamsEvidence as DisputeUpdateParamsEvidence, DisputeUpdateParamsEvidenceEnhancedEvidence as DisputeUpdateParamsEvidenceEnhancedEvidence, + DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1556,6 +1558,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit, PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsSofort as PaymentIntentConfirmParamsPaymentMethodOptionsSofort, + PaymentIntentConfirmParamsPaymentMethodOptionsSunbit as PaymentIntentConfirmParamsPaymentMethodOptionsSunbit, PaymentIntentConfirmParamsPaymentMethodOptionsSwish as PaymentIntentConfirmParamsPaymentMethodOptionsSwish, PaymentIntentConfirmParamsPaymentMethodOptionsTwint as PaymentIntentConfirmParamsPaymentMethodOptionsTwint, PaymentIntentConfirmParamsPaymentMethodOptionsUpi as PaymentIntentConfirmParamsPaymentMethodOptionsUpi, @@ -1719,6 +1722,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit, PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsSofort as PaymentIntentCreateParamsPaymentMethodOptionsSofort, + PaymentIntentCreateParamsPaymentMethodOptionsSunbit as PaymentIntentCreateParamsPaymentMethodOptionsSunbit, PaymentIntentCreateParamsPaymentMethodOptionsSwish as PaymentIntentCreateParamsPaymentMethodOptionsSwish, PaymentIntentCreateParamsPaymentMethodOptionsTwint as PaymentIntentCreateParamsPaymentMethodOptionsTwint, PaymentIntentCreateParamsPaymentMethodOptionsUpi as PaymentIntentCreateParamsPaymentMethodOptionsUpi, @@ -1904,6 +1908,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit, PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsSofort as PaymentIntentModifyParamsPaymentMethodOptionsSofort, + PaymentIntentModifyParamsPaymentMethodOptionsSunbit as PaymentIntentModifyParamsPaymentMethodOptionsSunbit, PaymentIntentModifyParamsPaymentMethodOptionsSwish as PaymentIntentModifyParamsPaymentMethodOptionsSwish, PaymentIntentModifyParamsPaymentMethodOptionsTwint as PaymentIntentModifyParamsPaymentMethodOptionsTwint, PaymentIntentModifyParamsPaymentMethodOptionsUpi as PaymentIntentModifyParamsPaymentMethodOptionsUpi, @@ -2069,6 +2074,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit, PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsSofort as PaymentIntentUpdateParamsPaymentMethodOptionsSofort, + PaymentIntentUpdateParamsPaymentMethodOptionsSunbit as PaymentIntentUpdateParamsPaymentMethodOptionsSunbit, PaymentIntentUpdateParamsPaymentMethodOptionsSwish as PaymentIntentUpdateParamsPaymentMethodOptionsSwish, PaymentIntentUpdateParamsPaymentMethodOptionsTwint as PaymentIntentUpdateParamsPaymentMethodOptionsTwint, PaymentIntentUpdateParamsPaymentMethodOptionsUpi as PaymentIntentUpdateParamsPaymentMethodOptionsUpi, @@ -3561,6 +3567,7 @@ SubscriptionCreateParamsBillingThresholds as SubscriptionCreateParamsBillingThresholds, SubscriptionCreateParamsDiscount as SubscriptionCreateParamsDiscount, SubscriptionCreateParamsInvoiceSettings as SubscriptionCreateParamsInvoiceSettings, + SubscriptionCreateParamsInvoiceSettingsCustomField as SubscriptionCreateParamsInvoiceSettingsCustomField, SubscriptionCreateParamsInvoiceSettingsIssuer as SubscriptionCreateParamsInvoiceSettingsIssuer, SubscriptionCreateParamsItem as SubscriptionCreateParamsItem, SubscriptionCreateParamsItemBillingThresholds as SubscriptionCreateParamsItemBillingThresholds, @@ -3656,6 +3663,7 @@ SubscriptionModifyParamsCancellationDetails as SubscriptionModifyParamsCancellationDetails, SubscriptionModifyParamsDiscount as SubscriptionModifyParamsDiscount, SubscriptionModifyParamsInvoiceSettings as SubscriptionModifyParamsInvoiceSettings, + SubscriptionModifyParamsInvoiceSettingsCustomField as SubscriptionModifyParamsInvoiceSettingsCustomField, SubscriptionModifyParamsInvoiceSettingsIssuer as SubscriptionModifyParamsInvoiceSettingsIssuer, SubscriptionModifyParamsItem as SubscriptionModifyParamsItem, SubscriptionModifyParamsItemBillingThresholds as SubscriptionModifyParamsItemBillingThresholds, @@ -3824,6 +3832,7 @@ SubscriptionUpdateParamsCancellationDetails as SubscriptionUpdateParamsCancellationDetails, SubscriptionUpdateParamsDiscount as SubscriptionUpdateParamsDiscount, SubscriptionUpdateParamsInvoiceSettings as SubscriptionUpdateParamsInvoiceSettings, + SubscriptionUpdateParamsInvoiceSettingsCustomField as SubscriptionUpdateParamsInvoiceSettingsCustomField, SubscriptionUpdateParamsInvoiceSettingsIssuer as SubscriptionUpdateParamsInvoiceSettingsIssuer, SubscriptionUpdateParamsItem as SubscriptionUpdateParamsItem, SubscriptionUpdateParamsItemBillingThresholds as SubscriptionUpdateParamsItemBillingThresholds, @@ -3949,6 +3958,8 @@ ) from stripe.params._topup_create_params import ( TopupCreateParams as TopupCreateParams, + TopupCreateParamsPaymentMethodOptions as TopupCreateParamsPaymentMethodOptions, + TopupCreateParamsPaymentMethodOptionsUsBankAccount as TopupCreateParamsPaymentMethodOptionsUsBankAccount, ) from stripe.params._topup_list_params import ( TopupListParams as TopupListParams, @@ -6700,6 +6711,10 @@ "stripe.params._dispute_modify_params", False, ), + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_modify_params", + False, + ), "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_modify_params", False, @@ -6734,6 +6749,10 @@ "stripe.params._dispute_update_params", False, ), + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_update_params", + False, + ), "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_update_params", False, @@ -8384,6 +8403,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_confirm_params", False, @@ -9028,6 +9051,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_create_params", False, @@ -9736,6 +9763,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_modify_params", False, @@ -10372,6 +10403,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_update_params", False, @@ -15173,6 +15208,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_create_params", False, @@ -15473,6 +15512,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_modify_params", False, @@ -16057,6 +16100,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_update_params", False, @@ -16377,6 +16424,14 @@ "TokenRetrieveParams": ("stripe.params._token_retrieve_params", False), "TopupCancelParams": ("stripe.params._topup_cancel_params", False), "TopupCreateParams": ("stripe.params._topup_create_params", False), + "TopupCreateParamsPaymentMethodOptions": ( + "stripe.params._topup_create_params", + False, + ), + "TopupCreateParamsPaymentMethodOptionsUsBankAccount": ( + "stripe.params._topup_create_params", + False, + ), "TopupListParams": ("stripe.params._topup_list_params", False), "TopupListParamsAmount": ("stripe.params._topup_list_params", False), "TopupListParamsCreated": ("stripe.params._topup_list_params", False), diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index be5e3f9e0..852e9b421 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -1366,7 +1366,7 @@ class AccountCreateParamsDocuments(TypedDict): "AccountCreateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountCreateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 2e0a7d6e4..83427e8c8 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1308,7 +1308,7 @@ class AccountUpdateParamsDocuments(TypedDict): "AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountUpdateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py index 9f636474c..04d0554ca 100644 --- a/stripe/params/_balance_transaction_list_params.py +++ b/stripe/params/_balance_transaction_list_params.py @@ -40,7 +40,7 @@ class BalanceTransactionListParams(RequestOptions): """ type: NotRequired[str] """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. + Only returns transactions of the given type. One of: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index b1d21fb89..a7ec38732 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -304,7 +304,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py index 6299dba8e..5ce43d56b 100644 --- a/stripe/params/_credit_note_create_params.py +++ b/stripe/params/_credit_note_create_params.py @@ -95,7 +95,7 @@ class CreditNoteCreateParamsLine(TypedDict): "Literal['']|List[CreditNoteCreateParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py index 140b25522..e14ea097f 100644 --- a/stripe/params/_credit_note_preview_lines_list_params.py +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -106,7 +106,7 @@ class CreditNotePreviewLinesListParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesListParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py index 54102dd77..d8974086f 100644 --- a/stripe/params/_credit_note_preview_lines_params.py +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -107,7 +107,7 @@ class CreditNotePreviewLinesParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py index 4987dd467..ec7be34e9 100644 --- a/stripe/params/_credit_note_preview_params.py +++ b/stripe/params/_credit_note_preview_params.py @@ -95,7 +95,7 @@ class CreditNotePreviewParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index d63713298..7379e4f95 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -145,6 +145,12 @@ class DisputeModifyParamsEvidence(TypedDict): class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -159,6 +165,15 @@ class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index 79f5c7876..eabbfaff0 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -144,6 +144,12 @@ class DisputeUpdateParamsEvidence(TypedDict): class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -158,6 +164,15 @@ class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index cae4ecf4e..6f672e37c 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -77,7 +77,7 @@ class InvoiceAddLinesParamsLine(TypedDict): "Literal['']|List[InvoiceAddLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index f95675082..4ab17fdac 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -229,7 +229,7 @@ class InvoiceCreateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 6b92ce798..6da2a604c 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -1146,7 +1146,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 04f4d2528..d1c4d039c 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -59,7 +59,7 @@ class InvoiceLineItemUpdateParams(TypedDict): "Literal['']|List[InvoiceLineItemUpdateParamsTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index c1ec68ac0..25f85ba6b 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -196,7 +196,7 @@ class InvoiceModifyParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index de6731409..617a9a1b8 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -77,7 +77,7 @@ class InvoiceUpdateLinesParamsLine(TypedDict): "Literal['']|List[InvoiceUpdateLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index c5f9d2eb9..09736a6f5 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -195,7 +195,7 @@ class InvoiceUpdateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index a0c63009b..33983c3e2 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -655,7 +655,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSwish"] """ @@ -1568,6 +1568,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSwish" ] @@ -3064,6 +3070,18 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentConfirmParamsPaymentMethodOptionsScalapay(TypedDict): @@ -3136,6 +3154,27 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSofort(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -3313,7 +3352,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index d8be7545b..6867b222b 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -787,7 +787,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSwish"] """ @@ -1700,6 +1700,12 @@ class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSwish" ] @@ -3190,6 +3196,18 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentCreateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -3262,6 +3280,27 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSofort(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -3439,7 +3478,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index c4169ca30..37e89f1e0 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -622,7 +622,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSwish"] """ @@ -1535,6 +1535,12 @@ class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSwish" ] @@ -3025,6 +3031,18 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentModifyParamsPaymentMethodOptionsScalapay(TypedDict): @@ -3097,6 +3115,27 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSofort(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -3274,7 +3313,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_search_params.py b/stripe/params/_payment_intent_search_params.py index 516352aec..37f7a2dff 100644 --- a/stripe/params/_payment_intent_search_params.py +++ b/stripe/params/_payment_intent_search_params.py @@ -20,5 +20,5 @@ class PaymentIntentSearchParams(RequestOptions): """ query: str """ - The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-payment-intents). + The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-paymentintents). """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index b2305f084..c88c9ab6c 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -621,7 +621,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSwish"] """ @@ -1534,6 +1534,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSwish" ] @@ -3024,6 +3030,18 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentUpdateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -3096,6 +3114,27 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSofort(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -3273,7 +3312,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 0b975c6cb..d2a03b6d2 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -107,6 +107,9 @@ class PaymentLinkCreateParams(RequestOptions): payment_method_options: NotRequired[ "PaymentLinkCreateParamsPaymentMethodOptions" ] + """ + Payment-method-specific configuration. + """ payment_method_types: NotRequired[ List[ Literal[ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index bed5bfdb9..68f930682 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -233,7 +233,7 @@ class PaymentMethodCreateParams(RequestOptions): """ sunbit: NotRequired["PaymentMethodCreateParamsSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentMethodCreateParamsSwish"] """ diff --git a/stripe/params/_payment_record_report_refund_params.py b/stripe/params/_payment_record_report_refund_params.py index a2eacdfe2..c18df94b6 100644 --- a/stripe/params/_payment_record_report_refund_params.py +++ b/stripe/params/_payment_record_report_refund_params.py @@ -33,7 +33,7 @@ class PaymentRecordReportRefundParams(RequestOptions): """ Processor information for this refund. """ - refunded: "PaymentRecordReportRefundParamsRefunded" + refunded: NotRequired["PaymentRecordReportRefundParamsRefunded"] """ Information about the payment attempt refund. """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index b4a90c0d9..24b9628a3 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -339,7 +339,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 6fb00af9b..ebacfc819 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -471,7 +471,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index d8e028871..3be1f43c4 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -317,7 +317,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentModifyParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 63dae872e..fc29f50ce 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -316,7 +316,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index b2daef377..6f6d271a3 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -439,12 +439,37 @@ class SubscriptionCreateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionCreateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionCreateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionCreateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionCreateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -563,7 +588,7 @@ class SubscriptionCreateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 7b8512126..38e455572 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -399,12 +399,37 @@ class SubscriptionModifyParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionModifyParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionModifyParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -439,7 +464,7 @@ class SubscriptionModifyParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -548,7 +573,7 @@ class SubscriptionModifyParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index e67522480..d9ce2cf3c 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -398,12 +398,37 @@ class SubscriptionUpdateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionUpdateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionUpdateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionUpdateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -438,7 +463,7 @@ class SubscriptionUpdateParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -547,7 +572,7 @@ class SubscriptionUpdateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_topup_create_params.py b/stripe/params/_topup_create_params.py index 6203536e8..930c37cd3 100644 --- a/stripe/params/_topup_create_params.py +++ b/stripe/params/_topup_create_params.py @@ -3,7 +3,7 @@ from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject from typing import Dict, List -from typing_extensions import Literal, NotRequired +from typing_extensions import Literal, NotRequired, TypedDict class TopupCreateParams(RequestOptions): @@ -29,6 +29,16 @@ class TopupCreateParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/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: NotRequired[str] + """ + The ID of a PaymentMethod representing the payment method to be used for the top-up. A PaymentMethod of type `us_bank_account` can be used. + """ + payment_method_options: NotRequired[ + "TopupCreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this top-up. + """ source: NotRequired[str] """ The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). @@ -41,3 +51,13 @@ class TopupCreateParams(RequestOptions): """ A string that identifies this top-up as part of a group. """ + + +class TopupCreateParamsPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "TopupCreateParamsPaymentMethodOptionsUsBankAccount" + ] + + +class TopupCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + network: Literal["ach"] diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 589cb7af2..611621347 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -133,6 +133,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-03-25.dahlia", "2026-04-22.dahlia", "2026-05-27.dahlia", + "2026-06-24.dahlia", ] ] """ @@ -161,7 +162,13 @@ class WebhookEndpointCreateParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -403,12 +410,6 @@ class WebhookEndpointCreateParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 72dc85a1b..698a72709 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -31,7 +31,13 @@ class WebhookEndpointModifyParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -273,12 +279,6 @@ class WebhookEndpointModifyParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 878b7a2d2..7acac088b 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -30,7 +30,13 @@ class WebhookEndpointUpdateParams(TypedDict): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -272,12 +278,6 @@ class WebhookEndpointUpdateParams(TypedDict): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py index a5ea1a65a..aa72845f2 100644 --- a/stripe/params/billing/_credit_balance_summary_retrieve_params.py +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -50,7 +50,7 @@ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict): List["CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index aade53e43..2161be55c 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -91,7 +91,7 @@ class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict): List["CreditGrantCreateParamsApplicabilityConfigScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 649df0707..0c865ab53 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -105,6 +105,7 @@ SessionCreateParamsPaymentMethodOptionsSepaDebit as SessionCreateParamsPaymentMethodOptionsSepaDebit, SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, + SessionCreateParamsPaymentMethodOptionsSunbit as SessionCreateParamsPaymentMethodOptionsSunbit, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, SessionCreateParamsPaymentMethodOptionsTwint as SessionCreateParamsPaymentMethodOptionsTwint, SessionCreateParamsPaymentMethodOptionsUpi as SessionCreateParamsPaymentMethodOptionsUpi, @@ -125,6 +126,7 @@ SessionCreateParamsShippingOptionShippingRateDataFixedAmount as SessionCreateParamsShippingOptionShippingRateDataFixedAmount, SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions as SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions, SessionCreateParamsSubscriptionData as SessionCreateParamsSubscriptionData, + SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig as SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig, SessionCreateParamsSubscriptionDataBillingMode as SessionCreateParamsSubscriptionDataBillingMode, SessionCreateParamsSubscriptionDataBillingModeFlexible as SessionCreateParamsSubscriptionDataBillingModeFlexible, SessionCreateParamsSubscriptionDataInvoiceSettings as SessionCreateParamsSubscriptionDataInvoiceSettings, @@ -593,6 +595,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsSwish": ( "stripe.params.checkout._session_create_params", False, @@ -673,6 +679,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsSubscriptionDataBillingMode": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index be27f5726..233df65e2 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -257,8 +257,6 @@ class SessionCreateParams(RequestOptions): You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well. - - You can't set this parameter if `ui_mode` is `custom`. """ optional_items: NotRequired[List["SessionCreateParamsOptionalItem"]] """ @@ -1393,6 +1391,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Sofort payment method options. """ + sunbit: NotRequired["SessionCreateParamsPaymentMethodOptionsSunbit"] + """ + contains details about the Sunbit payment method options. + """ swish: NotRequired["SessionCreateParamsPaymentMethodOptionsSwish"] """ contains details about the Swish payment method options. @@ -2396,6 +2398,23 @@ class SessionCreateParamsPaymentMethodOptionsSofort(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired[str] """ @@ -2947,6 +2966,12 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ A future timestamp to anchor the subscription's billing cycle for new subscriptions. You can't set this parameter if `ui_mode` is `elements`. """ + billing_cycle_anchor_config: NotRequired[ + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig" + ] + """ + Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month. + """ billing_mode: NotRequired["SessionCreateParamsSubscriptionDataBillingMode"] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. @@ -3009,6 +3034,29 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ +class SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig(TypedDict): + day_of_month: int + """ + The day of the month the anchor should be. Ranges from 1 to 31. + """ + hour: NotRequired[int] + """ + The hour of the day the anchor should be. Ranges from 0 to 23. + """ + minute: NotRequired[int] + """ + The minute of the hour the anchor should be. Ranges from 0 to 59. + """ + month: NotRequired[int] + """ + The month to start full cycle periods. Ranges from 1 to 12. + """ + second: NotRequired[int] + """ + The second of the minute the anchor should be. Ranges from 0 to 59. + """ + + class SessionCreateParamsSubscriptionDataBillingMode(TypedDict): flexible: NotRequired[ "SessionCreateParamsSubscriptionDataBillingModeFlexible" diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 0b2945124..1085b9d43 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -303,7 +303,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_create_params.py b/stripe/params/v2/commerce/product_catalog/_import_create_params.py index 8549de060..a84306f92 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_create_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_create_params.py @@ -6,7 +6,7 @@ class ImportCreateParams(TypedDict): - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of catalog data to import. """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_list_params.py b/stripe/params/v2/commerce/product_catalog/_import_list_params.py index fecbc23da..5833fd5e4 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_list_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_list_params.py @@ -29,7 +29,9 @@ class ImportListParams(TypedDict): Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - feed_type: NotRequired[Literal["inventory", "pricing", "product"]] + feed_type: NotRequired[ + Literal["inventory", "pricing", "product", "promotion"] + ] """ Filter by the type of feed data being imported. """ diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 36afb616d..f756daa94 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -65,6 +65,7 @@ AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments, @@ -275,6 +276,7 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments, @@ -305,8 +307,8 @@ AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration as AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration, AccountUpdateParamsIdentityAttestationsTermsOfService as AccountUpdateParamsIdentityAttestationsTermsOfService, AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount as AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount, - AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer as AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer, - AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer as AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer, + AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager, + AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountUpdateParamsIdentityBusinessDetails as AccountUpdateParamsIdentityBusinessDetails, AccountUpdateParamsIdentityBusinessDetailsAddress as AccountUpdateParamsIdentityBusinessDetailsAddress, AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue, @@ -622,6 +624,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -1411,6 +1417,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -1531,11 +1541,11 @@ "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer": ( + "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer": ( + "AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager": ( "stripe.params.v2.core._account_update_params", False, ), diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 305d2168f..9a85811d3 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -561,6 +561,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sunbit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments" + ] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments" ] @@ -947,6 +953,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments( TypedDict, ): diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 823fb6ba5..60b43fda5 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -579,6 +579,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sunbit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments" + ] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments" ] @@ -965,6 +971,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments( TypedDict, ): @@ -1486,14 +1501,14 @@ class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). """ - crypto_storer: NotRequired[ - "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer" + crypto_money_manager: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager" ] """ - Details on the Account's acceptance of Crypto-storer-specific terms of service. + Details on the Account's acceptance of Crypto-specific terms of service. """ - storer: NotRequired[ - "AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer" + money_manager: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager" ] """ Details on the Account's acceptance of Treasury-specific terms of service. @@ -1515,7 +1530,7 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): """ -class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer( +class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager( TypedDict, ): date: NotRequired[str] @@ -1532,7 +1547,9 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer( """ -class AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): +class AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager( + TypedDict, +): date: NotRequired[str] """ The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index 65070f6fe..284ba6457 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, List, Optional from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -17,6 +17,16 @@ class Hold(StripeObject): OBJECT_NAME: ClassVar[Literal["reserve.hold"]] = "reserve.hold" + class ReleaseDetail(StripeObject): + amount: int + """ + The amount released by the ReserveRelease from this ReserveHold. A positive integer representing how much is released in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + reserve_release: str + """ + The ReserveRelease which released funds from this ReserveHold (e.g., resrel_123). + """ + class ReleaseSchedule(StripeObject): release_after: Optional[int] """ @@ -71,6 +81,10 @@ class ReleaseSchedule(StripeObject): """ The reason for the ReserveHold. """ + release_details: Optional[List[ReleaseDetail]] + """ + List of ReserveReleases and the amounts released from this ReserveHold. + """ release_schedule: ReleaseSchedule reserve_plan: Optional[ExpandableField["Plan"]] """ @@ -84,4 +98,7 @@ class ReleaseSchedule(StripeObject): """ Which source balance type this ReserveHold reserves funds from. One of `bank_account`, `card`, or `fpx`. """ - _inner_class_types = {"release_schedule": ReleaseSchedule} + _inner_class_types = { + "release_details": ReleaseDetail, + "release_schedule": ReleaseSchedule, + } diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 2b734969b..f568f68b1 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -103,6 +103,7 @@ class ApiError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -142,6 +143,10 @@ class ApiError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/v2/commerce/_product_catalog_import.py b/stripe/v2/commerce/_product_catalog_import.py index 3e48b840e..3f4229c32 100644 --- a/stripe/v2/commerce/_product_catalog_import.py +++ b/stripe/v2/commerce/_product_catalog_import.py @@ -167,7 +167,7 @@ class Sample(StripeObject): """ The time this ProductCatalogImport was created. """ - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of feed data being imported into the product catalog. """ @@ -183,6 +183,10 @@ class Sample(StripeObject): """ Additional information about the object in a structured format. """ + mode: Literal["replace", "upsert"] + """ + The import strategy for handling existing catalog data. + """ object: Literal["v2.commerce.product_catalog_import"] """ String representing the object's type. Objects of the same type share the same value of the object field. diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 6e4cbcde7..61c6b8d72 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -1618,6 +1618,39 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"payouts": Payouts} + class SunbitPayments(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", "pending", "restricted", "unsupported" + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + class SwishPayments(StripeObject): class StatusDetail(StripeObject): code: Literal[ @@ -1914,6 +1947,10 @@ class StatusDetail(StripeObject): """ Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). """ + sunbit_payments: Optional[SunbitPayments] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: Optional[SwishPayments] """ Allow the merchant to process Swish payments. @@ -1972,6 +2009,7 @@ class StatusDetail(StripeObject): "sepa_bank_transfer_payments": SepaBankTransferPayments, "sepa_debit_payments": SepaDebitPayments, "stripe_balance": StripeBalance, + "sunbit_payments": SunbitPayments, "swish_payments": SwishPayments, "twint_payments": TwintPayments, "us_bank_transfer_payments": UsBankTransferPayments, @@ -2328,7 +2366,7 @@ class Responsibilities(StripeObject): """ losses_collector: Optional[Literal["application", "stripe"]] """ - A value indicating responsibility for collecting requirements on this account. + A value indicating the responsibility for losses on this account. """ requirements_collector: Literal["application", "stripe"] """ From 4454934a9bd1d957e50d6f9b4d6c11cb827348db Mon Sep 17 00:00:00 2001 From: David Brownman Date: Wed, 24 Jun 2026 15:46:38 -0700 Subject: [PATCH 2/6] Bump version to 15.3.0 --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++++++ VERSION | 2 +- pyproject.toml | 2 +- stripe/_version.py | 2 +- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e98df0c9b..75116ab76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,43 @@ +## 15.3.0 - 2026-06-24 +This release changes the pinned API version to 2026-06-24.dahlia. + +* [#1836](https://github.com/stripe/stripe-python/pull/1836) Update generated code + * Add support for `release_details` on `Reserve.Hold` + * ⚠️ Add support for new value `tax_fund` on enum `BalanceTransaction.type` + * Change `Billing.CreditGrant.priority` to be required + * Add support for `buyer_id` on `Charge.PaymentMethodDetail.Bizum`, `ConfirmationToken.PaymentMethodPreview.Bizum`, `ConfirmationToken.PaymentMethodPreview.Blik`, `PaymentAttemptRecord.PaymentMethodDetail.Bizum`, `PaymentMethod.Bizum`, `PaymentMethod.Blik`, and `PaymentRecord.PaymentMethodDetail.Bizum` + * Add support for `transaction_link_id` on `Charge.PaymentMethodDetail.Card` + * ⚠️ Add support for new value `sui` on enums `Charge.PaymentMethodDetail.Crypto.network`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.network`, and `PaymentRecord.PaymentMethodDetail.Crypto.network` + * ⚠️ Add support for new value `usdsui` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency` + * Add support for `fingerprint` on `Charge.PaymentMethodDetail.Pix`, `ConfirmationToken.PaymentMethodPreview.Pix`, `PaymentMethod.Pix`, and `SetupAttempt.PaymentMethodDetail.Pix` + * Add support for `sunbit` on `Checkout.Session.PaymentMethodOption`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodOption`, and `checkout.SessionCreateParamsPaymentMethodOption` + * Add support for `billing_cycle_anchor_config` on `checkout.SessionCreateParamsSubscriptionDatum` + * Add support for `wechat_pay` on `Checkout.Session.PaymentMethodOption` + * Add support for `mastercard_compliance` on `Dispute.Evidence.EnhancedEvidence`, `Dispute.EvidenceDetail.EnhancedEligibility`, and `DisputeModifyParamsEvidenceEnhancedEvidence` + * ⚠️ Add support for new value `mastercard_compliance` on enum `Dispute.enhanced_eligibility_types` + * Add support for `status_details` on `FinancialConnections.Account` + * ⚠️ Add support for new value `validated` on enum `Identity.VerificationSession.Redaction.status` + * Add support for new value `satispay` on enums `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` + * ⚠️ Add support for new value `satispay` on enums `Invoice.PaymentSetting.payment_method_types` and `Subscription.PaymentSetting.payment_method_types` + * ⚠️ Remove support for `stored_credential_usage` on `PaymentAttemptRecord.PaymentMethodDetail.Card` and `PaymentRecord.PaymentMethodDetail.Card` + * ⚠️ Change `PaymentAttemptRecord.PaymentMethodDetail.Card.description` and `PaymentRecord.PaymentMethodDetail.Card.description` to be optional + * ⚠️ Change `PaymentAttemptRecord.PaymentMethodDetail.Card.iin` and `PaymentRecord.PaymentMethodDetail.Card.iin` to be optional + * ⚠️ Change `PaymentAttemptRecord.PaymentMethodDetail.Card.issuer` and `PaymentRecord.PaymentMethodDetail.Card.issuer` to be optional + * Add support for `setup_future_usage` on `PaymentIntent.PaymentMethodOption.Satispay`, `PaymentIntentConfirmParamsPaymentMethodOptionSatispay`, `PaymentIntentCreateParamsPaymentMethodOptionSatispay`, and `PaymentIntentModifyParamsPaymentMethodOptionSatispay` + * Change `PaymentRecordReportRefundParams.refunded` to be optional + * Add support for `satispay` on `SetupAttempt.PaymentMethodDetail` + * Add support for `custom_fields`, `description`, and `footer` on `Subscription.InvoiceSetting`, `SubscriptionCreateParamsInvoiceSetting`, and `SubscriptionModifyParamsInvoiceSetting` + * Add support for `payment_method_options` and `payment_method` on `TopupCreateParams` + * Add support for new value `2026-06-24.dahlia` on enum `WebhookEndpointCreateParams.api_version` + * Add support for `mode` on `V2.Commerce.ProductCatalogImport` + * ⚠️ Add support for new value `promotion` on enum `V2.Commerce.ProductCatalogImport.feed_type` + * Add support for `sunbit_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` + * Add support for `crypto_money_manager` and `money_manager` on `v2.core.AccountModifyParamsIdentityAttestationTermsOfService` + * ⚠️ Remove support for `crypto_storer` and `storer` on `v2.core.AccountModifyParamsIdentityAttestationTermsOfService` + * Add support for new value `promotion` on enum `v2.commerce.ProductCatalogImportCreateParams.feed_type` + * ⚠️ Add support for new value `sunbit_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` + * Add support for error codes `anomalous_money_movement_request`, `failed_tax_calculation`, `financial_account_balance_does_not_support_currency`, `financial_account_capability_not_enabled`, and `financial_account_capability_restricted` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, `StripeError`, and `Terminal.Reader.Action.ApiError` + ## 15.2.1 - 2026-06-12 * [#1825](https://github.com/stripe/stripe-python/pull/1825) Add "source" field to user-agent header diff --git a/VERSION b/VERSION index 2054e837b..5ff58dbcd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.2.1 +15.3.0 diff --git a/pyproject.toml b/pyproject.toml index 3cbbb8110..a602f6919 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stripe" -version = "15.2.1" +version = "15.3.0" readme = "README.md" description = "Python bindings for the Stripe API" authors = [{ name = "Stripe", email = "support@stripe.com" }] diff --git a/stripe/_version.py b/stripe/_version.py index 6472ba8b2..7b1397c67 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "15.2.1" +VERSION = "15.3.0" From 03fa5ef33559eb295863d6cb637a6e709f239a0f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 16:15:27 +0000 Subject: [PATCH 3/6] Update generated code for v2324 and 2e6462a81388eac31ac916d6251148f245e76950 --- CODEGEN_VERSION | 2 +- stripe/v2/money_management/_payout_intent.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 296c2b670..ed8fdd092 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -991c3be11c8d03c58cf2e9f6e5b634b20cb5cd9c \ No newline at end of file +2e6462a81388eac31ac916d6251148f245e76950 \ No newline at end of file diff --git a/stripe/v2/money_management/_payout_intent.py b/stripe/v2/money_management/_payout_intent.py index 1c0f0c2bf..6fc40b247 100644 --- a/stripe/v2/money_management/_payout_intent.py +++ b/stripe/v2/money_management/_payout_intent.py @@ -44,6 +44,7 @@ class HandleFailure(StripeObject): failure_reason: Literal[ "account_not_configured_as_recipient", "currency_not_supported_for_financial_account_balance", + "currency_required", "feature_not_active_for_recipient", "fx_rate_drift_exceeded_after_review", "insufficient_funds", From 0ddb68f1319734e8d0cf30f43e3b2b53886f79d5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 22:56:31 +0000 Subject: [PATCH 4/6] Update generated code for v2324 and bff9fc945bc9edc0afe143d62d3cc377ea8f5f1e --- CODEGEN_VERSION | 2 +- stripe/v2/money_management/_inbound_transfer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index ed8fdd092..d2b074de9 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2e6462a81388eac31ac916d6251148f245e76950 \ No newline at end of file +bff9fc945bc9edc0afe143d62d3cc377ea8f5f1e \ No newline at end of file diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index f1e3b62bf..4158db10b 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -173,7 +173,7 @@ class BankDebitSucceeded(StripeObject): """ transfer_history: List[TransferHistory] """ - A list of history objects, representing changes in the state of the InboundTransfer. + A list of history objects, representing changes in the state of the InboundTransfer. The most recent entry's type indicates the current status of the InboundTransfer. """ _inner_class_types = { "from": From, From a85ffcd750641210ef41b1ec75a621902dec0159 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Wed, 1 Jul 2026 09:39:36 -0700 Subject: [PATCH 5/6] Reduce StripeClient() cold start latency for serverless environments (#1834) --- stripe/_api_requestor.py | 8 ++- stripe/_http_client.py | 127 ++++++++++++++++++++++---------------- tests/test_http_client.py | 8 +-- 3 files changed, 85 insertions(+), 58 deletions(-) diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 514c8ba82..f5737b313 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -24,7 +24,6 @@ NoReturn, Unpack, ) -import uuid from urllib.parse import urlsplit, urlunsplit, parse_qs # breaking circular dependency @@ -100,6 +99,11 @@ def is_v2_delete_resp(method: str, api_mode: ApiMode) -> bool: return method == "delete" and api_mode == "V2" +def _generate_idempotency_key() -> str: + b = os.urandom(16) + return f"{b[0:4].hex()}-{b[4:6].hex()}-{b[6:8].hex()}-{b[8:10].hex()}-{b[10:].hex()}" + + class _APIRequestor(object): _instance: ClassVar["_APIRequestor|None"] = None @@ -580,7 +584,7 @@ def request_headers( # IKs should be set for all POST requests and v2 delete requests if method == "post" or (api_mode == "V2" and method == "delete"): - headers.setdefault("Idempotency-Key", str(uuid.uuid4())) + headers.setdefault("Idempotency-Key", _generate_idempotency_key()) if method == "post": if api_mode == "V2": diff --git a/stripe/_http_client.py b/stripe/_http_client.py index b09b4984f..3f69f5a91 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -65,61 +65,11 @@ def _now_ms(): def new_default_http_client(*args: Any, **kwargs: Any) -> "HTTPClient": - """ - This method creates and returns a new HTTPClient based on what libraries are available. It uses the following precedence rules: - - 1. Urlfetch (this is provided by Google App Engine, so if it's present you probably want it) - 2. Requests (popular library, the top priority for all environments outside Google App Engine, but not always present) - 3. Pycurl (another library, not always present, not as preferred as Requests but at least it verifies SSL certs) - 4. urllib with a warning (basically always present, a reasonable final default) - - For performance, it only imports what it's actually going to use. But, it re-calculates every time its called, so probably save its result instead of calling it multiple times. - """ - try: - from google.appengine.api import urlfetch # type: ignore # noqa: F401 - except ImportError: - pass - else: - return UrlFetchClient(*args, **kwargs) - - try: - import requests # noqa: F401 - except ImportError: - pass - else: - return RequestsClient(*args, **kwargs) - - try: - import pycurl # type: ignore # noqa: F401 - except ImportError: - pass - else: - return PycurlClient(*args, **kwargs) - - return UrllibClient(*args, **kwargs) + return _default_sync_client(*args, **kwargs) def new_http_client_async_fallback(*args: Any, **kwargs: Any) -> "HTTPClient": - """ - Similar to `new_default_http_client` above, this returns a client that can handle async HTTP requests, if available. - """ - - try: - import httpx # noqa: F401 - import anyio # noqa: F401 - except ImportError: - pass - else: - return HTTPXClient(*args, **kwargs) - - try: - import aiohttp # noqa: F401 - except ImportError: - pass - else: - return AIOHTTPClient(*args, **kwargs) - - return NoImportFoundAsyncClient(*args, **kwargs) + return _default_async_client(*args, **kwargs) class HTTPClient(object): @@ -1550,3 +1500,76 @@ async def request_stream_async( async def close_async(self): self.raise_async_client_import_error() + + +# --- Client resolution --- +# Detect available HTTP libraries at module load time so the expensive imports +# (e.g. requests, httpx) happen during Python's init phase rather than when +# StripeClient() is constructed. This matters in environments like AWS Lambda +# where module loading has a generous timeout (10s) but handler invocation +# does not (often 3s). +# +# Sync client precedence: +# 1. Urlfetch (Google App Engine — if present, you probably want it) +# 2. Requests (popular, top priority outside GAE) +# 3. Pycurl (verifies SSL certs, but less preferred than Requests) +# 4. urllib (stdlib fallback, basically always present) +# +# Async client precedence: +# 1. httpx + anyio (both required) +# 2. aiohttp +# 3. NoImportFoundAsyncClient (raises on use) +# +# To add a new client: define the class above, then add it to the appropriate +# cascade below. The resolved class is stored directly — new_default_http_client() +# and new_http_client_async_fallback() just call it. + + +def _resolve_sync_client(): + try: + from google.appengine.api import urlfetch # type: ignore # noqa: F401 + + return UrlFetchClient + except ImportError: + pass + + try: + import requests # noqa: F401 + + return RequestsClient + except ImportError: + pass + + try: + import pycurl # type: ignore # noqa: F401 + + return PycurlClient + except ImportError: + pass + + return UrllibClient + + +def _resolve_async_client(): + try: + import httpx # noqa: F401 + import anyio # noqa: F401 + + return HTTPXClient + except ImportError: + pass + + try: + import aiohttp # noqa: F401 + + return AIOHTTPClient + except ImportError: + pass + + return NoImportFoundAsyncClient + + +# Called at module load time so HTTP library imports happen during Python's init +# phase rather than inside StripeClient.__init__(). +_default_sync_client = _resolve_sync_client() +_default_async_client = _resolve_async_client() diff --git a/tests/test_http_client.py b/tests/test_http_client.py index be0f8400f..ea74cf7d9 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -101,8 +101,8 @@ def test_default_httpclient_from_imports( with patch("builtins.__import__") as mocked_import_fn: mocked_import_fn.side_effect = mock_import(available_libs) - client = _http_client.new_default_http_client() - assert isinstance(client, expected) + resolved_class = _http_client._resolve_sync_client() + assert resolved_class is expected @pytest.mark.parametrize( ["available_libs", "expected"], @@ -123,8 +123,8 @@ def test_default_async_httpclient_from_imports( with patch("builtins.__import__") as mocked_import_fn: mocked_import_fn.side_effect = mock_import(available_libs) - client = _http_client.new_http_client_async_fallback() - assert isinstance(client, expected) + resolved_class = _http_client._resolve_async_client() + assert resolved_class is expected MakeReqFunc = Callable[[str, str, Dict[str, str], Optional[str]], Any] From 25858df798930670337d03712bf90dfa10609527 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 01:12:32 +0000 Subject: [PATCH 6/6] Update generated code for v2342 and 23a0d1c154d81b4b4185658446b2ee07f06f969a --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/__init__.py | 4 + stripe/_api_version.py | 2 +- stripe/_balance_transaction.py | 11 +- stripe/_balance_transaction_service.py | 8 +- stripe/_card.py | 16 +- stripe/_charge.py | 47 +- stripe/_confirmation_token.py | 15 +- stripe/_credit_note.py | 4 + stripe/_credit_note_service.py | 4 + stripe/_crypto_service.py | 49 ++ stripe/_customer.py | 11 + stripe/_dispute.py | 24 +- stripe/_event.py | 14 +- stripe/_gift_card_operation.py | 11 +- stripe/_invoice.py | 6 + stripe/_object_classes.py | 17 + stripe/_order.py | 2 +- stripe/_payment_attempt_record.py | 30 +- stripe/_payment_intent.py | 56 +- stripe/_payment_method.py | 26 +- stripe/_payment_record.py | 30 +- stripe/_quote_preview_invoice.py | 6 + stripe/_setup_attempt.py | 15 +- stripe/_setup_intent.py | 16 + stripe/_source.py | 11 + stripe/_stripe_client.py | 12 + stripe/_subscription.py | 41 +- stripe/_subscription_service.py | 4 +- stripe/_tax_fund.py | 48 ++ stripe/_token.py | 14 + stripe/_v1_services.py | 3 + stripe/capital/_financing_offer.py | 13 + stripe/capital/_financing_summary.py | 13 + stripe/checkout/_session.py | 139 ++++- stripe/crypto/__init__.py | 76 +++ stripe/crypto/_customer.py | 222 +++++++ stripe/crypto/_customer_consumer_wallet.py | 50 ++ .../_customer_consumer_wallet_service.py | 60 ++ stripe/crypto/_customer_payment_token.py | 84 +++ .../crypto/_customer_payment_token_service.py | 60 ++ stripe/crypto/_customer_service.py | 95 +++ stripe/crypto/_onramp_session.py | 579 ++++++++++++++++++ stripe/crypto/_onramp_session_service.py | 244 ++++++++ stripe/crypto/_onramp_transaction_limits.py | 65 ++ .../_onramp_transaction_limits_service.py | 54 ++ stripe/financial_connections/_account.py | 19 +- .../financial_connections/_authorization.py | 13 +- stripe/identity/_verification_session.py | 2 +- stripe/issuing/_authorization.py | 19 + stripe/issuing/_card.py | 15 + stripe/issuing/_cardholder.py | 11 + stripe/issuing/_dispute.py | 11 + stripe/issuing/_token.py | 4 + stripe/issuing/_transaction.py | 15 + stripe/params/__init__.py | 127 ++++ stripe/params/_account_create_params.py | 2 +- stripe/params/_account_update_params.py | 2 +- .../_balance_transaction_list_params.py | 2 +- .../_confirmation_token_create_params.py | 2 +- stripe/params/_credit_note_create_params.py | 2 +- .../_credit_note_preview_lines_list_params.py | 2 +- .../_credit_note_preview_lines_params.py | 2 +- stripe/params/_credit_note_preview_params.py | 2 +- stripe/params/_dispute_modify_params.py | 15 + stripe/params/_dispute_update_params.py | 15 + stripe/params/_invoice_add_lines_params.py | 2 +- stripe/params/_invoice_create_params.py | 2 +- .../params/_invoice_create_preview_params.py | 60 +- .../_invoice_line_item_update_params.py | 2 +- stripe/params/_invoice_modify_params.py | 2 +- stripe/params/_invoice_update_lines_params.py | 2 +- stripe/params/_invoice_update_params.py | 2 +- stripe/params/_order_create_params.py | 2 +- stripe/params/_order_modify_params.py | 2 +- stripe/params/_order_update_params.py | 2 +- ...ent_attempt_record_report_failed_params.py | 51 ++ ...ent_attempt_record_report_refund_params.py | 6 + .../params/_payment_intent_confirm_params.py | 58 +- .../params/_payment_intent_create_params.py | 58 +- .../params/_payment_intent_modify_params.py | 58 +- .../params/_payment_intent_search_params.py | 2 +- .../params/_payment_intent_update_params.py | 58 +- stripe/params/_payment_link_create_params.py | 3 + .../params/_payment_method_create_params.py | 2 +- ...rd_report_payment_attempt_failed_params.py | 53 ++ .../_payment_record_report_refund_params.py | 6 + stripe/params/_setup_intent_confirm_params.py | 2 +- stripe/params/_setup_intent_create_params.py | 2 +- stripe/params/_setup_intent_modify_params.py | 2 +- stripe/params/_setup_intent_update_params.py | 2 +- stripe/params/_subscription_create_params.py | 27 +- stripe/params/_subscription_modify_params.py | 29 +- stripe/params/_subscription_pause_params.py | 2 +- stripe/params/_subscription_update_params.py | 29 +- stripe/params/_topup_create_params.py | 22 +- .../params/_webhook_endpoint_create_params.py | 14 +- .../params/_webhook_endpoint_modify_params.py | 13 +- .../params/_webhook_endpoint_update_params.py | 13 +- ..._credit_balance_summary_retrieve_params.py | 2 +- .../billing/_credit_grant_create_params.py | 2 +- stripe/params/checkout/__init__.py | 10 + .../params/checkout/_session_create_params.py | 60 +- stripe/params/crypto/__init__.py | 142 +++++ .../_customer_consumer_wallet_list_params.py | 23 + ...mer_list_crypto_consumer_wallets_params.py | 24 + .../_customer_list_payment_tokens_params.py | 24 + .../_customer_payment_token_list_params.py | 23 + .../crypto/_customer_retrieve_params.py | 12 + .../crypto/_onramp_session_checkout_params.py | 67 ++ .../crypto/_onramp_session_create_params.py | 149 +++++ .../crypto/_onramp_session_list_params.py | 81 +++ .../crypto/_onramp_session_quote_params.py | 12 + .../crypto/_onramp_session_retrieve_params.py | 12 + ...ramp_transaction_limits_retrieve_params.py | 40 ++ .../_session_create_params.py | 6 +- .../_confirmation_token_create_params.py | 2 +- stripe/radar/_value_list_item.py | 14 + stripe/reserve/_hold.py | 21 +- stripe/shared_payment/_granted_token.py | 15 +- stripe/terminal/_reader.py | 5 + 122 files changed, 3786 insertions(+), 147 deletions(-) create mode 100644 stripe/_crypto_service.py create mode 100644 stripe/crypto/__init__.py create mode 100644 stripe/crypto/_customer.py create mode 100644 stripe/crypto/_customer_consumer_wallet.py create mode 100644 stripe/crypto/_customer_consumer_wallet_service.py create mode 100644 stripe/crypto/_customer_payment_token.py create mode 100644 stripe/crypto/_customer_payment_token_service.py create mode 100644 stripe/crypto/_customer_service.py create mode 100644 stripe/crypto/_onramp_session.py create mode 100644 stripe/crypto/_onramp_session_service.py create mode 100644 stripe/crypto/_onramp_transaction_limits.py create mode 100644 stripe/crypto/_onramp_transaction_limits_service.py create mode 100644 stripe/params/crypto/__init__.py create mode 100644 stripe/params/crypto/_customer_consumer_wallet_list_params.py create mode 100644 stripe/params/crypto/_customer_list_crypto_consumer_wallets_params.py create mode 100644 stripe/params/crypto/_customer_list_payment_tokens_params.py create mode 100644 stripe/params/crypto/_customer_payment_token_list_params.py create mode 100644 stripe/params/crypto/_customer_retrieve_params.py create mode 100644 stripe/params/crypto/_onramp_session_checkout_params.py create mode 100644 stripe/params/crypto/_onramp_session_create_params.py create mode 100644 stripe/params/crypto/_onramp_session_list_params.py create mode 100644 stripe/params/crypto/_onramp_session_quote_params.py create mode 100644 stripe/params/crypto/_onramp_session_retrieve_params.py create mode 100644 stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index ccbf912af..001f568a9 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -e1d478e1eb9a108a07dce2bc9440521a24c68885 \ No newline at end of file +23a0d1c154d81b4b4185658446b2ee07f06f969a \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 83c68c9d1..7b59154f3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2324 \ No newline at end of file +v2342 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 9c0d93249..2ad4f0a5b 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -150,6 +150,7 @@ def add_beta_version( capital as capital, checkout as checkout, climate as climate, + crypto as crypto, delegated_checkout as delegated_checkout, entitlements as entitlements, events as events, @@ -281,6 +282,7 @@ def add_beta_version( from stripe._credit_note_service import ( CreditNoteService as CreditNoteService, ) + from stripe._crypto_service import CryptoService as CryptoService from stripe._custom_method import custom_method as custom_method from stripe._customer import Customer as Customer from stripe._customer_balance_transaction import ( @@ -688,6 +690,7 @@ def add_beta_version( "capital": ("stripe.capital", True), "checkout": ("stripe.checkout", True), "climate": ("stripe.climate", True), + "crypto": ("stripe.crypto", True), "delegated_checkout": ("stripe.delegated_checkout", True), "entitlements": ("stripe.entitlements", True), "events": ("stripe.events", True), @@ -784,6 +787,7 @@ def add_beta_version( False, ), "CreditNoteService": ("stripe._credit_note_service", False), + "CryptoService": ("stripe._crypto_service", False), "custom_method": ("stripe._custom_method", False), "Customer": ("stripe._customer", False), "CustomerBalanceTransaction": ( diff --git a/stripe/_api_version.py b/stripe/_api_version.py index bb5cecada..2a55cb507 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 = "2026-06-24.preview" + CURRENT = "2026-07-01.preview" diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index a59dd689e..34cc7d30d 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -200,6 +200,7 @@ class FeeDetail(StripeObject): "stripe_fee", "stripe_fx_fee", "tax_fee", + "tax_fund", "topup", "topup_reversal", "transfer", @@ -208,7 +209,7 @@ class FeeDetail(StripeObject): "transfer_refund", ] """ - Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. """ @classmethod @@ -216,9 +217,9 @@ def list( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = cls._static_request( "get", @@ -238,9 +239,9 @@ async def list_async( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = await cls._static_request_async( "get", diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 35023fd93..2166a14fc 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -24,9 +24,9 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", @@ -45,9 +45,9 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", diff --git a/stripe/_card.py b/stripe/_card.py index b11fe8a24..fa103f75e 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -43,6 +43,12 @@ class Networks(StripeObject): The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + account: Optional[ExpandableField["Account"]] address_city: Optional[str] """ @@ -172,6 +178,10 @@ class Networks(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this card. If not null, this card is associated to a redaction job. + """ regulated_status: Optional[Literal["regulated", "unregulated"]] """ Status of a card based on the card issuer. @@ -336,4 +346,8 @@ def retrieve(cls, id, **params): "(see https://stripe.com/docs/api/external_account_cards/retrieve)." ) - _inner_class_types = {"benefits": Benefits, "networks": Networks} + _inner_class_types = { + "benefits": Benefits, + "networks": Networks, + "redaction": Redaction, + } diff --git a/stripe/_charge.py b/stripe/_charge.py index 10cc00eb1..09bad1f1f 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -462,6 +462,10 @@ class Billie(StripeObject): """ class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -889,6 +893,10 @@ class ShippingAddress(StripeObject): """ A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) """ + electronic_commerce_indicator: Optional[str] + """ + The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. The response value is the source of truth; it may differ from the request value if the network downgraded the transaction. + """ exp_month: int """ Two-digit number representing the card's expiration month. @@ -966,6 +974,10 @@ class ShippingAddress(StripeObject): """ Populated if this transaction used 3D Secure authentication. """ + transaction_link_id: Optional[str] + """ + Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + """ wallet: Optional[Wallet] """ If this Card is part of a card wallet, this contains the details of the card wallet. @@ -1205,18 +1217,30 @@ class Cashapp(StripeObject): """ class Crypto(StripeObject): + amount_received: Optional[int] + """ + The amount received for the crypto payment. + """ + amount_requested: Optional[int] + """ + The amount requested for the crypto payment. + """ buyer_address: Optional[str] """ The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. @@ -1333,6 +1357,10 @@ class Balance(StripeObject): """ The expiration year of the gift card. """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular gift card number. You can use this attribute to check whether two transactions were made using the same gift card. + """ first6: str """ The first six digits of the gift card number. @@ -2037,6 +2065,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ mandate: Optional[str] """ ID of the multi use Mandate generated by the PaymentIntent @@ -2488,6 +2520,12 @@ class RadarOptions(StripeObject): A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -2685,6 +2723,10 @@ class TransferData(StripeObject): """ This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. """ + redaction: Optional[Redaction] + """ + Redaction status of this charge. If not null, this charge is associated to a redaction job. + """ refunded: bool """ Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. @@ -3148,6 +3190,7 @@ async def list_refunds_async( "payment_method_details": PaymentMethodDetails, "presentment_details": PresentmentDetails, "radar_options": RadarOptions, + "redaction": Redaction, "shipping": Shipping, "transfer_data": TransferData, } diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 6ce42d29d..6d0f9cc04 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -224,10 +224,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1361,7 +1367,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 41bd06f9b..d13ef0f2b 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -388,6 +388,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -416,6 +418,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 25ad2b823..804c35656 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -122,6 +122,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -153,6 +155,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_crypto_service.py b/stripe/_crypto_service.py new file mode 100644 index 000000000..494698068 --- /dev/null +++ b/stripe/_crypto_service.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.crypto._customer_service import CustomerService + from stripe.crypto._onramp_session_service import OnrampSessionService + from stripe.crypto._onramp_transaction_limits_service import ( + OnrampTransactionLimitsService, + ) + +_subservices = { + "customers": ["stripe.crypto._customer_service", "CustomerService"], + "onramp_sessions": [ + "stripe.crypto._onramp_session_service", + "OnrampSessionService", + ], + "onramp_transaction_limits": [ + "stripe.crypto._onramp_transaction_limits_service", + "OnrampTransactionLimitsService", + ], +} + + +class CryptoService(StripeService): + customers: "CustomerService" + onramp_sessions: "OnrampSessionService" + onramp_transaction_limits: "OnrampTransactionLimitsService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/_customer.py b/stripe/_customer.py index 88604ee3a..c65b5220b 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -200,6 +200,12 @@ class RenderingOptions(StripeObject): "rendering_options": RenderingOptions, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -391,6 +397,10 @@ class Location(StripeObject): """ The customer's preferred locales (languages), ordered by preference. """ + redaction: Optional[Redaction] + """ + Redaction status of this customer. If not null, this customer is associated to a redaction job. + """ shipping: Optional[Shipping] """ Mailing and shipping address for the customer. Appears on invoices emailed to this customer. @@ -1985,6 +1995,7 @@ def test_helpers(self): _inner_class_types = { "address": Address, "invoice_settings": InvoiceSettings, + "redaction": Redaction, "shipping": Shipping, "tax": Tax, } diff --git a/stripe/_dispute.py b/stripe/_dispute.py index b33703eeb..baab06ffe 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -35,6 +35,12 @@ class Dispute( class Evidence(StripeObject): class EnhancedEvidence(StripeObject): + class MastercardCompliance(StripeObject): + fee_acknowledged: bool + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + class VisaCompellingEvidence3(StripeObject): class DisputedTransaction(StripeObject): class ShippingAddress(StripeObject): @@ -179,9 +185,11 @@ class VisaCompliance(StripeObject): A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -299,6 +307,14 @@ class VisaCompliance(StripeObject): class EvidenceDetails(StripeObject): class EnhancedEligibility(StripeObject): + class MastercardCompliance(StripeObject): + status: Literal[ + "fee_acknowledged", "requires_fee_acknowledgement" + ] + """ + Mastercard compliance eligibility status. + """ + class VisaCompellingEvidence3(StripeObject): required_actions: List[ Literal[ @@ -327,9 +343,11 @@ class VisaCompliance(StripeObject): Visa compliance eligibility status. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -454,7 +472,11 @@ class SmartDisputes(StripeObject): 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", "visa_compliance"] + Literal[ + "mastercard_compliance", + "visa_compelling_evidence_3", + "visa_compliance", + ] ] """ List of eligibility types that are included in `enhanced_evidence`. diff --git a/stripe/_event.py b/stripe/_event.py index ce9bf0ab5..3390773ca 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -157,7 +157,13 @@ class Request(StripeObject): "balance_settings.updated", "billing.alert.recovered", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -268,6 +274,7 @@ class Request(StripeObject): "invoice.updated", "invoice.voided", "invoice.will_be_due", + "invoice_payment.detached", "invoice_payment.paid", "invoiceitem.created", "invoiceitem.deleted", @@ -437,13 +444,6 @@ class Request(StripeObject): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] """ Description of the event (for example, `invoice.created` or `charge.refunded`). diff --git a/stripe/_gift_card_operation.py b/stripe/_gift_card_operation.py index 33adcda21..1b62417ee 100644 --- a/stripe/_gift_card_operation.py +++ b/stripe/_gift_card_operation.py @@ -16,7 +16,7 @@ class GiftCardOperation(APIResource["GiftCardOperation"]): """ A GiftCardOperation represents an operation performed on a third-party gift card, - such as activation, deactivation, reload, cashout, balance check, or void. + such as activation, reload, cashout, balance check, or void. """ OBJECT_NAME: ClassVar[Literal["gift_card_operation"]] = ( @@ -118,9 +118,6 @@ class Balance(StripeObject): """ _inner_class_types = {"balance": Balance} - class Deactivation(StripeObject): - pass - class Reload(StripeObject): class Balance(StripeObject): amount: int @@ -204,10 +201,6 @@ class Balance(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ - deactivation: Optional[Deactivation] - """ - Details about a gift card deactivation operation. - """ failure_code: Optional[ Literal[ "action_not_supported", @@ -282,7 +275,6 @@ class Balance(StripeObject): "balance_check", "cashout", "cashout_void", - "deactivation", "reload", "reload_void", ] @@ -318,7 +310,6 @@ async def retrieve_async( "balance_check": BalanceCheck, "cashout": Cashout, "cashout_void": CashoutVoid, - "deactivation": Deactivation, "reload": Reload, "reload_void": ReloadVoid, } diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 903782ac1..210b94d26 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -465,6 +465,7 @@ class LastFinalizationError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -504,6 +505,10 @@ class LastFinalizationError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -1172,6 +1177,7 @@ class WechatPay(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 3ca3590b2..18b49ebeb 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -107,6 +107,23 @@ "stripe._credit_note_line_item", "CreditNoteLineItem", ), + "crypto.customer": ("stripe.crypto._customer", "Customer"), + "crypto.consumer_wallet": ( + "stripe.crypto._customer_consumer_wallet", + "CustomerConsumerWallet", + ), + "crypto.payment_token": ( + "stripe.crypto._customer_payment_token", + "CustomerPaymentToken", + ), + "crypto.onramp_session": ( + "stripe.crypto._onramp_session", + "OnrampSession", + ), + "crypto.onramp_transaction_limits": ( + "stripe.crypto._onramp_transaction_limits", + "OnrampTransactionLimits", + ), "customer": ("stripe._customer", "Customer"), "customer_balance_transaction": ( "stripe._customer_balance_transaction", diff --git a/stripe/_order.py b/stripe/_order.py index d1b5f5c95..0d58e9d67 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -511,7 +511,7 @@ class Sofort(StripeObject): class WechatPay(StripeObject): app_id: Optional[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: Optional[str] """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 9e2abd4ee..dc99d462e 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -446,6 +446,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -705,12 +709,6 @@ class GooglePay(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ - stored_credential_usage: Optional[ - Literal["recurring", "unscheduled"] - ] - """ - The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. - """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -945,18 +943,30 @@ class Cashapp(StripeObject): """ class Crypto(StripeObject): + amount_received: Optional[int] + """ + The amount received for the crypto payment. + """ + amount_requested: Optional[int] + """ + The amount requested for the crypto payment. + """ buyer_address: Optional[str] """ The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. @@ -1084,6 +1094,10 @@ class Balance(StripeObject): """ The expiration year of the gift card. """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular gift card number. You can use this attribute to check whether two transactions were made using the same gift card. + """ first6: Optional[str] """ The first six digits of the gift card number. diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 945ae0391..00e29b7ba 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -338,6 +338,7 @@ class LastPaymentError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -377,6 +378,10 @@ class LastPaymentError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -3870,6 +3875,12 @@ class Cashapp(StripeObject): """ class Crypto(StripeObject): + class AmountReconciliation(StripeObject): + type: Optional[Literal["accept_partial_funding", "exact"]] + """ + Controls how crypto funding amounts are reconciled for the PaymentIntent. + """ + class DepositOptions(StripeObject): networks: Optional[ List[ @@ -3898,6 +3909,7 @@ class TransactionVerificationOptions(StripeObject): The hash of the onchain transaction to verify. """ + amount_reconciliation: Optional[AmountReconciliation] deposit_options: Optional[DepositOptions] mode: Optional[ Literal["default", "deposit", "transaction_verification"] @@ -3919,6 +3931,7 @@ class TransactionVerificationOptions(StripeObject): TransactionVerificationOptions ] _inner_class_types = { + "amount_reconciliation": AmountReconciliation, "deposit_options": DepositOptions, "transaction_verification_options": TransactionVerificationOptions, } @@ -4588,6 +4601,18 @@ class Satispay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ + setup_future_usage: Optional[ + Literal["none", "off_session", "on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class Scalapay(StripeObject): capture_method: Optional[Literal["manual"]] @@ -4671,6 +4696,22 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -4812,7 +4853,7 @@ class MandateOptions(StripeObject): class WechatPay(StripeObject): app_id: Optional[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: Optional[str] """ @@ -4902,6 +4943,7 @@ class Zip(StripeObject): shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] @@ -4966,6 +5008,7 @@ class Zip(StripeObject): "shopeepay": Shopeepay, "sofort": Sofort, "stripe_balance": StripeBalance, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, @@ -5014,6 +5057,12 @@ class CustomerNotification(StripeObject): """ _inner_class_types = {"card": Card} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -5347,6 +5396,10 @@ class PaymentData(StripeObject): """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ + redaction: Optional[Redaction] + """ + Redaction status of this PaymentIntent. If the PaymentIntent isn't redacted, this field is null. + """ review: Optional[ExpandableField["Review"]] """ ID of the review associated with this PaymentIntent, if any. @@ -7596,6 +7649,7 @@ def test_helpers(self): "payments_orchestration": PaymentsOrchestration, "presentment_details": PresentmentDetails, "processing": Processing, + "redaction": Redaction, "shipping": Shipping, "transfer_data": TransferData, } diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 28385cb37..49ed9fda6 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -179,10 +179,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1342,7 +1348,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass @@ -1374,6 +1383,12 @@ class Dob(StripeObject): dob: Optional[Dob] _inner_class_types = {"dob": Dob} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class RevolutPay(StripeObject): pass @@ -1649,6 +1664,10 @@ class Zip(StripeObject): Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information. """ rechnung: Optional[Rechnung] + redaction: Optional[Redaction] + """ + Redaction status of this PaymentMethod. If the PaymentMethod is not redacted, this field will be null. + """ revolut_pay: Optional[RevolutPay] samsung_pay: Optional[SamsungPay] satispay: Optional[Satispay] @@ -2358,6 +2377,7 @@ async def retrieve_async( "qris": Qris, "radar_options": RadarOptions, "rechnung": Rechnung, + "redaction": Redaction, "revolut_pay": RevolutPay, "samsung_pay": SamsungPay, "satispay": Satispay, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index c0242f7d4..e72acad7b 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -449,6 +449,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -708,12 +712,6 @@ class GooglePay(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ - stored_credential_usage: Optional[ - Literal["recurring", "unscheduled"] - ] - """ - The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. - """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -948,18 +946,30 @@ class Cashapp(StripeObject): """ class Crypto(StripeObject): + amount_received: Optional[int] + """ + The amount received for the crypto payment. + """ + amount_requested: Optional[int] + """ + The amount requested for the crypto payment. + """ buyer_address: Optional[str] """ The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. @@ -1087,6 +1097,10 @@ class Balance(StripeObject): """ The expiration year of the gift card. """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular gift card number. You can use this attribute to check whether two transactions were made using the same gift card. + """ first6: Optional[str] """ The first six digits of the gift card number. diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index aa85d3af1..7f78a2dd5 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -421,6 +421,7 @@ class LastFinalizationError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -460,6 +461,10 @@ class LastFinalizationError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -1128,6 +1133,7 @@ class WechatPay(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index d9ffd0c43..c0a376304 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -383,11 +383,17 @@ class Payto(StripeObject): pass class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class RevolutPay(StripeObject): pass + class Satispay(StripeObject): + pass + class SepaDebit(StripeObject): pass @@ -460,6 +466,7 @@ class UsBankAccount(StripeObject): payto: Optional[Payto] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] + satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] @@ -492,6 +499,7 @@ class UsBankAccount(StripeObject): "payto": Payto, "pix": Pix, "revolut_pay": RevolutPay, + "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, "stripe_balance": StripeBalance, @@ -523,6 +531,7 @@ class SetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -562,6 +571,10 @@ class SetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 1e5a2949e..8b45bf464 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -108,6 +108,7 @@ class LastSetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -147,6 +148,10 @@ class LastSetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -955,6 +960,12 @@ class MandateOptions(StripeObject): "us_bank_account": UsBankAccount, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class SetupDetails(StripeObject): class Benefit(StripeObject): class FrMealVoucher(StripeObject): @@ -1157,6 +1168,10 @@ class FrMealVoucher(StripeObject): """ The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ + redaction: Optional[Redaction] + """ + Redaction status of this SetupIntent. If the SetupIntent isn't redacted, this field is null. + """ setup_details: Optional[SetupDetails] single_use_mandate: Optional[ExpandableField["Mandate"]] """ @@ -1783,5 +1798,6 @@ async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues "next_action": NextAction, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, + "redaction": Redaction, "setup_details": SetupDetails, } diff --git a/stripe/_source.py b/stripe/_source.py index af3fdc3ff..a2ed66cf7 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -330,6 +330,12 @@ class Receiver(StripeObject): Type of refund attribute status, one of `missing`, `requested`, or `available`. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Redirect(StripeObject): failure_reason: Optional[str] """ @@ -564,6 +570,10 @@ class Wechat(StripeObject): p24: Optional[P24] paypal: Optional[Paypal] receiver: Optional[Receiver] + redaction: Optional[Redaction] + """ + Redaction status of this source. If not null, this source is associated to a redaction job. + """ redirect: Optional[Redirect] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] @@ -960,6 +970,7 @@ def detach(self, **params) -> "Source": "p24": P24, "paypal": Paypal, "receiver": Receiver, + "redaction": Redaction, "redirect": Redirect, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index d0ba16db8..ea57c7178 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -67,6 +67,7 @@ from stripe._country_spec_service import CountrySpecService from stripe._coupon_service import CouponService from stripe._credit_note_service import CreditNoteService + from stripe._crypto_service import CryptoService from stripe._customer_service import CustomerService from stripe._customer_session_service import CustomerSessionService from stripe._delegated_checkout_service import DelegatedCheckoutService @@ -614,6 +615,17 @@ def coupons(self) -> "CouponService": def credit_notes(self) -> "CreditNoteService": return self.v1.credit_notes + @property + @deprecated( + """ + StripeClient.crypto is deprecated, use StripeClient.v1.crypto instead. + All functionality under it has been copied over to StripeClient.v1.crypto. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def crypto(self) -> "CryptoService": + return self.v1.crypto + @property @deprecated( """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index f9413d97e..00d84d345 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -252,6 +252,16 @@ class CancellationDetails(StripeObject): """ class InvoiceSettings(StripeObject): + class CustomField(StripeObject): + name: str + """ + The name of the custom field. + """ + value: str + """ + The value of the custom field. + """ + class Issuer(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -266,8 +276,20 @@ class Issuer(StripeObject): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: Optional[List[CustomField]] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: Optional[str] + """ + Footer to be displayed on the invoice. + """ issuer: Issuer - _inner_class_types = {"issuer": Issuer} + _inner_class_types = {"custom_fields": CustomField, "issuer": Issuer} class LastPriceMigrationError(StripeObject): class FailedTransition(StripeObject): @@ -717,6 +739,7 @@ class WechatPay(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", @@ -1219,7 +1242,7 @@ def _cls_cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1245,7 +1268,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1258,7 +1281,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1271,7 +1294,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1295,7 +1318,7 @@ async def _cls_cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1321,7 +1344,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1334,7 +1357,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1347,7 +1370,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index fb8c5f56b..2edf059e6 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -57,7 +57,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -85,7 +85,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/_tax_fund.py b/stripe/_tax_fund.py index 114f4e98b..6bfb320e8 100644 --- a/stripe/_tax_fund.py +++ b/stripe/_tax_fund.py @@ -23,19 +23,46 @@ class TaxFund(ListableAPIResource["TaxFund"]): class Context(StripeObject): checkout_session: Optional[str] + """ + The Checkout Session associated with this sweep, if any. + """ credit_note: Optional[str] + """ + The Credit Note associated with this sweep, if any. + """ invoice: Optional[str] + """ + The Invoice associated with this sweep, if any. + """ payment_intent: Optional[str] + """ + The PaymentIntent associated with this sweep, if any. + """ refund: Optional[str] + """ + The Refund associated with this sweep, if any. + """ tax_transaction: Optional[str] + """ + The Tax Transaction associated with this sweep, if any. + """ class Destination(StripeObject): class PaymentsBalance(StripeObject): balance_transaction: ExpandableField["BalanceTransaction"] + """ + The balance transaction on the payments balance side of the sweep. + """ class TaxFundAccount(StripeObject): financial_account: Optional[str] + """ + The tax fund financial account involved in the sweep. + """ transaction: Optional[str] + """ + The financial account transaction on the tax fund account side of the sweep. + """ payments_balance: Optional[PaymentsBalance] """ @@ -46,6 +73,9 @@ class TaxFundAccount(StripeObject): Details about the tax fund financial account side of the sweep. """ type: str + """ + The type of account funds moved to or from. Either `payments_balance` or `tax_fund_account`. + """ _inner_class_types = { "payments_balance": PaymentsBalance, "tax_fund_account": TaxFundAccount, @@ -54,10 +84,19 @@ class TaxFundAccount(StripeObject): class Source(StripeObject): class PaymentsBalance(StripeObject): balance_transaction: ExpandableField["BalanceTransaction"] + """ + The balance transaction on the payments balance side of the sweep. + """ class TaxFundAccount(StripeObject): financial_account: Optional[str] + """ + The tax fund financial account involved in the sweep. + """ transaction: Optional[str] + """ + The financial account transaction on the tax fund account side of the sweep. + """ payments_balance: Optional[PaymentsBalance] """ @@ -68,6 +107,9 @@ class TaxFundAccount(StripeObject): Details about the tax fund financial account side of the sweep. """ type: str + """ + The type of account funds moved to or from. Either `payments_balance` or `tax_fund_account`. + """ _inner_class_types = { "payments_balance": PaymentsBalance, "tax_fund_account": TaxFundAccount, @@ -75,7 +117,13 @@ class TaxFundAccount(StripeObject): class Trigger(StripeObject): balance_transaction: ExpandableField["BalanceTransaction"] + """ + The balance transaction on the payments balance that triggered the sweep. + """ type: str + """ + The type of event that triggered the sweep. Always `balance_transaction`. + """ amount: int """ diff --git a/stripe/_token.py b/stripe/_token.py index d316f43f5..064d03e84 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource +from stripe._stripe_object import StripeObject from typing import ClassVar, Optional, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -36,6 +37,13 @@ class Token(CreateableAPIResource["Token"]): """ OBJECT_NAME: ClassVar[Literal["token"]] = "token" + + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + bank_account: Optional["BankAccount"] """ These bank accounts are payment methods on `Customer` objects. @@ -74,6 +82,10 @@ class Token(CreateableAPIResource["Token"]): """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this token. If not null, this token is associated to a redaction job. + """ type: str """ Type of the token: `account`, `bank_account`, `card`, or `pii`. @@ -136,3 +148,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"redaction": Redaction} diff --git a/stripe/_v1_services.py b/stripe/_v1_services.py index e124cf813..a9452895a 100644 --- a/stripe/_v1_services.py +++ b/stripe/_v1_services.py @@ -26,6 +26,7 @@ from stripe._country_spec_service import CountrySpecService from stripe._coupon_service import CouponService from stripe._credit_note_service import CreditNoteService + from stripe._crypto_service import CryptoService from stripe._customer_service import CustomerService from stripe._customer_session_service import CustomerSessionService from stripe._delegated_checkout_service import DelegatedCheckoutService @@ -162,6 +163,7 @@ "country_specs": ["stripe._country_spec_service", "CountrySpecService"], "coupons": ["stripe._coupon_service", "CouponService"], "credit_notes": ["stripe._credit_note_service", "CreditNoteService"], + "crypto": ["stripe._crypto_service", "CryptoService"], "customers": ["stripe._customer_service", "CustomerService"], "customer_sessions": [ "stripe._customer_session_service", @@ -323,6 +325,7 @@ class V1Services(StripeService): country_specs: "CountrySpecService" coupons: "CouponService" credit_notes: "CreditNoteService" + crypto: "CryptoService" customers: "CustomerService" customer_sessions: "CustomerSessionService" delegated_checkout: "DelegatedCheckoutService" diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index c602ba2bd..d91e66d72 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -109,6 +109,19 @@ class OfferedTerms(StripeObject): """ Time at which the offer was created. Given in seconds since unix epoch. """ + disclaimer_variant: Optional[ + Literal[ + "celtic_us_loan", + "fundbox_au_financing", + "youlend_de_financing", + "youlend_fr_financing", + "youlend_uk_mca", + "youlend_us_mca", + ] + ] + """ + The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the [marketing docs](https://docs.stripe.com/capital/marketing). + """ expires_after: float """ Time at which the offer expires. Given in seconds since unix epoch. diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 69e9fa7ef..85bbc1ec6 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -54,6 +54,19 @@ class CurrentRepaymentInterval(StripeObject): """ The chronologically current repayment interval for the financing offer. """ + disclaimer_variant: Optional[ + Literal[ + "celtic_us_loan", + "fundbox_au_financing", + "youlend_de_financing", + "youlend_fr_financing", + "youlend_uk_mca", + "youlend_us_mca", + ] + ] + """ + The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the [regulatory compliance docs](https://docs.stripe.com/capital/regulatory-compliance). + """ fee_amount: int """ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 378fd6a80..01e894a58 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -21,10 +21,11 @@ from stripe._payment_intent import PaymentIntent from stripe._payment_link import PaymentLink from stripe._payment_record import PaymentRecord + from stripe._price import Price from stripe._promotion_code import PromotionCode from stripe._setup_intent import SetupIntent from stripe._shipping_rate import ShippingRate - from stripe._subscription import Subscription + from stripe._subscription import Subscription as SubscriptionResource from stripe._tax_id import TaxId as TaxIdResource from stripe._tax_rate import TaxRate from stripe.params.checkout._session_approve_params import ( @@ -1154,14 +1155,97 @@ class RenderingOptions(StripeObject): _inner_class_types = {"invoice_data": InvoiceData} class Item(StripeObject): + class Subscription(StripeObject): + class Item(StripeObject): + price: ExpandableField["Price"] + """ + The price for this subscription item. + """ + quantity: Optional[int] + """ + The quantity for this subscription item. + """ + + class PendingInvoiceItemInterval(StripeObject): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + class TrialSettings(StripeObject): + class EndBehavior(StripeObject): + missing_payment_method: Literal[ + "cancel", "create_invoice", "pause" + ] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ + + end_behavior: EndBehavior + """ + Defines how a subscription behaves when a free trial ends. + """ + _inner_class_types = {"end_behavior": EndBehavior} + + description: Optional[str] + """ + The description for the subscription. + """ + items: List[Item] + """ + The items in the subscription. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs attached to the subscription. + """ + pending_invoice_item_interval: Optional[PendingInvoiceItemInterval] + """ + Specifies an interval for how often to bill for any pending invoice items. + """ + proration_behavior: Optional[Literal["create_prorations", "none"]] + """ + Determines how to handle prorations when the subscription is updated. + """ + subscription: Optional[ExpandableField["SubscriptionResource"]] + """ + The ID of the [Subscription](https://docs.stripe.com/api/subscriptions). + """ + trial_end: Optional[int] + """ + The Unix timestamp marking when the trial period ends. + """ + trial_period_days: Optional[int] + """ + The number of trial period days before the customer is charged for the first time. + """ + trial_settings: Optional[TrialSettings] + """ + Settings related to subscription trials. + """ + _inner_class_types = { + "items": Item, + "pending_invoice_item_interval": PendingInvoiceItemInterval, + "trial_settings": TrialSettings, + } + key: str """ The key of the item. Guaranteed to be a unique ID within this checkout session's items. """ + subscription: Optional[Subscription] + """ + Details on the subscription for this item. + """ type: Literal["subscription"] """ The type of the item. """ + _inner_class_types = {"subscription": Subscription} class ManagedPayments(StripeObject): enabled: bool @@ -2052,6 +2136,22 @@ class Sofort(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -2186,6 +2286,26 @@ class ManualEntry(StripeObject): "financial_connections": FinancialConnections } + class WechatPay(StripeObject): + app_id: Optional[str] + """ + The app ID registered with WeChat Pay. Only required when client is iOS or Android. + """ + client: Optional[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: Optional[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + acss_debit: Optional[AcssDebit] affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] @@ -2227,10 +2347,12 @@ class ManualEntry(StripeObject): scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] us_bank_account: Optional[UsBankAccount] + wechat_pay: Optional[WechatPay] _inner_class_types = { "acss_debit": AcssDebit, "affirm": Affirm, @@ -2273,10 +2395,12 @@ class ManualEntry(StripeObject): "scalapay": Scalapay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, "us_bank_account": UsBankAccount, + "wechat_pay": WechatPay, } class Permissions(StripeObject): @@ -2338,6 +2462,12 @@ class PresentmentDetails(StripeObject): Currency presented to the customer during payment. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class SavedPaymentMethodOptions(StripeObject): allow_redisplay_filters: Optional[ List[Literal["always", "limited", "unspecified"]] @@ -3067,6 +3197,10 @@ class Link(StripeObject): """ The ID of the original expired Checkout Session that triggered the recovery flow. """ + redaction: Optional[Redaction] + """ + The redaction status of the Checkout Session. If the Session is not redacted, this field is null. + """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] """ This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. @@ -3107,7 +3241,7 @@ class Link(StripeObject): relevant text on the page, such as the submit button. `submit_type` can only be specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. """ - subscription: Optional[ExpandableField["Subscription"]] + subscription: Optional[ExpandableField["SubscriptionResource"]] """ The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode. """ @@ -3636,6 +3770,7 @@ async def retrieve_async( "permissions": Permissions, "phone_number_collection": PhoneNumberCollection, "presentment_details": PresentmentDetails, + "redaction": Redaction, "saved_payment_method_options": SavedPaymentMethodOptions, "shipping_address_collection": ShippingAddressCollection, "shipping_cost": ShippingCost, diff --git a/stripe/crypto/__init__.py b/stripe/crypto/__init__.py new file mode 100644 index 000000000..9130f19a6 --- /dev/null +++ b/stripe/crypto/__init__.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.crypto._customer import Customer as Customer + from stripe.crypto._customer_consumer_wallet import ( + CustomerConsumerWallet as CustomerConsumerWallet, + ) + from stripe.crypto._customer_consumer_wallet_service import ( + CustomerConsumerWalletService as CustomerConsumerWalletService, + ) + from stripe.crypto._customer_payment_token import ( + CustomerPaymentToken as CustomerPaymentToken, + ) + from stripe.crypto._customer_payment_token_service import ( + CustomerPaymentTokenService as CustomerPaymentTokenService, + ) + from stripe.crypto._customer_service import ( + CustomerService as CustomerService, + ) + from stripe.crypto._onramp_session import OnrampSession as OnrampSession + from stripe.crypto._onramp_session_service import ( + OnrampSessionService as OnrampSessionService, + ) + from stripe.crypto._onramp_transaction_limits import ( + OnrampTransactionLimits as OnrampTransactionLimits, + ) + from stripe.crypto._onramp_transaction_limits_service import ( + OnrampTransactionLimitsService as OnrampTransactionLimitsService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "Customer": ("stripe.crypto._customer", False), + "CustomerConsumerWallet": ( + "stripe.crypto._customer_consumer_wallet", + False, + ), + "CustomerConsumerWalletService": ( + "stripe.crypto._customer_consumer_wallet_service", + False, + ), + "CustomerPaymentToken": ("stripe.crypto._customer_payment_token", False), + "CustomerPaymentTokenService": ( + "stripe.crypto._customer_payment_token_service", + False, + ), + "CustomerService": ("stripe.crypto._customer_service", False), + "OnrampSession": ("stripe.crypto._onramp_session", False), + "OnrampSessionService": ("stripe.crypto._onramp_session_service", False), + "OnrampTransactionLimits": ( + "stripe.crypto._onramp_transaction_limits", + False, + ), + "OnrampTransactionLimitsService": ( + "stripe.crypto._onramp_transaction_limits_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/crypto/_customer.py b/stripe/crypto/_customer.py new file mode 100644 index 000000000..2d8de155c --- /dev/null +++ b/stripe/crypto/_customer.py @@ -0,0 +1,222 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_resource import APIResource +from stripe._list_object import ListObject +from stripe._nested_resource_class_methods import nested_resource_class_methods +from stripe._stripe_object import StripeObject +from stripe._util import sanitize_id +from typing import ClassVar, List, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.crypto._customer_consumer_wallet import CustomerConsumerWallet + from stripe.crypto._customer_payment_token import CustomerPaymentToken + from stripe.params.crypto._customer_list_crypto_consumer_wallets_params import ( + CustomerListCryptoConsumerWalletsParams, + ) + from stripe.params.crypto._customer_list_payment_tokens_params import ( + CustomerListPaymentTokensParams, + ) + from stripe.params.crypto._customer_retrieve_params import ( + CustomerRetrieveParams, + ) + + +@nested_resource_class_methods("crypto_consumer_wallet") +@nested_resource_class_methods("payment_token") +class Customer(APIResource["Customer"]): + """ + This object represents a crypto onramp customer. Use it to get their kyc status and payment methods. + """ + + OBJECT_NAME: ClassVar[Literal["crypto.customer"]] = "crypto.customer" + + class KycTier(StripeObject): + tier: Literal["l0", "l1", "l2"] + """ + The KYC tier level (e.g., l0, l1, l2). + """ + verification_errors: List[ + Literal[ + "id_document_verification_failed", + "phone_verification_failed", + "user_has_reached_max_verification_attempts", + ] + ] + """ + List of errors associated with this KYC tier verification. + """ + verification_status: Literal[ + "not_available", "not_started", "pending", "rejected", "verified" + ] + """ + The verification status for this KYC tier. + """ + + class Verification(StripeObject): + errors: List[ + Literal[ + "id_document_verification_failed", + "phone_verification_failed", + "user_has_reached_max_verification_attempts", + ] + ] + """ + List of errors associated with the verification. + """ + name: Literal["id_document_verified", "kyc_verified", "phone_verified"] + """ + Type of verification. + """ + status: Literal[ + "not_available", "not_started", "pending", "rejected", "verified" + ] + """ + Outcome of the verification. + """ + + id: str + """ + Unique identifier for the object. + """ + kyc_region: Optional[Literal["eu", "us"]] + """ + The KYC region determined by the customer's address country. + """ + kyc_tiers: List[KycTier] + """ + List of KYC tiers and their verification status. + """ + object: Literal["crypto.customer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + provided_fields: List[ + Literal[ + "address_city", + "address_country", + "address_line_1", + "address_line_2", + "address_postal_code", + "address_state", + "attestation", + "birth_city", + "birth_country", + "dob", + "first_name", + "id_document", + "id_number", + "id_type", + "identifiers", + "last_name", + "nationalities", + "selfie", + ] + ] + """ + The set of KYC Fields provided for this customers. + """ + verifications: List[Verification] + """ + List of verifications and their outcome. + """ + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["CustomerRetrieveParams"] + ) -> "Customer": + """ + Retrieves the details of a Crypto Customer. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["CustomerRetrieveParams"] + ) -> "Customer": + """ + Retrieves the details of a Crypto Customer. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def list_crypto_consumer_wallets( + cls, + id: str, + **params: Unpack["CustomerListCryptoConsumerWalletsParams"], + ) -> ListObject["CustomerConsumerWallet"]: + """ + Lists the Consumer Wallets for a Crypto Customer. + """ + return cast( + ListObject["CustomerConsumerWallet"], + cls._static_request( + "get", + "/v1/crypto/customers/{id}/crypto_consumer_wallets".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + async def list_crypto_consumer_wallets_async( + cls, + id: str, + **params: Unpack["CustomerListCryptoConsumerWalletsParams"], + ) -> ListObject["CustomerConsumerWallet"]: + """ + Lists the Consumer Wallets for a Crypto Customer. + """ + return cast( + ListObject["CustomerConsumerWallet"], + await cls._static_request_async( + "get", + "/v1/crypto/customers/{id}/crypto_consumer_wallets".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + def list_payment_tokens( + cls, id: str, **params: Unpack["CustomerListPaymentTokensParams"] + ) -> ListObject["CustomerPaymentToken"]: + """ + Lists the Payment Tokens for a Crypto Customer. + """ + return cast( + ListObject["CustomerPaymentToken"], + cls._static_request( + "get", + "/v1/crypto/customers/{id}/payment_tokens".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + async def list_payment_tokens_async( + cls, id: str, **params: Unpack["CustomerListPaymentTokensParams"] + ) -> ListObject["CustomerPaymentToken"]: + """ + Lists the Payment Tokens for a Crypto Customer. + """ + return cast( + ListObject["CustomerPaymentToken"], + await cls._static_request_async( + "get", + "/v1/crypto/customers/{id}/payment_tokens".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + _inner_class_types = {"kyc_tiers": KycTier, "verifications": Verification} diff --git a/stripe/crypto/_customer_consumer_wallet.py b/stripe/crypto/_customer_consumer_wallet.py new file mode 100644 index 000000000..535120400 --- /dev/null +++ b/stripe/crypto/_customer_consumer_wallet.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class CustomerConsumerWallet(StripeObject): + """ + A consumer wallet represents a cryptocurrency wallet address associated with a Crypto Customer. + """ + + OBJECT_NAME: ClassVar[Literal["crypto.consumer_wallet"]] = ( + "crypto.consumer_wallet" + ) + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + network: Literal[ + "aptos", + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + """ + The blockchain network for this wallet + """ + object: Literal["crypto.consumer_wallet"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + verified_ownership: bool + """ + Whether ownership of this wallet has been verified + """ + wallet_address: str + """ + The wallet address + """ diff --git a/stripe/crypto/_customer_consumer_wallet_service.py b/stripe/crypto/_customer_consumer_wallet_service.py new file mode 100644 index 000000000..99f54f9b4 --- /dev/null +++ b/stripe/crypto/_customer_consumer_wallet_service.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.crypto._customer_consumer_wallet import CustomerConsumerWallet + from stripe.params.crypto._customer_consumer_wallet_list_params import ( + CustomerConsumerWalletListParams, + ) + + +class CustomerConsumerWalletService(StripeService): + def list( + self, + id: str, + params: Optional["CustomerConsumerWalletListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerConsumerWallet]": + """ + Lists the Consumer Wallets for a Crypto Customer. + """ + return cast( + "ListObject[CustomerConsumerWallet]", + self._request( + "get", + "/v1/crypto/customers/{id}/crypto_consumer_wallets".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + id: str, + params: Optional["CustomerConsumerWalletListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerConsumerWallet]": + """ + Lists the Consumer Wallets for a Crypto Customer. + """ + return cast( + "ListObject[CustomerConsumerWallet]", + await self._request_async( + "get", + "/v1/crypto/customers/{id}/crypto_consumer_wallets".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/crypto/_customer_payment_token.py b/stripe/crypto/_customer_payment_token.py new file mode 100644 index 000000000..fff7414ad --- /dev/null +++ b/stripe/crypto/_customer_payment_token.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class CustomerPaymentToken(StripeObject): + """ + A read-only representation of a user's PaymentMethod for use in Crypto On Ramp transactions. + """ + + OBJECT_NAME: ClassVar[Literal["crypto.payment_token"]] = ( + "crypto.payment_token" + ) + + class Card(StripeObject): + class Wallet(StripeObject): + type: Literal["apple_pay", "google_pay"] + """ + The type of the card wallet, one of `apple_pay` or `google_pay`. + """ + + brand: Optional[str] + """ + Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + """ + exp_month: Optional[int] + """ + Two-digit number representing the card's expiration month. + """ + exp_year: Optional[int] + """ + Four-digit number representing the card's expiration year. + """ + funding: str + """ + Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + """ + last4: Optional[str] + """ + The last four digits of the card. + """ + wallet: Optional[Wallet] + """ + If this Card is part of a card wallet, this contains the details of the card wallet. + """ + _inner_class_types = {"wallet": Wallet} + + class UsBankAccount(StripeObject): + account_type: Optional[Literal["checking", "savings"]] + """ + Account type: `checkings` or `savings`. + """ + bank_name: Optional[str] + """ + The name of the bank. + """ + last4: Optional[str] + """ + Last four digits of the bank account number. + """ + + card: Optional[Card] + """ + A `card` PaymentToken, this hash contains details of the card PaymentToken. + """ + id: str + """ + Unique identifier for the object. + """ + object: Literal["crypto.payment_token"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + type: Literal["card", "us_bank_account"] + """ + Type of the Payment Token. + """ + us_bank_account: Optional[UsBankAccount] + """ + A `us_bank_account` PaymentToken, this hash contains details of the US bank account PaymentToken. + """ + _inner_class_types = {"card": Card, "us_bank_account": UsBankAccount} diff --git a/stripe/crypto/_customer_payment_token_service.py b/stripe/crypto/_customer_payment_token_service.py new file mode 100644 index 000000000..d40afa833 --- /dev/null +++ b/stripe/crypto/_customer_payment_token_service.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.crypto._customer_payment_token import CustomerPaymentToken + from stripe.params.crypto._customer_payment_token_list_params import ( + CustomerPaymentTokenListParams, + ) + + +class CustomerPaymentTokenService(StripeService): + def list( + self, + id: str, + params: Optional["CustomerPaymentTokenListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerPaymentToken]": + """ + Lists the Payment Tokens for a Crypto Customer. + """ + return cast( + "ListObject[CustomerPaymentToken]", + self._request( + "get", + "/v1/crypto/customers/{id}/payment_tokens".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + id: str, + params: Optional["CustomerPaymentTokenListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerPaymentToken]": + """ + Lists the Payment Tokens for a Crypto Customer. + """ + return cast( + "ListObject[CustomerPaymentToken]", + await self._request_async( + "get", + "/v1/crypto/customers/{id}/payment_tokens".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/crypto/_customer_service.py b/stripe/crypto/_customer_service.py new file mode 100644 index 000000000..69d3623de --- /dev/null +++ b/stripe/crypto/_customer_service.py @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.crypto._customer import Customer + from stripe.crypto._customer_consumer_wallet_service import ( + CustomerConsumerWalletService, + ) + from stripe.crypto._customer_payment_token_service import ( + CustomerPaymentTokenService, + ) + from stripe.params.crypto._customer_retrieve_params import ( + CustomerRetrieveParams, + ) + +_subservices = { + "consumer_wallets": [ + "stripe.crypto._customer_consumer_wallet_service", + "CustomerConsumerWalletService", + ], + "payment_tokens": [ + "stripe.crypto._customer_payment_token_service", + "CustomerPaymentTokenService", + ], +} + + +class CustomerService(StripeService): + consumer_wallets: "CustomerConsumerWalletService" + payment_tokens: "CustomerPaymentTokenService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() + + def retrieve( + self, + id: str, + params: Optional["CustomerRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Customer": + """ + Retrieves the details of a Crypto Customer. + """ + return cast( + "Customer", + self._request( + "get", + "/v1/crypto/customers/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["CustomerRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Customer": + """ + Retrieves the details of a Crypto Customer. + """ + return cast( + "Customer", + await self._request_async( + "get", + "/v1/crypto/customers/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/crypto/_onramp_session.py b/stripe/crypto/_onramp_session.py new file mode 100644 index 000000000..ef769fa16 --- /dev/null +++ b/stripe/crypto/_onramp_session.py @@ -0,0 +1,579 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, List, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.crypto._onramp_session_checkout_params import ( + OnrampSessionCheckoutParams, + ) + from stripe.params.crypto._onramp_session_create_params import ( + OnrampSessionCreateParams, + ) + from stripe.params.crypto._onramp_session_list_params import ( + OnrampSessionListParams, + ) + from stripe.params.crypto._onramp_session_quote_params import ( + OnrampSessionQuoteParams, + ) + from stripe.params.crypto._onramp_session_retrieve_params import ( + OnrampSessionRetrieveParams, + ) + + +class OnrampSession( + CreateableAPIResource["OnrampSession"], + ListableAPIResource["OnrampSession"], +): + """ + A Crypto Onramp Session represents your customer's session as they purchase cryptocurrency through Stripe. Once payment is successful, Stripe will fulfill the delivery of cryptocurrency to your user's wallet and contain a reference to the crypto transaction ID. + + You can create an onramp session on your server and embed the widget on your frontend. Alternatively, you can redirect your users to the standalone hosted onramp. + + Related guide: [Integrate the onramp](https://docs.stripe.com/crypto/integrate-the-onramp) + """ + + OBJECT_NAME: ClassVar[Literal["crypto.onramp_session"]] = ( + "crypto.onramp_session" + ) + + class TransactionDetails(StripeObject): + class Fees(StripeObject): + network_fee_amount: Optional[str] + """ + The cost associated with moving crypto from Stripe to the end consumer's wallet. e.g: for ETH, this is called 'gas fee', for BTC this is a 'miner's fee'. + """ + transaction_fee_amount: Optional[str] + """ + Fee for processing the transaction. + """ + + class WalletAddresses(StripeObject): + class DestinationTags(StripeObject): + stellar: Optional[str] + """ + A stellar destination tag + """ + + avalanche: Optional[str] + """ + An avalanche address + """ + base_network: Optional[str] + """ + A base address + """ + bitcoin: Optional[str] + """ + A bitcoin address + """ + destination_tags: Optional[DestinationTags] + """ + The end customer's crypto wallet destination tag (for each network) to use for this transaction. + """ + ethereum: Optional[str] + """ + An ethereum address + """ + optimism: Optional[str] + """ + An optimism address + """ + polygon: Optional[str] + """ + A polygon address + """ + solana: Optional[str] + """ + A solana address + """ + stellar: Optional[str] + """ + A stellar address + """ + worldchain: Optional[str] + """ + A worldchain address + """ + _inner_class_types = {"destination_tags": DestinationTags} + + destination_amount: Optional[str] + """ + The amount of crypto the customer will get deposited into their wallet + """ + destination_currencies: Optional[ + List[ + Literal[ + "avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm" + ] + ] + ] + """ + If a platform wants to lock the currencies an session will support, they can add supported currencies to this array. If left null, the experience will allow selection of all supported destination currencies. + """ + destination_currency: Optional[ + Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + ] + """ + The selected `destination_currency` to convert the `source` to. This should be a crypto currency code. If `destination_currencies` is set, it must be a value in that array. + """ + destination_network: Optional[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + """ + The specific crypto network the `destination_currency` is settled on. If `destination_networks` is set, it must be a value in that array. + """ + destination_networks: Optional[ + List[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + ] + """ + If a platform wants to lock the supported networks, they can do so through this array. If left null, the experience will allow selection of all supported networks. + """ + fees: Optional[Fees] + """ + Details about the fees associated with this transaction + """ + lock_wallet_address: Optional[bool] + """ + Whether or not to lock the suggested wallet address. + """ + settlement_speed: Optional[Literal["instant", "standard"]] + """ + Speed at which the cryptocurrency is delivered to the wallet + One of: + `instant` (default): crypto is delivered when payment is confirmed + `standard`: crypto is delivered when payment settles + """ + source_amount: Optional[str] + """ + The amount of fiat we intend to onramp - excluding fees + """ + source_currency: Optional[Literal["eur", "gbp", "usd"]] + """ + A fiat currency code + """ + transaction_id: Optional[str] + """ + The on-chain transaction hash (also referred to as transaction ID or tx_hash) of the transaction that was sent to the customer's wallet. The format varies by chain (e.g. `0xc257...1a95` on Ethereum, `5UB1...v3xZ` on Solana, or `a1b2...bf00` on Bitcoin). This will only be set if the session reaches `status=fulfillment_complete` and we've transferred the crypto successfully to the external wallet. + """ + wallet_address: Optional[str] + """ + The consumer's wallet address (where crypto will be sent to) + """ + wallet_addresses: Optional[WalletAddresses] + """ + The end customer's crypto wallet address (for each network) to use for this transaction. + """ + _inner_class_types = { + "fees": Fees, + "wallet_addresses": WalletAddresses, + } + + client_secret: str + """ + A client secret that can be used to drive a single session using our embedded widget. + + Related guide: [Set up an onramp integration](https://docs.stripe.com/crypto/integrate-the-onramp) + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + id: str + """ + Unique identifier for the object. + """ + kyc_details_provided: bool + """ + Has the value `true` if any user kyc details were provided during the creation of the onramp session. Otherwise, has the value `false`. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of [key-value pairs](https://docs.stripe.com/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["crypto.onramp_session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + redirect_url: Optional[str] + """ + Redirect your users to the URL for a prebuilt frontend integration of the crypto onramp on the standalone hosted onramp. + + Related guide: [Mint a session with a redirect url](https://docs.stripe.com/crypto/standalone-hosted-onramp#mint-a-session-with-a-redirect-url) + """ + status: str + """ + The status of the Onramp Session. One of = `{initialized, rejected, requires_payment, fulfillment_processing, fulfillment_complete}` + """ + transaction_details: TransactionDetails + + @classmethod + def _cls_checkout( + cls, id: str, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + cls._static_request( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def checkout( + id: str, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + ... + + @overload + def checkout( + self, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + ... + + @class_method_variant("_cls_checkout") + def checkout( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + self._request( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_checkout_async( + cls, id: str, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + await cls._static_request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def checkout_async( + id: str, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + ... + + @overload + async def checkout_async( + self, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + ... + + @class_method_variant("_cls_checkout_async") + async def checkout_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["OnrampSessionCheckoutParams"] + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + await self._request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def create( + cls, **params: Unpack["OnrampSessionCreateParams"] + ) -> "OnrampSession": + """ + Creates a CryptoOnrampSession object. + + After the CryptoOnrampSession is created, display the onramp session modal using the client_secret. + + Related guide: [Set up an onramp integration](https://docs.stripe.com/docs/crypto/integrate-the-onramp) + """ + return cast( + "OnrampSession", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["OnrampSessionCreateParams"] + ) -> "OnrampSession": + """ + Creates a CryptoOnrampSession object. + + After the CryptoOnrampSession is created, display the onramp session modal using the client_secret. + + Related guide: [Set up an onramp integration](https://docs.stripe.com/docs/crypto/integrate-the-onramp) + """ + return cast( + "OnrampSession", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["OnrampSessionListParams"] + ) -> ListObject["OnrampSession"]: + """ + Returns a list of onramp sessions that match the filter criteria. The onramp sessions are returned in sorted order, with the most recent onramp sessions appearing first. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["OnrampSessionListParams"] + ) -> ListObject["OnrampSession"]: + """ + Returns a list of onramp sessions that match the filter criteria. The onramp sessions are returned in sorted order, with the most recent onramp sessions appearing first. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def _cls_quote( + cls, id: str, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + cls._static_request( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def quote( + id: str, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + ... + + @overload + def quote( + self, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + ... + + @class_method_variant("_cls_quote") + def quote( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + self._request( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_quote_async( + cls, id: str, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + await cls._static_request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def quote_async( + id: str, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + ... + + @overload + async def quote_async( + self, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + ... + + @class_method_variant("_cls_quote_async") + async def quote_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["OnrampSessionQuoteParams"] + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + await self._request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["OnrampSessionRetrieveParams"] + ) -> "OnrampSession": + """ + Retrieves the details of a CryptoOnrampSession that was previously created. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["OnrampSessionRetrieveParams"] + ) -> "OnrampSession": + """ + Retrieves the details of a CryptoOnrampSession that was previously created. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = {"transaction_details": TransactionDetails} diff --git a/stripe/crypto/_onramp_session_service.py b/stripe/crypto/_onramp_session_service.py new file mode 100644 index 000000000..43f3bd7c6 --- /dev/null +++ b/stripe/crypto/_onramp_session_service.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.crypto._onramp_session import OnrampSession + from stripe.params.crypto._onramp_session_checkout_params import ( + OnrampSessionCheckoutParams, + ) + from stripe.params.crypto._onramp_session_create_params import ( + OnrampSessionCreateParams, + ) + from stripe.params.crypto._onramp_session_list_params import ( + OnrampSessionListParams, + ) + from stripe.params.crypto._onramp_session_quote_params import ( + OnrampSessionQuoteParams, + ) + from stripe.params.crypto._onramp_session_retrieve_params import ( + OnrampSessionRetrieveParams, + ) + + +class OnrampSessionService(StripeService): + def list( + self, + params: Optional["OnrampSessionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OnrampSession]": + """ + Returns a list of onramp sessions that match the filter criteria. The onramp sessions are returned in sorted order, with the most recent onramp sessions appearing first. + """ + return cast( + "ListObject[OnrampSession]", + self._request( + "get", + "/v1/crypto/onramp_sessions", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["OnrampSessionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OnrampSession]": + """ + Returns a list of onramp sessions that match the filter criteria. The onramp sessions are returned in sorted order, with the most recent onramp sessions appearing first. + """ + return cast( + "ListObject[OnrampSession]", + await self._request_async( + "get", + "/v1/crypto/onramp_sessions", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: Optional["OnrampSessionCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Creates a CryptoOnrampSession object. + + After the CryptoOnrampSession is created, display the onramp session modal using the client_secret. + + Related guide: [Set up an onramp integration](https://docs.stripe.com/docs/crypto/integrate-the-onramp) + """ + return cast( + "OnrampSession", + self._request( + "post", + "/v1/crypto/onramp_sessions", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: Optional["OnrampSessionCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Creates a CryptoOnrampSession object. + + After the CryptoOnrampSession is created, display the onramp session modal using the client_secret. + + Related guide: [Set up an onramp integration](https://docs.stripe.com/docs/crypto/integrate-the-onramp) + """ + return cast( + "OnrampSession", + await self._request_async( + "post", + "/v1/crypto/onramp_sessions", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["OnrampSessionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Retrieves the details of a CryptoOnrampSession that was previously created. + """ + return cast( + "OnrampSession", + self._request( + "get", + "/v1/crypto/onramp_sessions/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["OnrampSessionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Retrieves the details of a CryptoOnrampSession that was previously created. + """ + return cast( + "OnrampSession", + await self._request_async( + "get", + "/v1/crypto/onramp_sessions/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def checkout( + self, + id: str, + params: Optional["OnrampSessionCheckoutParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + self._request( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def checkout_async( + self, + id: str, + params: Optional["OnrampSessionCheckoutParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Completes a headless CryptoOnrampSession. + + This method will attempt to confirm the payment and execute the quote to deliver the crypto to the customer. + """ + return cast( + "OnrampSession", + await self._request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/checkout".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def quote( + self, + id: str, + params: Optional["OnrampSessionQuoteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + self._request( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def quote_async( + self, + id: str, + params: Optional["OnrampSessionQuoteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampSession": + """ + Refreshes an executable quote for a CryptoOnrampSession. + """ + return cast( + "OnrampSession", + await self._request_async( + "post", + "/v1/crypto/onramp_sessions/{id}/quote".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/crypto/_onramp_transaction_limits.py b/stripe/crypto/_onramp_transaction_limits.py new file mode 100644 index 000000000..0279512ff --- /dev/null +++ b/stripe/crypto/_onramp_transaction_limits.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._singleton_api_resource import SingletonAPIResource +from stripe._stripe_object import UntypedStripeObject +from typing import Any, ClassVar +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.crypto._onramp_transaction_limits_retrieve_params import ( + OnrampTransactionLimitsRetrieveParams, + ) + + +class OnrampTransactionLimits(SingletonAPIResource["OnrampTransactionLimits"]): + """ + This object represents the limit for the remaining amount that the crypto customer can onramp. + """ + + OBJECT_NAME: ClassVar[Literal["crypto.onramp_transaction_limits"]] = ( + "crypto.onramp_transaction_limits" + ) + crypto_customer_id: str + """ + The ID of the crypto customer. + """ + limits: UntypedStripeObject[Any] + """ + The remaining onramp limit for the crypto customer, separated by currency, payment method, and settlement speed. + + Limits are shown for currencies that correspond to the regions where the customer previously transacted. If the customer has no prior transactions, we return limits for all supported currencies. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + object: Literal["crypto.onramp_transaction_limits"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + + @classmethod + def retrieve( + cls, **params: Unpack["OnrampTransactionLimitsRetrieveParams"] + ) -> "OnrampTransactionLimits": + """ + Retrieves the remaining onramp limit for a crypto customer. + """ + instance = cls(None, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, **params: Unpack["OnrampTransactionLimitsRetrieveParams"] + ) -> "OnrampTransactionLimits": + """ + Retrieves the remaining onramp limit for a crypto customer. + """ + instance = cls(None, **params) + await instance.refresh_async() + return instance + + @classmethod + def class_url(cls): + return "/v1/crypto/onramp_transaction_limits" diff --git a/stripe/crypto/_onramp_transaction_limits_service.py b/stripe/crypto/_onramp_transaction_limits_service.py new file mode 100644 index 000000000..f4f81330d --- /dev/null +++ b/stripe/crypto/_onramp_transaction_limits_service.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.crypto._onramp_transaction_limits import ( + OnrampTransactionLimits, + ) + from stripe.params.crypto._onramp_transaction_limits_retrieve_params import ( + OnrampTransactionLimitsRetrieveParams, + ) + + +class OnrampTransactionLimitsService(StripeService): + def retrieve( + self, + params: Optional["OnrampTransactionLimitsRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampTransactionLimits": + """ + Retrieves the remaining onramp limit for a crypto customer. + """ + return cast( + "OnrampTransactionLimits", + self._request( + "get", + "/v1/crypto/onramp_transaction_limits", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + params: Optional["OnrampTransactionLimitsRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OnrampTransactionLimits": + """ + Retrieves the remaining onramp limit for a crypto customer. + """ + return cast( + "OnrampTransactionLimits", + await self._request_async( + "get", + "/v1/crypto/onramp_transaction_limits", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 4fa63920e..268cd5cda 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -173,6 +173,22 @@ class OwnershipRefresh(StripeObject): """ class StatusDetails(StripeObject): + class Active(StripeObject): + action: Literal["none", "relink_required"] + """ + The action (if any) to proactively relink the Account. + """ + cause: Literal[ + "access_expired", "institution_requirement", "unspecified" + ] + """ + The underlying cause of the Account becoming inactive. + """ + expected_deactivation_date: int + """ + When the Account is expected to become inactive, if applicable. + """ + class Inactive(StripeObject): action: Literal["none", "relink_required"] """ @@ -190,8 +206,9 @@ class Inactive(StripeObject): The underlying cause of the Account being inactive. """ + active: Optional[Active] inactive: Optional[Inactive] - _inner_class_types = {"inactive": Inactive} + _inner_class_types = {"active": Active, "inactive": Inactive} class TransactionRefresh(StripeObject): id: str diff --git a/stripe/financial_connections/_authorization.py b/stripe/financial_connections/_authorization.py index 91fd54099..df52e264c 100644 --- a/stripe/financial_connections/_authorization.py +++ b/stripe/financial_connections/_authorization.py @@ -40,14 +40,25 @@ class AccountHolder(StripeObject): """ class StatusDetails(StripeObject): + class Active(StripeObject): + action: Literal["none", "relink_required"] + """ + The action (if any) to proactively relink the Authorization. + """ + expected_deactivation_date: int + """ + When the Authorization is expected to become inactive, if applicable. + """ + class Inactive(StripeObject): action: Literal["none", "relink_required"] """ The action (if any) to relink the inactive Authorization. """ + active: Optional[Active] inactive: Optional[Inactive] - _inner_class_types = {"inactive": Inactive} + _inner_class_types = {"active": Active, "inactive": Inactive} account_holder: Optional[AccountHolder] """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index b2a164e3b..b2e014ae3 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -157,7 +157,7 @@ class ProvidedDetails(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted"] + status: Literal["processing", "redacted", "validated"] """ Indicates whether this object and its related objects have been redacted or not. """ diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 18c498fda..c9a9099cf 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -937,6 +937,12 @@ class AmountDetails(StripeObject): """ _inner_class_types = {"amount_details": AmountDetails} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class RequestHistory(StripeObject): class AmountDetails(StripeObject): atm_fee: Optional[int] @@ -1022,6 +1028,10 @@ class AmountDetails(StripeObject): class TokenDetails(StripeObject): class NetworkData(StripeObject): class Device(StripeObject): + device_id: Optional[str] + """ + An identifier for the device used during wallet provisioning. + """ ip_address: Optional[str] """ The IP address of the device at provisioning time. @@ -1510,6 +1520,10 @@ class ThreeDSecure(StripeObject): """ The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. """ + merchant_amount_exchange_rate: Optional[float] + """ + The exchange rate used by the network to convert the `merchant_amount` to `amount`. The `merchant_amount` multiplied with this rate will equal to the `amount`. + """ merchant_currency: str """ The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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). @@ -1531,6 +1545,10 @@ class ThreeDSecure(StripeObject): """ The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. """ + redaction: Optional[Redaction] + """ + Redaction status of this authorization. If the authorization is not redacted, this field will be null. + """ request_history: List[RequestHistory] """ History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. @@ -2656,6 +2674,7 @@ def test_helpers(self): "merchant_data": MerchantData, "network_data": NetworkData, "pending_request": PendingRequest, + "redaction": Redaction, "request_history": RequestHistory, "token_details": TokenDetails, "treasury": Treasury, diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 0c33c359e..c3c522828 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -69,6 +69,12 @@ class CancelAfter(StripeObject): cancel_after: CancelAfter _inner_class_types = {"cancel_after": CancelAfter} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -1303,6 +1309,14 @@ class GooglePay(StripeObject): """ The personalization design object belonging to this card. """ + program: Optional[str] + """ + The program that this card belongs to — will not be nil. + """ + redaction: Optional[Redaction] + """ + Redaction status of this card. If not null, this card is associated to a redaction job. + """ replaced_by: Optional[ExpandableField["Card"]] """ The latest card that replaces this card, if any. @@ -2017,6 +2031,7 @@ def test_helpers(self): _inner_class_types = { "latest_fraud_warning": LatestFraudWarning, "lifecycle_controls": LifecycleControls, + "redaction": Redaction, "shipping": Shipping, "spending_controls": SpendingControls, "wallets": Wallets, diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 8fb3b63f0..6778bc01f 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -154,6 +154,12 @@ class Document(StripeObject): "verification": Verification, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Requirements(StripeObject): disabled_reason: Optional[ Literal[ @@ -1193,6 +1199,10 @@ class SpendingLimit(StripeObject): The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. This changes the language of the [3D Secure flow](https://docs.stripe.com/issuing/3d-secure) and one-time password messages sent to the cardholder. """ + redaction: Optional[Redaction] + """ + Redaction status of this cardholder. If the cardholder is not redacted, this field will be null. + """ requirements: Requirements spending_controls: Optional[SpendingControls] """ @@ -1339,6 +1349,7 @@ async def retrieve_async( "billing": Billing, "company": Company, "individual": Individual, + "redaction": Redaction, "requirements": Requirements, "spending_controls": SpendingControls, } diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 9b4fe5648..2730e8a96 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -481,6 +481,12 @@ class ProvisionalCredit(StripeObject): The status of the provisional credit obligation. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Treasury(StripeObject): debit_reversal: Optional[str] """ @@ -563,6 +569,10 @@ class Treasury(StripeObject): """ Provisional credit details for this dispute. """ + redaction: Optional[Redaction] + """ + Redaction status of this dispute. If the dispute is not redacted, this field will be null. + """ status: Literal["expired", "lost", "submitted", "unsubmitted", "won"] """ Current status of the dispute. @@ -1464,6 +1474,7 @@ def test_helpers(self): "evidence": Evidence, "network_lifecycle": NetworkLifecycle, "provisional_credit": ProvisionalCredit, + "redaction": Redaction, "treasury": Treasury, } diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 540013adc..62b2bb61a 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -31,6 +31,10 @@ class Device(StripeObject): """ An obfuscated ID derived from the device ID. """ + device_id: Optional[str] + """ + An identifier for the device used during wallet provisioning. + """ ip_address: Optional[str] """ The IP address of the device at provisioning time. diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index c9b35b720..cf64b07bd 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -504,6 +504,12 @@ class Receipt(StripeObject): "receipt": Receipt, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Treasury(StripeObject): received_credit: Optional[str] """ @@ -566,6 +572,10 @@ class Treasury(StripeObject): """ The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. """ + merchant_amount_exchange_rate: Optional[float] + """ + The exchange rate used by the network to convert the `merchant_amount` to `amount`. The `merchant_amount` multiplied with this rate will equal to the `amount`. + """ merchant_currency: str """ The currency with which the merchant is taking payment. @@ -587,6 +597,10 @@ class Treasury(StripeObject): """ Additional purchase information that is optionally provided by the merchant. """ + redaction: Optional[Redaction] + """ + Redaction status of this transaction. If the transaction is not redacted, this field will be null. + """ settlement: Optional[ExpandableField["Settlement"]] """ The ID of the [settlement](https://docs.stripe.com/api/issuing/settlements) to which this transaction belongs. @@ -891,6 +905,7 @@ def test_helpers(self): "merchant_data": MerchantData, "network_data": NetworkData, "purchase_details": PurchaseDetails, + "redaction": Redaction, "treasury": Treasury, } diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 5a9292ec6..fe719caf3 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -11,6 +11,7 @@ capital as capital, checkout as checkout, climate as climate, + crypto as crypto, delegated_checkout as delegated_checkout, entitlements as entitlements, financial_connections as financial_connections, @@ -1389,6 +1390,7 @@ DisputeModifyParams as DisputeModifyParams, DisputeModifyParamsEvidence as DisputeModifyParamsEvidence, DisputeModifyParamsEvidenceEnhancedEvidence as DisputeModifyParamsEvidenceEnhancedEvidence, + DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1403,6 +1405,7 @@ DisputeUpdateParams as DisputeUpdateParams, DisputeUpdateParamsEvidence as DisputeUpdateParamsEvidence, DisputeUpdateParamsEvidenceEnhancedEvidence as DisputeUpdateParamsEvidenceEnhancedEvidence, + DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1728,6 +1731,10 @@ InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountSettingsServicePeriodAnchorConfigCustom as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountSettingsServicePeriodAnchorConfigCustom, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring, + InvoiceCreatePreviewParamsSubscriptionDetailsPause as InvoiceCreatePreviewParamsSubscriptionDetailsPause, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom, InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling as InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling, ) from stripe.params._invoice_delete_params import ( @@ -2267,6 +2274,9 @@ ) from stripe.params._payment_attempt_record_report_failed_params import ( PaymentAttemptRecordReportFailedParams as PaymentAttemptRecordReportFailedParams, + PaymentAttemptRecordReportFailedParamsPaymentMethodDetails as PaymentAttemptRecordReportFailedParamsPaymentMethodDetails, + PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard, + PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks, PaymentAttemptRecordReportFailedParamsProcessorDetails as PaymentAttemptRecordReportFailedParamsProcessorDetails, PaymentAttemptRecordReportFailedParamsProcessorDetailsCustom as PaymentAttemptRecordReportFailedParamsProcessorDetailsCustom, ) @@ -2612,6 +2622,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires as PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, PaymentIntentConfirmParamsPaymentMethodOptionsCashapp as PaymentIntentConfirmParamsPaymentMethodOptionsCashapp, PaymentIntentConfirmParamsPaymentMethodOptionsCrypto as PaymentIntentConfirmParamsPaymentMethodOptionsCrypto, + PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation as PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation, PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions as PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions, PaymentIntentConfirmParamsPaymentMethodOptionsCryptoTransactionVerificationOptions as PaymentIntentConfirmParamsPaymentMethodOptionsCryptoTransactionVerificationOptions, PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalance as PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalance, @@ -2701,6 +2712,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsSofort as PaymentIntentConfirmParamsPaymentMethodOptionsSofort, PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance as PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance, PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalanceMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalanceMandateOptions, + PaymentIntentConfirmParamsPaymentMethodOptionsSunbit as PaymentIntentConfirmParamsPaymentMethodOptionsSunbit, PaymentIntentConfirmParamsPaymentMethodOptionsSwish as PaymentIntentConfirmParamsPaymentMethodOptionsSwish, PaymentIntentConfirmParamsPaymentMethodOptionsTwint as PaymentIntentConfirmParamsPaymentMethodOptionsTwint, PaymentIntentConfirmParamsPaymentMethodOptionsUpi as PaymentIntentConfirmParamsPaymentMethodOptionsUpi, @@ -2932,6 +2944,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires as PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, PaymentIntentCreateParamsPaymentMethodOptionsCashapp as PaymentIntentCreateParamsPaymentMethodOptionsCashapp, PaymentIntentCreateParamsPaymentMethodOptionsCrypto as PaymentIntentCreateParamsPaymentMethodOptionsCrypto, + PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation as PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation, PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions as PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions, PaymentIntentCreateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions as PaymentIntentCreateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions, PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalance as PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalance, @@ -3021,6 +3034,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsSofort as PaymentIntentCreateParamsPaymentMethodOptionsSofort, PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance as PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance, PaymentIntentCreateParamsPaymentMethodOptionsStripeBalanceMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsStripeBalanceMandateOptions, + PaymentIntentCreateParamsPaymentMethodOptionsSunbit as PaymentIntentCreateParamsPaymentMethodOptionsSunbit, PaymentIntentCreateParamsPaymentMethodOptionsSwish as PaymentIntentCreateParamsPaymentMethodOptionsSwish, PaymentIntentCreateParamsPaymentMethodOptionsTwint as PaymentIntentCreateParamsPaymentMethodOptionsTwint, PaymentIntentCreateParamsPaymentMethodOptionsUpi as PaymentIntentCreateParamsPaymentMethodOptionsUpi, @@ -3304,6 +3318,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires as PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, PaymentIntentModifyParamsPaymentMethodOptionsCashapp as PaymentIntentModifyParamsPaymentMethodOptionsCashapp, PaymentIntentModifyParamsPaymentMethodOptionsCrypto as PaymentIntentModifyParamsPaymentMethodOptionsCrypto, + PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation as PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation, PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions as PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions, PaymentIntentModifyParamsPaymentMethodOptionsCryptoTransactionVerificationOptions as PaymentIntentModifyParamsPaymentMethodOptionsCryptoTransactionVerificationOptions, PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalance as PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalance, @@ -3393,6 +3408,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsSofort as PaymentIntentModifyParamsPaymentMethodOptionsSofort, PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance as PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance, PaymentIntentModifyParamsPaymentMethodOptionsStripeBalanceMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsStripeBalanceMandateOptions, + PaymentIntentModifyParamsPaymentMethodOptionsSunbit as PaymentIntentModifyParamsPaymentMethodOptionsSunbit, PaymentIntentModifyParamsPaymentMethodOptionsSwish as PaymentIntentModifyParamsPaymentMethodOptionsSwish, PaymentIntentModifyParamsPaymentMethodOptionsTwint as PaymentIntentModifyParamsPaymentMethodOptionsTwint, PaymentIntentModifyParamsPaymentMethodOptionsUpi as PaymentIntentModifyParamsPaymentMethodOptionsUpi, @@ -3642,6 +3658,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires as PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, PaymentIntentUpdateParamsPaymentMethodOptionsCashapp as PaymentIntentUpdateParamsPaymentMethodOptionsCashapp, PaymentIntentUpdateParamsPaymentMethodOptionsCrypto as PaymentIntentUpdateParamsPaymentMethodOptionsCrypto, + PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation as PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation, PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions as PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions, PaymentIntentUpdateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions as PaymentIntentUpdateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions, PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalance as PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalance, @@ -3731,6 +3748,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsSofort as PaymentIntentUpdateParamsPaymentMethodOptionsSofort, PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance as PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance, PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalanceMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalanceMandateOptions, + PaymentIntentUpdateParamsPaymentMethodOptionsSunbit as PaymentIntentUpdateParamsPaymentMethodOptionsSunbit, PaymentIntentUpdateParamsPaymentMethodOptionsSwish as PaymentIntentUpdateParamsPaymentMethodOptionsSwish, PaymentIntentUpdateParamsPaymentMethodOptionsTwint as PaymentIntentUpdateParamsPaymentMethodOptionsTwint, PaymentIntentUpdateParamsPaymentMethodOptionsUpi as PaymentIntentUpdateParamsPaymentMethodOptionsUpi, @@ -4482,6 +4500,9 @@ ) from stripe.params._payment_record_report_payment_attempt_failed_params import ( PaymentRecordReportPaymentAttemptFailedParams as PaymentRecordReportPaymentAttemptFailedParams, + PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails, + PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard, + PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks, PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails as PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails, PaymentRecordReportPaymentAttemptFailedParamsProcessorDetailsCustom as PaymentRecordReportPaymentAttemptFailedParamsProcessorDetailsCustom, ) @@ -5666,6 +5687,7 @@ SubscriptionCreateParamsDiscountSettingsServicePeriodAnchorConfig as SubscriptionCreateParamsDiscountSettingsServicePeriodAnchorConfig, SubscriptionCreateParamsDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionCreateParamsDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionCreateParamsInvoiceSettings as SubscriptionCreateParamsInvoiceSettings, + SubscriptionCreateParamsInvoiceSettingsCustomField as SubscriptionCreateParamsInvoiceSettingsCustomField, SubscriptionCreateParamsInvoiceSettingsIssuer as SubscriptionCreateParamsInvoiceSettingsIssuer, SubscriptionCreateParamsItem as SubscriptionCreateParamsItem, SubscriptionCreateParamsItemBillingThresholds as SubscriptionCreateParamsItemBillingThresholds, @@ -5802,6 +5824,7 @@ SubscriptionModifyParamsDiscountSettingsServicePeriodAnchorConfig as SubscriptionModifyParamsDiscountSettingsServicePeriodAnchorConfig, SubscriptionModifyParamsDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionModifyParamsDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionModifyParamsInvoiceSettings as SubscriptionModifyParamsInvoiceSettings, + SubscriptionModifyParamsInvoiceSettingsCustomField as SubscriptionModifyParamsInvoiceSettingsCustomField, SubscriptionModifyParamsInvoiceSettingsIssuer as SubscriptionModifyParamsInvoiceSettingsIssuer, SubscriptionModifyParamsItem as SubscriptionModifyParamsItem, SubscriptionModifyParamsItemBillingThresholds as SubscriptionModifyParamsItemBillingThresholds, @@ -6113,6 +6136,7 @@ SubscriptionUpdateParamsDiscountSettingsServicePeriodAnchorConfig as SubscriptionUpdateParamsDiscountSettingsServicePeriodAnchorConfig, SubscriptionUpdateParamsDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionUpdateParamsDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionUpdateParamsInvoiceSettings as SubscriptionUpdateParamsInvoiceSettings, + SubscriptionUpdateParamsInvoiceSettingsCustomField as SubscriptionUpdateParamsInvoiceSettingsCustomField, SubscriptionUpdateParamsInvoiceSettingsIssuer as SubscriptionUpdateParamsInvoiceSettingsIssuer, SubscriptionUpdateParamsItem as SubscriptionUpdateParamsItem, SubscriptionUpdateParamsItemBillingThresholds as SubscriptionUpdateParamsItemBillingThresholds, @@ -6265,6 +6289,8 @@ ) from stripe.params._topup_create_params import ( TopupCreateParams as TopupCreateParams, + TopupCreateParamsPaymentMethodOptions as TopupCreateParamsPaymentMethodOptions, + TopupCreateParamsPaymentMethodOptionsUsBankAccount as TopupCreateParamsPaymentMethodOptionsUsBankAccount, ) from stripe.params._topup_list_params import ( TopupListParams as TopupListParams, @@ -6347,6 +6373,7 @@ "capital": ("stripe.params.capital", True), "checkout": ("stripe.params.checkout", True), "climate": ("stripe.params.climate", True), + "crypto": ("stripe.params.crypto", True), "delegated_checkout": ("stripe.params.delegated_checkout", True), "entitlements": ("stripe.params.entitlements", True), "financial_connections": ("stripe.params.financial_connections", True), @@ -10472,6 +10499,10 @@ "stripe.params._dispute_modify_params", False, ), + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_modify_params", + False, + ), "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_modify_params", False, @@ -10506,6 +10537,10 @@ "stripe.params._dispute_update_params", False, ), + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_update_params", + False, + ), "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_update_params", False, @@ -11446,6 +11481,22 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPause": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling": ( "stripe.params._invoice_create_preview_params", False, @@ -13125,6 +13176,18 @@ "stripe.params._payment_attempt_record_report_failed_params", False, ), + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetails": ( + "stripe.params._payment_attempt_record_report_failed_params", + False, + ), + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard": ( + "stripe.params._payment_attempt_record_report_failed_params", + False, + ), + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks": ( + "stripe.params._payment_attempt_record_report_failed_params", + False, + ), "PaymentAttemptRecordReportFailedParamsProcessorDetails": ( "stripe.params._payment_attempt_record_report_failed_params", False, @@ -14433,6 +14496,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions": ( "stripe.params._payment_intent_confirm_params", False, @@ -14789,6 +14856,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_confirm_params", False, @@ -15705,6 +15776,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions": ( "stripe.params._payment_intent_create_params", False, @@ -16061,6 +16136,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_create_params", False, @@ -17153,6 +17232,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions": ( "stripe.params._payment_intent_modify_params", False, @@ -17509,6 +17592,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_modify_params", False, @@ -18449,6 +18536,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions": ( "stripe.params._payment_intent_update_params", False, @@ -18805,6 +18896,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_update_params", False, @@ -21497,6 +21592,18 @@ "stripe.params._payment_record_report_payment_attempt_failed_params", False, ), + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails": ( + "stripe.params._payment_record_report_payment_attempt_failed_params", + False, + ), + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard": ( + "stripe.params._payment_record_report_payment_attempt_failed_params", + False, + ), + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks": ( + "stripe.params._payment_record_report_payment_attempt_failed_params", + False, + ), "PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails": ( "stripe.params._payment_record_report_payment_attempt_failed_params", False, @@ -25170,6 +25277,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_create_params", False, @@ -25634,6 +25745,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_modify_params", False, @@ -26774,6 +26889,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_update_params", False, @@ -27180,6 +27299,14 @@ "TokenRetrieveParams": ("stripe.params._token_retrieve_params", False), "TopupCancelParams": ("stripe.params._topup_cancel_params", False), "TopupCreateParams": ("stripe.params._topup_create_params", False), + "TopupCreateParamsPaymentMethodOptions": ( + "stripe.params._topup_create_params", + False, + ), + "TopupCreateParamsPaymentMethodOptionsUsBankAccount": ( + "stripe.params._topup_create_params", + False, + ), "TopupListParams": ("stripe.params._topup_list_params", False), "TopupListParamsAmount": ("stripe.params._topup_list_params", False), "TopupListParamsCreated": ("stripe.params._topup_list_params", False), diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index dcd7a7d4a..aa964beff 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -1593,7 +1593,7 @@ class AccountCreateParamsDocuments(TypedDict): "AccountCreateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountCreateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 74c105fbb..e399e9162 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1505,7 +1505,7 @@ class AccountUpdateParamsDocuments(TypedDict): "AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountUpdateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py index 9f636474c..04d0554ca 100644 --- a/stripe/params/_balance_transaction_list_params.py +++ b/stripe/params/_balance_transaction_list_params.py @@ -40,7 +40,7 @@ class BalanceTransactionListParams(RequestOptions): """ type: NotRequired[str] """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. + Only returns transactions of the given type. One of: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index 02eed0698..bf4dc4dc5 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -350,7 +350,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py index 6299dba8e..5ce43d56b 100644 --- a/stripe/params/_credit_note_create_params.py +++ b/stripe/params/_credit_note_create_params.py @@ -95,7 +95,7 @@ class CreditNoteCreateParamsLine(TypedDict): "Literal['']|List[CreditNoteCreateParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py index 140b25522..e14ea097f 100644 --- a/stripe/params/_credit_note_preview_lines_list_params.py +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -106,7 +106,7 @@ class CreditNotePreviewLinesListParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesListParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py index 54102dd77..d8974086f 100644 --- a/stripe/params/_credit_note_preview_lines_params.py +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -107,7 +107,7 @@ class CreditNotePreviewLinesParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py index 4987dd467..ec7be34e9 100644 --- a/stripe/params/_credit_note_preview_params.py +++ b/stripe/params/_credit_note_preview_params.py @@ -95,7 +95,7 @@ class CreditNotePreviewParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index 3223ed2cb..c9c872f0a 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -160,6 +160,12 @@ class DisputeModifyParamsEvidence(TypedDict): class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -174,6 +180,15 @@ class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index 5e3d3fd24..fdb72deb2 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -159,6 +159,12 @@ class DisputeUpdateParamsEvidence(TypedDict): class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -173,6 +179,15 @@ class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index 7d2383574..a358afa03 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -81,7 +81,7 @@ class InvoiceAddLinesParamsLine(TypedDict): "Literal['']|List[InvoiceAddLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index ccbfb4155..268d777df 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -286,7 +286,7 @@ class InvoiceCreateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index f2b92771d..a573b057c 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -2495,6 +2495,14 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): """ A list of up to 20 subscription items, each with an attached price. """ + pause: NotRequired["InvoiceCreatePreviewParamsSubscriptionDetailsPause"] + """ + Previews the invoice that would be generated when pausing the subscription. Passing an empty hash won't preview pausing and instead returns the next invoice. + + To receive a preview invoice, set `invoicing_behavior` to `invoice`. A preview isn't available if the `bill_for` options produce no billable amounts. + + `pending_invoice_item` never has a preview available because pausing wouldn't generate an invoice, and paused subscriptions don't generate invoices either. + """ prebilling: NotRequired[ "InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling" ] @@ -2642,7 +2650,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -2852,6 +2860,56 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( """ +class InvoiceCreatePreviewParamsSubscriptionDetailsPause(TypedDict): + bill_for: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + """ + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. + """ + type: NotRequired[Literal["subscription"]] + """ + The type of pause to apply. Defaults to `subscription`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor(TypedDict): + outstanding_usage_through: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough" + ] + """ + Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`. + """ + unused_time_from: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom" + ] + """ + Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough( + TypedDict, +): + type: Literal["none", "now"] + """ + When to bill metered usage in the current period. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom( + TypedDict, +): + type: Literal["item_current_period_start", "none", "now"] + """ + When to credit for unused time. + """ + + class InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): iterations: int """ diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 0a1dcdfd3..ce15ea30f 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -63,7 +63,7 @@ class InvoiceLineItemUpdateParams(TypedDict): "Literal['']|List[InvoiceLineItemUpdateParamsTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index ebf859d08..63f76a4b0 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -253,7 +253,7 @@ class InvoiceModifyParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index e38537e74..aa685c50a 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -81,7 +81,7 @@ class InvoiceUpdateLinesParamsLine(TypedDict): "Literal['']|List[InvoiceUpdateLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 056527580..dd634d6ab 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -252,7 +252,7 @@ class InvoiceUpdateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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/params/_order_create_params.py b/stripe/params/_order_create_params.py index 16e03af39..da8402879 100644 --- a/stripe/params/_order_create_params.py +++ b/stripe/params/_order_create_params.py @@ -2208,7 +2208,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderCreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_order_modify_params.py b/stripe/params/_order_modify_params.py index ebeb2b75b..a48e4724a 100644 --- a/stripe/params/_order_modify_params.py +++ b/stripe/params/_order_modify_params.py @@ -2218,7 +2218,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_order_update_params.py b/stripe/params/_order_update_params.py index 08e4599d5..801caa1f3 100644 --- a/stripe/params/_order_update_params.py +++ b/stripe/params/_order_update_params.py @@ -2217,7 +2217,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_payment_attempt_record_report_failed_params.py b/stripe/params/_payment_attempt_record_report_failed_params.py index 67209576b..295692e3b 100644 --- a/stripe/params/_payment_attempt_record_report_failed_params.py +++ b/stripe/params/_payment_attempt_record_report_failed_params.py @@ -34,6 +34,12 @@ class PaymentAttemptRecordReportFailedParams(RequestOptions): """ Payment evaluations associated with this reported payment. """ + payment_method_details: NotRequired[ + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetails" + ] + """ + Information about the Payment Method debited for this payment. + """ processor_details: NotRequired[ "PaymentAttemptRecordReportFailedParamsProcessorDetails" ] @@ -42,6 +48,51 @@ class PaymentAttemptRecordReportFailedParams(RequestOptions): """ +class PaymentAttemptRecordReportFailedParamsPaymentMethodDetails(TypedDict): + card: NotRequired[ + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard" + ] + """ + Information about the card payment method used to make this payment. + """ + type: Literal["card"] + """ + The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + """ + + +class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard( + TypedDict +): + checks: NotRequired[ + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks" + ] + """ + Verification checks performed on the card. + """ + + +class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks( + TypedDict, +): + address_line1_check: NotRequired[ + Literal["fail", "pass", "unavailable", "unchecked"] + ] + """ + The result of the check on the cardholder's address line 1. + """ + address_postal_code_check: NotRequired[ + Literal["fail", "pass", "unavailable", "unchecked"] + ] + """ + The result of the check on the cardholder's postal code. + """ + cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + """ + The result of the check on the card's CVC. + """ + + class PaymentAttemptRecordReportFailedParamsProcessorDetails(TypedDict): custom: NotRequired[ "PaymentAttemptRecordReportFailedParamsProcessorDetailsCustom" diff --git a/stripe/params/_payment_attempt_record_report_refund_params.py b/stripe/params/_payment_attempt_record_report_refund_params.py index 90cbc47e4..685b5208f 100644 --- a/stripe/params/_payment_attempt_record_report_refund_params.py +++ b/stripe/params/_payment_attempt_record_report_refund_params.py @@ -37,6 +37,12 @@ class PaymentAttemptRecordReportRefundParams(RequestOptions): """ Processor information for this refund. """ + reason: NotRequired[ + Literal["duplicate", "fraudulent", "requested_by_customer"] + ] + """ + The reason for the refund. One of `duplicate`, `fraudulent`, or `requested_by_customer`. + """ refund_group: NotRequired[str] """ A key to group refunds together. diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 3b493fc69..89c74e3a9 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -3161,7 +3161,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSwish"] """ @@ -4198,6 +4198,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSwish" ] @@ -5069,6 +5075,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCashapp(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsCrypto(TypedDict): + amount_reconciliation: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation" + ] + """ + Controls how crypto funding amounts are reconciled for this PaymentIntent. + """ deposit_options: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions" ] @@ -5101,6 +5113,15 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCrypto(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation( + TypedDict, +): + type: Literal["accept_partial_funding", "exact"] + """ + Controls how crypto funding amounts are reconciled for the PaymentIntent. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): @@ -7179,6 +7200,18 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentConfirmParamsPaymentMethodOptionsScalapay(TypedDict): @@ -7298,6 +7331,27 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalanceMandateOptions( """ +class PaymentIntentConfirmParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -7498,7 +7552,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 83a0786f3..3af5fde9e 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -3290,7 +3290,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSwish"] """ @@ -4327,6 +4327,12 @@ class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSwish" ] @@ -5190,6 +5196,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCashapp(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsCrypto(TypedDict): + amount_reconciliation: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation" + ] + """ + Controls how crypto funding amounts are reconciled for this PaymentIntent. + """ deposit_options: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions" ] @@ -5222,6 +5234,15 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCrypto(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation( + TypedDict, +): + type: Literal["accept_partial_funding", "exact"] + """ + Controls how crypto funding amounts are reconciled for the PaymentIntent. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): @@ -7300,6 +7321,18 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentCreateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -7419,6 +7452,27 @@ class PaymentIntentCreateParamsPaymentMethodOptionsStripeBalanceMandateOptions( """ +class PaymentIntentCreateParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -7619,7 +7673,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 22bf990e8..330477217 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -3138,7 +3138,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSwish"] """ @@ -4175,6 +4175,12 @@ class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSwish" ] @@ -5038,6 +5044,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCashapp(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsCrypto(TypedDict): + amount_reconciliation: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation" + ] + """ + Controls how crypto funding amounts are reconciled for this PaymentIntent. + """ deposit_options: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions" ] @@ -5070,6 +5082,15 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCrypto(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation( + TypedDict, +): + type: Literal["accept_partial_funding", "exact"] + """ + Controls how crypto funding amounts are reconciled for the PaymentIntent. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): @@ -7148,6 +7169,18 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentModifyParamsPaymentMethodOptionsScalapay(TypedDict): @@ -7267,6 +7300,27 @@ class PaymentIntentModifyParamsPaymentMethodOptionsStripeBalanceMandateOptions( """ +class PaymentIntentModifyParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -7467,7 +7521,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_payment_intent_search_params.py b/stripe/params/_payment_intent_search_params.py index 516352aec..37f7a2dff 100644 --- a/stripe/params/_payment_intent_search_params.py +++ b/stripe/params/_payment_intent_search_params.py @@ -20,5 +20,5 @@ class PaymentIntentSearchParams(RequestOptions): """ query: str """ - The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-payment-intents). + The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-paymentintents). """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 26f5fcf97..26f422e63 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -3137,7 +3137,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSwish"] """ @@ -4174,6 +4174,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSwish" ] @@ -5037,6 +5043,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCashapp(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsCrypto(TypedDict): + amount_reconciliation: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation" + ] + """ + Controls how crypto funding amounts are reconciled for this PaymentIntent. + """ deposit_options: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions" ] @@ -5069,6 +5081,15 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCrypto(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation( + TypedDict, +): + type: Literal["accept_partial_funding", "exact"] + """ + Controls how crypto funding amounts are reconciled for the PaymentIntent. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): @@ -7147,6 +7168,18 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): 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', 'on_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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentUpdateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -7266,6 +7299,27 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalanceMandateOptions( """ +class PaymentIntentUpdateParamsPaymentMethodOptionsSunbit(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://docs.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["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -7466,7 +7520,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ buyer_id: NotRequired[str] """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index d35e41d1a..d64d00676 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -113,6 +113,9 @@ class PaymentLinkCreateParams(RequestOptions): payment_method_options: NotRequired[ "PaymentLinkCreateParamsPaymentMethodOptions" ] + """ + Payment-method-specific configuration. + """ payment_method_types: NotRequired[ List[ Literal[ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 105a08c32..6549a3e80 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -265,7 +265,7 @@ class PaymentMethodCreateParams(RequestOptions): """ sunbit: NotRequired["PaymentMethodCreateParamsSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentMethodCreateParamsSwish"] """ diff --git a/stripe/params/_payment_record_report_payment_attempt_failed_params.py b/stripe/params/_payment_record_report_payment_attempt_failed_params.py index 222f01147..13c1012a8 100644 --- a/stripe/params/_payment_record_report_payment_attempt_failed_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_failed_params.py @@ -34,6 +34,12 @@ class PaymentRecordReportPaymentAttemptFailedParams(RequestOptions): """ Payment evaluations associated with this reported payment. """ + payment_method_details: NotRequired[ + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails" + ] + """ + Information about the Payment Method debited for this payment. + """ processor_details: NotRequired[ "PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails" ] @@ -42,6 +48,53 @@ class PaymentRecordReportPaymentAttemptFailedParams(RequestOptions): """ +class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails( + TypedDict, +): + card: NotRequired[ + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard" + ] + """ + Information about the card payment method used to make this payment. + """ + type: Literal["card"] + """ + The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + """ + + +class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard( + TypedDict, +): + checks: NotRequired[ + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks" + ] + """ + Verification checks performed on the card. + """ + + +class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks( + TypedDict, +): + address_line1_check: NotRequired[ + Literal["fail", "pass", "unavailable", "unchecked"] + ] + """ + The result of the check on the cardholder's address line 1. + """ + address_postal_code_check: NotRequired[ + Literal["fail", "pass", "unavailable", "unchecked"] + ] + """ + The result of the check on the cardholder's postal code. + """ + cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + """ + The result of the check on the card's CVC. + """ + + class PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails(TypedDict): custom: NotRequired[ "PaymentRecordReportPaymentAttemptFailedParamsProcessorDetailsCustom" diff --git a/stripe/params/_payment_record_report_refund_params.py b/stripe/params/_payment_record_report_refund_params.py index 0675c696b..426f06a13 100644 --- a/stripe/params/_payment_record_report_refund_params.py +++ b/stripe/params/_payment_record_report_refund_params.py @@ -37,6 +37,12 @@ class PaymentRecordReportRefundParams(RequestOptions): """ Processor information for this refund. """ + reason: NotRequired[ + Literal["duplicate", "fraudulent", "requested_by_customer"] + ] + """ + The reason for the refund. One of `duplicate`, `fraudulent`, or `requested_by_customer`. + """ refund_group: NotRequired[str] """ A key to group refunds together. diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 9df8e4075..505c78702 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -385,7 +385,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 58d3216b0..772fccfaf 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -524,7 +524,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 20c73cc15..1fdc4daec 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -361,7 +361,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentModifyParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 81baeb209..c09919193 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -360,7 +360,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index aafab0ffe..461ab9be9 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -574,12 +574,37 @@ class SubscriptionCreateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionCreateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionCreateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionCreateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionCreateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -821,7 +846,7 @@ class SubscriptionCreateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index d1a1a7c49..8b4156140 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -534,12 +534,37 @@ class SubscriptionModifyParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionModifyParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionModifyParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -578,7 +603,7 @@ class SubscriptionModifyParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -791,7 +816,7 @@ class SubscriptionModifyParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_subscription_pause_params.py b/stripe/params/_subscription_pause_params.py index 454b7f268..a3e38e44d 100644 --- a/stripe/params/_subscription_pause_params.py +++ b/stripe/params/_subscription_pause_params.py @@ -16,7 +16,7 @@ class SubscriptionPauseParams(RequestOptions): """ invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] """ - Determines how to handle debits and credits when pausing. The default is `pending_invoice_item`. + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. """ type: NotRequired[Literal["subscription"]] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 352d86e58..e93773787 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -533,12 +533,37 @@ class SubscriptionUpdateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionUpdateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionUpdateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionUpdateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -577,7 +602,7 @@ class SubscriptionUpdateParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -790,7 +815,7 @@ class SubscriptionUpdateParamsPaymentSettings(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', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', '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). Should not be specified with payment_method_configuration diff --git a/stripe/params/_topup_create_params.py b/stripe/params/_topup_create_params.py index 6203536e8..930c37cd3 100644 --- a/stripe/params/_topup_create_params.py +++ b/stripe/params/_topup_create_params.py @@ -3,7 +3,7 @@ from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject from typing import Dict, List -from typing_extensions import Literal, NotRequired +from typing_extensions import Literal, NotRequired, TypedDict class TopupCreateParams(RequestOptions): @@ -29,6 +29,16 @@ class TopupCreateParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/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: NotRequired[str] + """ + The ID of a PaymentMethod representing the payment method to be used for the top-up. A PaymentMethod of type `us_bank_account` can be used. + """ + payment_method_options: NotRequired[ + "TopupCreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this top-up. + """ source: NotRequired[str] """ The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). @@ -41,3 +51,13 @@ class TopupCreateParams(RequestOptions): """ A string that identifies this top-up as part of a group. """ + + +class TopupCreateParamsPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "TopupCreateParamsPaymentMethodOptionsUsBankAccount" + ] + + +class TopupCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + network: Literal["ach"] diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 937b98bf6..09bf60a22 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -133,6 +133,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-03-25.dahlia", "2026-04-22.dahlia", "2026-05-27.dahlia", + "2026-06-24.dahlia", ] ] """ @@ -163,7 +164,13 @@ class WebhookEndpointCreateParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -442,13 +449,6 @@ class WebhookEndpointCreateParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 6f6b5ee0b..c2afba709 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -33,7 +33,13 @@ class WebhookEndpointModifyParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -312,13 +318,6 @@ class WebhookEndpointModifyParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 64584f04e..2d75f4cb5 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -32,7 +32,13 @@ class WebhookEndpointUpdateParams(TypedDict): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -311,13 +317,6 @@ class WebhookEndpointUpdateParams(TypedDict): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py index a363854e8..6a947c927 100644 --- a/stripe/params/billing/_credit_balance_summary_retrieve_params.py +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -58,7 +58,7 @@ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict): List["CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index b7dbb6097..fa220e203 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -115,7 +115,7 @@ class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict): List["CreditGrantCreateParamsApplicabilityConfigScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 003acd9ca..123c27c94 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -135,6 +135,7 @@ SessionCreateParamsPaymentMethodOptionsSepaDebit as SessionCreateParamsPaymentMethodOptionsSepaDebit, SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, + SessionCreateParamsPaymentMethodOptionsSunbit as SessionCreateParamsPaymentMethodOptionsSunbit, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, SessionCreateParamsPaymentMethodOptionsTwint as SessionCreateParamsPaymentMethodOptionsTwint, SessionCreateParamsPaymentMethodOptionsUpi as SessionCreateParamsPaymentMethodOptionsUpi, @@ -156,6 +157,7 @@ SessionCreateParamsShippingOptionShippingRateDataFixedAmount as SessionCreateParamsShippingOptionShippingRateDataFixedAmount, SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions as SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions, SessionCreateParamsSubscriptionData as SessionCreateParamsSubscriptionData, + SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig as SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig, SessionCreateParamsSubscriptionDataBillingMode as SessionCreateParamsSubscriptionDataBillingMode, SessionCreateParamsSubscriptionDataBillingModeFlexible as SessionCreateParamsSubscriptionDataBillingModeFlexible, SessionCreateParamsSubscriptionDataInvoiceSettings as SessionCreateParamsSubscriptionDataInvoiceSettings, @@ -760,6 +762,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsSwish": ( "stripe.params.checkout._session_create_params", False, @@ -844,6 +850,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsSubscriptionDataBillingMode": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 067c54e36..97da5c816 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -286,8 +286,6 @@ class SessionCreateParams(RequestOptions): You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well. - - You can't set this parameter if `ui_mode` is `custom`. """ optional_items: NotRequired[List["SessionCreateParamsOptionalItem"]] """ @@ -541,6 +539,14 @@ class SessionCreateParamsAutomaticSurcharge(TypedDict): class SessionCreateParamsAutomaticTax(TypedDict): + address_collection_precision: NotRequired[Literal["full", "minimal"]] + """ + Controls how much address information Checkout collects when [automatic_tax](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-automatic_tax-enabled) is enabled. + + Defaults to `full`, which collects the address fields needed for the most accurate tax calculation. Set to `minimal` to collect only the fields required for tax in the buyer's country, accepting potentially less precise tax calculation in exchange for a streamlined form. + + Only honored when `automatic_tax.enabled` is `true`, `billing_address_collection` is `auto`, the resolved tax address source is the session billing address, and `ui_mode` is `form`. + """ enabled: bool """ Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. @@ -1740,6 +1746,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Sofort payment method options. """ + sunbit: NotRequired["SessionCreateParamsPaymentMethodOptionsSunbit"] + """ + contains details about the Sunbit payment method options. + """ swish: NotRequired["SessionCreateParamsPaymentMethodOptionsSwish"] """ contains details about the Swish payment method options. @@ -2789,6 +2799,23 @@ class SessionCreateParamsPaymentMethodOptionsSofort(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + 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://docs.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://docs.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://docs.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://docs.stripe.com/strong-customer-authentication). + """ + + class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired[str] """ @@ -3381,6 +3408,12 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ A future timestamp to anchor the subscription's billing cycle for new subscriptions. You can't set this parameter if `ui_mode` is `elements`. """ + billing_cycle_anchor_config: NotRequired[ + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig" + ] + """ + Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month. + """ billing_mode: NotRequired["SessionCreateParamsSubscriptionDataBillingMode"] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. @@ -3443,6 +3476,29 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ +class SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig(TypedDict): + day_of_month: int + """ + The day of the month the anchor should be. Ranges from 1 to 31. + """ + hour: NotRequired[int] + """ + The hour of the day the anchor should be. Ranges from 0 to 23. + """ + minute: NotRequired[int] + """ + The minute of the hour the anchor should be. Ranges from 0 to 59. + """ + month: NotRequired[int] + """ + The month to start full cycle periods. Ranges from 1 to 12. + """ + second: NotRequired[int] + """ + The second of the minute the anchor should be. Ranges from 0 to 59. + """ + + class SessionCreateParamsSubscriptionDataBillingMode(TypedDict): flexible: NotRequired[ "SessionCreateParamsSubscriptionDataBillingModeFlexible" diff --git a/stripe/params/crypto/__init__.py b/stripe/params/crypto/__init__.py new file mode 100644 index 000000000..340060833 --- /dev/null +++ b/stripe/params/crypto/__init__.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.crypto._customer_consumer_wallet_list_params import ( + CustomerConsumerWalletListParams as CustomerConsumerWalletListParams, + ) + from stripe.params.crypto._customer_list_crypto_consumer_wallets_params import ( + CustomerListCryptoConsumerWalletsParams as CustomerListCryptoConsumerWalletsParams, + ) + from stripe.params.crypto._customer_list_payment_tokens_params import ( + CustomerListPaymentTokensParams as CustomerListPaymentTokensParams, + ) + from stripe.params.crypto._customer_payment_token_list_params import ( + CustomerPaymentTokenListParams as CustomerPaymentTokenListParams, + ) + from stripe.params.crypto._customer_retrieve_params import ( + CustomerRetrieveParams as CustomerRetrieveParams, + ) + from stripe.params.crypto._onramp_session_checkout_params import ( + OnrampSessionCheckoutParams as OnrampSessionCheckoutParams, + OnrampSessionCheckoutParamsMandateData as OnrampSessionCheckoutParamsMandateData, + OnrampSessionCheckoutParamsMandateDataCustomerAcceptance as OnrampSessionCheckoutParamsMandateDataCustomerAcceptance, + OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOffline as OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOffline, + OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOnline as OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOnline, + ) + from stripe.params.crypto._onramp_session_create_params import ( + OnrampSessionCreateParams as OnrampSessionCreateParams, + OnrampSessionCreateParamsKycDetails as OnrampSessionCreateParamsKycDetails, + OnrampSessionCreateParamsWalletAddresses as OnrampSessionCreateParamsWalletAddresses, + OnrampSessionCreateParamsWalletAddressesDestinationTags as OnrampSessionCreateParamsWalletAddressesDestinationTags, + ) + from stripe.params.crypto._onramp_session_list_params import ( + OnrampSessionListParams as OnrampSessionListParams, + OnrampSessionListParamsCreated as OnrampSessionListParamsCreated, + ) + from stripe.params.crypto._onramp_session_quote_params import ( + OnrampSessionQuoteParams as OnrampSessionQuoteParams, + ) + from stripe.params.crypto._onramp_session_retrieve_params import ( + OnrampSessionRetrieveParams as OnrampSessionRetrieveParams, + ) + from stripe.params.crypto._onramp_transaction_limits_retrieve_params import ( + OnrampTransactionLimitsRetrieveParams as OnrampTransactionLimitsRetrieveParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "CustomerConsumerWalletListParams": ( + "stripe.params.crypto._customer_consumer_wallet_list_params", + False, + ), + "CustomerListCryptoConsumerWalletsParams": ( + "stripe.params.crypto._customer_list_crypto_consumer_wallets_params", + False, + ), + "CustomerListPaymentTokensParams": ( + "stripe.params.crypto._customer_list_payment_tokens_params", + False, + ), + "CustomerPaymentTokenListParams": ( + "stripe.params.crypto._customer_payment_token_list_params", + False, + ), + "CustomerRetrieveParams": ( + "stripe.params.crypto._customer_retrieve_params", + False, + ), + "OnrampSessionCheckoutParams": ( + "stripe.params.crypto._onramp_session_checkout_params", + False, + ), + "OnrampSessionCheckoutParamsMandateData": ( + "stripe.params.crypto._onramp_session_checkout_params", + False, + ), + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptance": ( + "stripe.params.crypto._onramp_session_checkout_params", + False, + ), + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOffline": ( + "stripe.params.crypto._onramp_session_checkout_params", + False, + ), + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOnline": ( + "stripe.params.crypto._onramp_session_checkout_params", + False, + ), + "OnrampSessionCreateParams": ( + "stripe.params.crypto._onramp_session_create_params", + False, + ), + "OnrampSessionCreateParamsKycDetails": ( + "stripe.params.crypto._onramp_session_create_params", + False, + ), + "OnrampSessionCreateParamsWalletAddresses": ( + "stripe.params.crypto._onramp_session_create_params", + False, + ), + "OnrampSessionCreateParamsWalletAddressesDestinationTags": ( + "stripe.params.crypto._onramp_session_create_params", + False, + ), + "OnrampSessionListParams": ( + "stripe.params.crypto._onramp_session_list_params", + False, + ), + "OnrampSessionListParamsCreated": ( + "stripe.params.crypto._onramp_session_list_params", + False, + ), + "OnrampSessionQuoteParams": ( + "stripe.params.crypto._onramp_session_quote_params", + False, + ), + "OnrampSessionRetrieveParams": ( + "stripe.params.crypto._onramp_session_retrieve_params", + False, + ), + "OnrampTransactionLimitsRetrieveParams": ( + "stripe.params.crypto._onramp_transaction_limits_retrieve_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/crypto/_customer_consumer_wallet_list_params.py b/stripe/params/crypto/_customer_consumer_wallet_list_params.py new file mode 100644 index 000000000..589c2311b --- /dev/null +++ b/stripe/params/crypto/_customer_consumer_wallet_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerConsumerWalletListParams(TypedDict): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ diff --git a/stripe/params/crypto/_customer_list_crypto_consumer_wallets_params.py b/stripe/params/crypto/_customer_list_crypto_consumer_wallets_params.py new file mode 100644 index 000000000..dc2a24650 --- /dev/null +++ b/stripe/params/crypto/_customer_list_crypto_consumer_wallets_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class CustomerListCryptoConsumerWalletsParams(RequestOptions): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ diff --git a/stripe/params/crypto/_customer_list_payment_tokens_params.py b/stripe/params/crypto/_customer_list_payment_tokens_params.py new file mode 100644 index 000000000..f6b1e44d8 --- /dev/null +++ b/stripe/params/crypto/_customer_list_payment_tokens_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class CustomerListPaymentTokensParams(RequestOptions): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ diff --git a/stripe/params/crypto/_customer_payment_token_list_params.py b/stripe/params/crypto/_customer_payment_token_list_params.py new file mode 100644 index 000000000..62292f1e6 --- /dev/null +++ b/stripe/params/crypto/_customer_payment_token_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentTokenListParams(TypedDict): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ diff --git a/stripe/params/crypto/_customer_retrieve_params.py b/stripe/params/crypto/_customer_retrieve_params.py new file mode 100644 index 000000000..17e5db37d --- /dev/null +++ b/stripe/params/crypto/_customer_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class CustomerRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/crypto/_onramp_session_checkout_params.py b/stripe/params/crypto/_onramp_session_checkout_params.py new file mode 100644 index 000000000..91abb8647 --- /dev/null +++ b/stripe/params/crypto/_onramp_session_checkout_params.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OnrampSessionCheckoutParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + mandate_data: NotRequired["OnrampSessionCheckoutParamsMandateData"] + """ + This hash contains details about the mandate to create + """ + + +class OnrampSessionCheckoutParamsMandateData(TypedDict): + customer_acceptance: ( + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptance" + ) + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class OnrampSessionCheckoutParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired[int] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ + + +class OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOffline( + TypedDict, +): + pass + + +class OnrampSessionCheckoutParamsMandateDataCustomerAcceptanceOnline( + TypedDict +): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ diff --git a/stripe/params/crypto/_onramp_session_create_params.py b/stripe/params/crypto/_onramp_session_create_params.py new file mode 100644 index 000000000..9cd6d15db --- /dev/null +++ b/stripe/params/crypto/_onramp_session_create_params.py @@ -0,0 +1,149 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OnrampSessionCreateParams(RequestOptions): + customer_ip_address: NotRequired[str] + """ + The IP address of the customer the platform intends to onramp. + + If the user's IP is in a region we can't support, we return an `HTTP 400` with an appropriate error code. + + We support IPv4 and IPv6 addresses. Geographic supportability is checked again later in the onramp flow, which provides a way to hide the onramp option from ineligible users for a better user experience. + """ + destination_amount: NotRequired[str] + """ + The default amount of crypto to exchange into. + + * When left null, a default value is computed if `source_amount`, `destination_currency`, and `destination_network` are set. + * When set, both `destination_currency` and `destination_network` must also be set. All cryptocurrencies are supported to their full precisions (for example, 18 decimal places for `eth`). We validate and generate an error if the amount exceeds the supported precision based on the exchange currency. Setting `source_amount` is mutually exclusive with setting `destination_amount` (only one or the other is supported). Users can update the amount in the onramp UI. + """ + destination_currencies: NotRequired[ + List[ + Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + ] + ] + """ + The list of destination cryptocurrencies a user can choose from. + + * When left null, all supported cryptocurrencies are shown in the onramp UI subject to `destination_networks` if set. + * When set, it must be a non-empty array where all values in the array are valid cryptocurrencies. You can use it to lock users to a specific cryptocurrency by passing a single value array. Users **cannot** override this parameter. + """ + destination_currency: NotRequired[ + Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + ] + """ + The default destination cryptocurrency. + + * When left null, the first value of `destination_currencies` is selected. + * When set, if `destination_currencies` is also set, the value of `destination_currency` must be present in that array. To lock a `destination_currency`, specify that value as the single value for `destination_currencies`. Users can select a different cryptocurrency in the onramp UI subject to `destination_currencies` if set. + """ + destination_network: NotRequired[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + """ + The default destination crypto network. + + * When left null, the first value of `destination_networks` is selected. + * When set, if `destination_networks` is also set, the value of `destination_network` must be present in that array. To lock a `destination_network`, specify that value as the single value for `destination_networks`. Users can select a different network in the onramp UI subject to `destination_networks` if set. + """ + destination_networks: NotRequired[ + List[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + ] + """ + The list of destination crypto networks user can choose from. + + * When left null, all supported crypto networks are shown in the onramp UI. + * When set, it must be a non-empty array where values in the array are each a valid crypto network. It can be used to lock users to a specific network by passing a single value array. Users **cannot** override this parameter. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + kyc_details: NotRequired["OnrampSessionCreateParamsKycDetails"] + """ + Pre-populate some of the required KYC information for the user if you've already collected it within your application. + + Related guide: [Using the API](https://docs.stripe.com/crypto/using-the-api#how-to-pre-populate-customer-information) + """ + lock_wallet_address: NotRequired[bool] + """ + Whether or not to lock the suggested wallet address. If destination tags are provided, this will also lock the destination tags. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of [key-value pairs](https://docs.stripe.com/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`. + """ + settlement_speed: NotRequired[Literal["instant", "standard"]] + """ + Speed at which the cryptocurrency is delivered to the wallet + One of: + `instant` (default): crypto is delivered when payment is confirmed + `standard`: crypto is delivered when payment settles + """ + source_amount: NotRequired[str] + """ + The default amount of fiat (in decimal) to exchange into crypto. + + * When left null, a default value is computed if `destination_amount` is set. + * When set, setting `source_amount` is mutually exclusive with setting `destination_amount` (only one or the other is supported). We don't support fractional pennies. If fractional minor units of a currency are passed in, it generates an error. Users can update the value in the onramp UI. + """ + source_currency: NotRequired[Literal["eur", "gbp", "usd"]] + """ + The default source fiat currency for the onramp session. + + * When left null, a default currency is selected based on user locale. + * When set, it must be one of the fiat currencies supported by onramp. Users can still select a different currency in the onramp UI. + """ + wallet_addresses: NotRequired["OnrampSessionCreateParamsWalletAddresses"] + """ + The end customer's crypto wallet address (for each network) to use for this transaction. + + * When left null, the user enters their wallet in the onramp UI. + * When set, the platform must set either `destination_networks` or `destination_network` and we perform address validation. Users can still select a different wallet in the onramp UI. + """ + + +class OnrampSessionCreateParamsKycDetails(TypedDict): + pass + + +class OnrampSessionCreateParamsWalletAddresses(TypedDict): + destination_tags: NotRequired[ + "OnrampSessionCreateParamsWalletAddressesDestinationTags" + ] + """ + The end customer's crypto wallet destination tag (for each network) to use for this transaction. This only applies for tag-based assets such as XLM. + + * When left null, the user enters their wallet in the onramp UI. + """ + + +class OnrampSessionCreateParamsWalletAddressesDestinationTags(TypedDict): + stellar: NotRequired[str] diff --git a/stripe/params/crypto/_onramp_session_list_params.py b/stripe/params/crypto/_onramp_session_list_params.py new file mode 100644 index 000000000..382e394a7 --- /dev/null +++ b/stripe/params/crypto/_onramp_session_list_params.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OnrampSessionListParams(RequestOptions): + created: NotRequired["OnrampSessionListParamsCreated|int"] + """ + Only return onramp sessions that were created during the given date interval. + """ + destination_currency: NotRequired[ + Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + ] + """ + The destination cryptocurrency to filter by. + """ + destination_network: NotRequired[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + """ + The destination blockchain network to filter by. + """ + ending_before: NotRequired[str] + """ + An object ID cursor for use in pagination. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit ranging from 1 to 100 (defaults to 10). + """ + starting_after: NotRequired[str] + """ + An object ID cursor for use in pagination. + """ + status: NotRequired[ + Literal[ + "fulfillment_complete", + "fulfillment_processing", + "initialized", + "rejected", + "requires_payment", + ] + ] + """ + The status of the Onramp Session. One of = `{initialized, rejected, requires_payment, fulfillment_processing, fulfillment_complete}` + """ + + +class OnrampSessionListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/crypto/_onramp_session_quote_params.py b/stripe/params/crypto/_onramp_session_quote_params.py new file mode 100644 index 000000000..6ecec4897 --- /dev/null +++ b/stripe/params/crypto/_onramp_session_quote_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class OnrampSessionQuoteParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/crypto/_onramp_session_retrieve_params.py b/stripe/params/crypto/_onramp_session_retrieve_params.py new file mode 100644 index 000000000..e51b45309 --- /dev/null +++ b/stripe/params/crypto/_onramp_session_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class OnrampSessionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py new file mode 100644 index 000000000..449477eec --- /dev/null +++ b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired + + +class OnrampTransactionLimitsRetrieveParams(RequestOptions): + customer_ip_address: NotRequired[str] + """ + The IP address of the customer requesting transaction limits. We support IPv4 and IPv6 addresses. + """ + destination_network: NotRequired[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ] + ] + """ + The destination blockchain network to use for limit calculations. + """ + destination_tag: NotRequired[str] + """ + The destination tag for the wallet address, if applicable for the network. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + wallet_address: NotRequired[str] + """ + The wallet address to use for destination-specific limit calculations. + """ diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index a827b236b..7f9130e06 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -114,9 +114,9 @@ class SessionCreateParamsHosted(TypedDict): class SessionCreateParamsLimits(TypedDict): - accounts: int + accounts: Union[Literal[""], int] """ - The number of accounts that can be linked in this Session. + The number of accounts that can be linked in this Session. Pass an empty value to allow any number of accounts. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 78c4339dd..59da017bd 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -349,7 +349,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index b9010a26c..4821c9740 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -4,6 +4,7 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource +from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Optional, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -37,6 +38,13 @@ class ValueListItem( OBJECT_NAME: ClassVar[Literal["radar.value_list_item"]] = ( "radar.value_list_item" ) + + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -61,6 +69,10 @@ class ValueListItem( """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this item. If not null, this item is associated to a redaction job. + """ value: str """ The value of the item. @@ -261,3 +273,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"redaction": Redaction} diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index 40e2ab1bc..eab3c0731 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, List, Optional from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -21,6 +21,16 @@ class Hold(ListableAPIResource["Hold"]): OBJECT_NAME: ClassVar[Literal["reserve.hold"]] = "reserve.hold" + class ReleaseDetail(StripeObject): + amount: int + """ + The amount released by the ReserveRelease from this ReserveHold. A positive integer representing how much is released in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + reserve_release: str + """ + The ReserveRelease which released funds from this ReserveHold (e.g., resrel_123). + """ + class ReleaseSchedule(StripeObject): release_after: Optional[int] """ @@ -75,6 +85,10 @@ class ReleaseSchedule(StripeObject): """ The reason for the ReserveHold. """ + release_details: Optional[List[ReleaseDetail]] + """ + List of ReserveReleases and the amounts released from this ReserveHold. + """ release_schedule: ReleaseSchedule reserve_plan: Optional[ExpandableField["Plan"]] """ @@ -149,4 +163,7 @@ async def retrieve_async( await instance.refresh_async() return instance - _inner_class_types = {"release_schedule": ReleaseSchedule} + _inner_class_types = { + "release_details": ReleaseDetail, + "release_schedule": ReleaseSchedule, + } diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index 96c288501..0268d25d2 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -165,10 +165,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1037,7 +1043,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 7867ebaaa..37ee9ca21 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -103,6 +103,7 @@ class ApiError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -142,6 +143,10 @@ class ApiError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers",