Repository: stripe/stripe-node
Pull request #1797 (2023-05-22 19:42:13)

Update generated code
Codegen for openapi v354.

## Changelog
* Add support for `zip_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
* Change type of `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code` from `string` to `enum`
* Add support for `zip` on `Charge.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
* Add support for new value `zip` on enums `CheckoutSessionCreateParams.payment_method_types[]` and `PaymentMethodCreateParams.type`
* Add support for new value `zip` on enums `CustomerListPaymentMethodsParams.type` and `PaymentMethodListParams.type`
* Add support for new value `zip` on enums `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for new value `zip` on enum `PaymentMethod.type`



Patch:
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index e7c73ddf..d747c48c 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1,1 +1,1 @@
-v350
\ No newline at end of file
+v354
\ No newline at end of file
diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts
index 96642e86..9d5e8ca0 100644
--- a/types/Accounts.d.ts
+++ b/types/Accounts.d.ts
@@ -67,7 +67,7 @@ declare module 'stripe' {
       details_submitted: boolean;
 
       /**
-       * An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
+       * An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
        */
       email: string | null;
 
@@ -337,6 +337,11 @@ declare module 'stripe' {
          * The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
          */
         us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
+
+        /**
+         * The status of the Zip capability of the account, or whether the account can directly process Zip charges.
+         */
+        zip_payments?: Capabilities.ZipPayments;
       }
 
       namespace Capabilities {
@@ -409,6 +414,8 @@ declare module 'stripe' {
         type Treasury = 'active' | 'inactive' | 'pending';
 
         type UsBankAccountAchPayments = 'active' | 'inactive' | 'pending';
+
+        type ZipPayments = 'active' | 'inactive' | 'pending';
       }
 
       interface Company {
diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts
index 6557828f..50d062e4 100644
--- a/types/AccountsResource.d.ts
+++ b/types/AccountsResource.d.ts
@@ -310,6 +310,11 @@ declare module 'stripe' {
          * The us_bank_account_ach_payments capability.
          */
         us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
+
+        /**
+         * The zip_payments capability.
+         */
+        zip_payments?: Capabilities.ZipPayments;
       }
 
       namespace Capabilities {
@@ -557,6 +562,13 @@ declare module 'stripe' {
            */
           requested?: boolean;
         }
+
+        interface ZipPayments {
+          /**
+           * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+           */
+          requested?: boolean;
+        }
       }
 
       interface Company {
@@ -1559,6 +1571,11 @@ declare module 'stripe' {
          * The us_bank_account_ach_payments capability.
          */
         us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
+
+        /**
+         * The zip_payments capability.
+         */
+        zip_payments?: Capabilities.ZipPayments;
       }
 
       namespace Capabilities {
@@ -1806,6 +1823,13 @@ declare module 'stripe' {
            */
           requested?: boolean;
         }
+
+        interface ZipPayments {
+          /**
+           * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+           */
+          requested?: boolean;
+        }
       }
 
       interface Company {
diff --git a/types/Charges.d.ts b/types/Charges.d.ts
index a560b5df..ed4eda6d 100644
--- a/types/Charges.d.ts
+++ b/types/Charges.d.ts
@@ -473,6 +473,8 @@ declare module 'stripe' {
         wechat?: PaymentMethodDetails.Wechat;
 
         wechat_pay?: PaymentMethodDetails.WechatPay;
+
+        zip?: PaymentMethodDetails.Zip;
       }
 
       namespace PaymentMethodDetails {
@@ -1838,6 +1840,8 @@ declare module 'stripe' {
            */
           transaction_id: string | null;
         }
+
+        interface Zip {}
       }
 
       interface RadarOptions {
diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts
index c8a8fdc0..95dea456 100644
--- a/types/Checkout/SessionsResource.d.ts
+++ b/types/Checkout/SessionsResource.d.ts
@@ -1563,7 +1563,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface PhoneNumberCollection {
           /**
diff --git a/types/CustomersResource.d.ts b/types/CustomersResource.d.ts
index a7ef79ba..31391ca4 100644
--- a/types/CustomersResource.d.ts
+++ b/types/CustomersResource.d.ts
@@ -733,7 +733,8 @@ declare module 'stripe' {
         | 'sepa_debit'
         | 'sofort'
         | 'us_bank_account'
-        | 'wechat_pay';
+        | 'wechat_pay'
+        | 'zip';
     }
 
     interface CustomerBalanceTransactionListParams extends PaginationParams {
diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts
index 4c3dc879..56bbdca1 100644
--- a/types/Invoices.d.ts
+++ b/types/Invoices.d.ts
@@ -588,7 +588,7 @@ declare module 'stripe' {
         /**
          * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
          */
-        code?: string;
+        code?: LastFinalizationError.Code;
 
         /**
          * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
@@ -679,6 +679,162 @@ declare module 'stripe' {
       }
 
       namespace LastFinalizationError {
+        type Code =
+          | 'account_closed'
+          | 'account_country_invalid_address'
+          | 'account_error_country_change_requires_additional_steps'
+          | 'account_information_mismatch'
+          | 'account_invalid'
+          | 'account_number_invalid'
+          | 'acss_debit_session_incomplete'
+          | 'alipay_upgrade_required'
+          | 'amount_too_large'
+          | 'amount_too_small'
+          | 'api_key_expired'
+          | 'authentication_required'
+          | 'balance_insufficient'
+          | 'bank_account_bad_routing_numbers'
+          | 'bank_account_declined'
+          | 'bank_account_exists'
+          | 'bank_account_restricted'
+          | 'bank_account_unusable'
+          | 'bank_account_unverified'
+          | 'bank_account_verification_failed'
+          | 'billing_invalid_mandate'
+          | 'bitcoin_upgrade_required'
+          | 'capture_charge_authorization_expired'
+          | 'capture_unauthorized_payment'
+          | 'card_decline_rate_limit_exceeded'
+          | 'card_declined'
+          | 'cardholder_phone_number_required'
+          | 'charge_already_captured'
+          | 'charge_already_refunded'
+          | 'charge_disputed'
+          | 'charge_exceeds_source_limit'
+          | 'charge_expired_for_capture'
+          | 'charge_invalid_parameter'
+          | 'charge_not_refundable'
+          | 'clearing_code_unsupported'
+          | 'country_code_invalid'
+          | 'country_unsupported'
+          | 'coupon_expired'
+          | 'customer_max_payment_methods'
+          | 'customer_max_subscriptions'
+          | 'debit_not_authorized'
+          | 'email_invalid'
+          | 'expired_card'
+          | 'idempotency_key_in_use'
+          | 'incorrect_address'
+          | 'incorrect_cvc'
+          | 'incorrect_number'
+          | 'incorrect_zip'
+          | 'instant_payouts_config_disabled'
+          | 'instant_payouts_currency_disabled'
+          | 'instant_payouts_limit_exceeded'
+          | 'instant_payouts_unsupported'
+          | 'insufficient_funds'
+          | 'intent_invalid_state'
+          | 'intent_verification_method_missing'
+          | 'invalid_card_type'
+          | 'invalid_characters'
+          | 'invalid_charge_amount'
+          | 'invalid_cvc'
+          | 'invalid_expiry_month'
+          | 'invalid_expiry_year'
+          | 'invalid_number'
+          | 'invalid_source_usage'
+          | 'invoice_no_customer_line_items'
+          | 'invoice_no_payment_method_types'
+          | 'invoice_no_subscription_line_items'
+          | 'invoice_not_editable'
+          | 'invoice_on_behalf_of_not_editable'
+          | 'invoice_payment_intent_requires_action'
+          | 'invoice_upcoming_none'
+          | 'livemode_mismatch'
+          | 'lock_timeout'
+          | 'missing'
+          | 'no_account'
+          | 'not_allowed_on_standard_account'
+          | 'out_of_inventory'
+          | 'ownership_declaration_not_allowed'
+          | 'parameter_invalid_empty'
+          | 'parameter_invalid_integer'
+          | 'parameter_invalid_string_blank'
+          | 'parameter_invalid_string_empty'
+          | 'parameter_missing'
+          | 'parameter_unknown'
+          | 'parameters_exclusive'
+          | 'payment_intent_action_required'
+          | 'payment_intent_authentication_failure'
+          | 'payment_intent_incompatible_payment_method'
+          | 'payment_intent_invalid_parameter'
+          | 'payment_intent_konbini_rejected_confirmation_number'
+          | 'payment_intent_mandate_invalid'
+          | 'payment_intent_payment_attempt_expired'
+          | 'payment_intent_payment_attempt_failed'
+          | 'payment_intent_unexpected_state'
+          | 'payment_method_bank_account_already_verified'
+          | 'payment_method_bank_account_blocked'
+          | 'payment_method_billing_details_address_missing'
+          | 'payment_method_configuration_failures'
+          | 'payment_method_currency_mismatch'
+          | 'payment_method_customer_decline'
+          | 'payment_method_invalid_parameter'
+          | 'payment_method_invalid_parameter_testmode'
+          | 'payment_method_microdeposit_failed'
+          | 'payment_method_microdeposit_verification_amounts_invalid'
+          | 'payment_method_microdeposit_verification_amounts_mismatch'
+          | 'payment_method_microdeposit_verification_attempts_exceeded'
+          | 'payment_method_microdeposit_verification_descriptor_code_mismatch'
+          | 'payment_method_microdeposit_verification_timeout'
+          | 'payment_method_not_available'
+          | 'payment_method_provider_decline'
+          | 'payment_method_provider_timeout'
+          | 'payment_method_unactivated'
+          | 'payment_method_unexpected_state'
+          | 'payment_method_unsupported_type'
+          | 'payout_reconciliation_not_ready'
+          | 'payouts_limit_exceeded'
+          | 'payouts_not_allowed'
+          | 'platform_account_required'
+          | 'platform_api_key_expired'
+          | 'postal_code_invalid'
+          | 'processing_error'
+          | 'product_inactive'
+          | 'progressive_onboarding_limit_exceeded'
+          | 'rate_limit'
+          | 'refer_to_customer'
+          | 'refund_disputed_payment'
+          | 'resource_already_exists'
+          | 'resource_missing'
+          | 'return_intent_already_processed'
+          | 'routing_number_invalid'
+          | 'secret_key_required'
+          | 'sepa_unsupported_account'
+          | 'setup_attempt_failed'
+          | 'setup_intent_authentication_failure'
+          | 'setup_intent_invalid_parameter'
+          | 'setup_intent_mandate_invalid'
+          | 'setup_intent_setup_attempt_expired'
+          | 'setup_intent_unexpected_state'
+          | 'shipping_calculation_failed'
+          | 'sku_inactive'
+          | 'state_unsupported'
+          | 'status_transition_invalid'
+          | 'tax_id_invalid'
+          | 'taxes_calculation_failed'
+          | 'terminal_location_country_unsupported'
+          | 'terminal_reader_busy'
+          | 'terminal_reader_offline'
+          | 'terminal_reader_timeout'
+          | 'testmode_charges_only'
+          | 'tls_version_unsupported'
+          | 'token_already_used'
+          | 'token_in_use'
+          | 'transfer_source_balance_parameters_mismatch'
+          | 'transfers_not_allowed'
+          | 'url_invalid';
+
         type Type =
           | 'api_error'
           | 'card_error'
diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts
index cd3cc9f9..e7dbba7f 100644
--- a/types/PaymentIntents.d.ts
+++ b/types/PaymentIntents.d.ts
@@ -266,7 +266,7 @@ declare module 'stripe' {
         /**
          * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
          */
-        code?: string;
+        code?: LastPaymentError.Code;
 
         /**
          * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
@@ -357,6 +357,162 @@ declare module 'stripe' {
       }
 
       namespace LastPaymentError {
+        type Code =
+          | 'account_closed'
+          | 'account_country_invalid_address'
+          | 'account_error_country_change_requires_additional_steps'
+          | 'account_information_mismatch'
+          | 'account_invalid'
+          | 'account_number_invalid'
+          | 'acss_debit_session_incomplete'
+          | 'alipay_upgrade_required'
+          | 'amount_too_large'
+          | 'amount_too_small'
+          | 'api_key_expired'
+          | 'authentication_required'
+          | 'balance_insufficient'
+          | 'bank_account_bad_routing_numbers'
+          | 'bank_account_declined'
+          | 'bank_account_exists'
+          | 'bank_account_restricted'
+          | 'bank_account_unusable'
+          | 'bank_account_unverified'
+          | 'bank_account_verification_failed'
+          | 'billing_invalid_mandate'
+          | 'bitcoin_upgrade_required'
+          | 'capture_charge_authorization_expired'
+          | 'capture_unauthorized_payment'
+          | 'card_decline_rate_limit_exceeded'
+          | 'card_declined'
+          | 'cardholder_phone_number_required'
+          | 'charge_already_captured'
+          | 'charge_already_refunded'
+          | 'charge_disputed'
+          | 'charge_exceeds_source_limit'
+          | 'charge_expired_for_capture'
+          | 'charge_invalid_parameter'
+          | 'charge_not_refundable'
+          | 'clearing_code_unsupported'
+          | 'country_code_invalid'
+          | 'country_unsupported'
+          | 'coupon_expired'
+          | 'customer_max_payment_methods'
+          | 'customer_max_subscriptions'
+          | 'debit_not_authorized'
+          | 'email_invalid'
+          | 'expired_card'
+          | 'idempotency_key_in_use'
+          | 'incorrect_address'
+          | 'incorrect_cvc'
+          | 'incorrect_number'
+          | 'incorrect_zip'
+          | 'instant_payouts_config_disabled'
+          | 'instant_payouts_currency_disabled'
+          | 'instant_payouts_limit_exceeded'
+          | 'instant_payouts_unsupported'
+          | 'insufficient_funds'
+          | 'intent_invalid_state'
+          | 'intent_verification_method_missing'
+          | 'invalid_card_type'
+          | 'invalid_characters'
+          | 'invalid_charge_amount'
+          | 'invalid_cvc'
+          | 'invalid_expiry_month'
+          | 'invalid_expiry_year'
+          | 'invalid_number'
+          | 'invalid_source_usage'
+          | 'invoice_no_customer_line_items'
+          | 'invoice_no_payment_method_types'
+          | 'invoice_no_subscription_line_items'
+          | 'invoice_not_editable'
+          | 'invoice_on_behalf_of_not_editable'
+          | 'invoice_payment_intent_requires_action'
+          | 'invoice_upcoming_none'
+          | 'livemode_mismatch'
+          | 'lock_timeout'
+          | 'missing'
+          | 'no_account'
+          | 'not_allowed_on_standard_account'
+          | 'out_of_inventory'
+          | 'ownership_declaration_not_allowed'
+          | 'parameter_invalid_empty'
+          | 'parameter_invalid_integer'
+          | 'parameter_invalid_string_blank'
+          | 'parameter_invalid_string_empty'
+          | 'parameter_missing'
+          | 'parameter_unknown'
+          | 'parameters_exclusive'
+          | 'payment_intent_action_required'
+          | 'payment_intent_authentication_failure'
+          | 'payment_intent_incompatible_payment_method'
+          | 'payment_intent_invalid_parameter'
+          | 'payment_intent_konbini_rejected_confirmation_number'
+          | 'payment_intent_mandate_invalid'
+          | 'payment_intent_payment_attempt_expired'
+          | 'payment_intent_payment_attempt_failed'
+          | 'payment_intent_unexpected_state'
+          | 'payment_method_bank_account_already_verified'
+          | 'payment_method_bank_account_blocked'
+          | 'payment_method_billing_details_address_missing'
+          | 'payment_method_configuration_failures'
+          | 'payment_method_currency_mismatch'
+          | 'payment_method_customer_decline'
+          | 'payment_method_invalid_parameter'
+          | 'payment_method_invalid_parameter_testmode'
+          | 'payment_method_microdeposit_failed'
+          | 'payment_method_microdeposit_verification_amounts_invalid'
+          | 'payment_method_microdeposit_verification_amounts_mismatch'
+          | 'payment_method_microdeposit_verification_attempts_exceeded'
+          | 'payment_method_microdeposit_verification_descriptor_code_mismatch'
+          | 'payment_method_microdeposit_verification_timeout'
+          | 'payment_method_not_available'
+          | 'payment_method_provider_decline'
+          | 'payment_method_provider_timeout'
+          | 'payment_method_unactivated'
+          | 'payment_method_unexpected_state'
+          | 'payment_method_unsupported_type'
+          | 'payout_reconciliation_not_ready'
+          | 'payouts_limit_exceeded'
+          | 'payouts_not_allowed'
+          | 'platform_account_required'
+          | 'platform_api_key_expired'
+          | 'postal_code_invalid'
+          | 'processing_error'
+          | 'product_inactive'
+          | 'progressive_onboarding_limit_exceeded'
+          | 'rate_limit'
+          | 'refer_to_customer'
+          | 'refund_disputed_payment'
+          | 'resource_already_exists'
+          | 'resource_missing'
+          | 'return_intent_already_processed'
+          | 'routing_number_invalid'
+          | 'secret_key_required'
+          | 'sepa_unsupported_account'
+          | 'setup_attempt_failed'
+          | 'setup_intent_authentication_failure'
+          | 'setup_intent_invalid_parameter'
+          | 'setup_intent_mandate_invalid'
+          | 'setup_intent_setup_attempt_expired'
+          | 'setup_intent_unexpected_state'
+          | 'shipping_calculation_failed'
+          | 'sku_inactive'
+          | 'state_unsupported'
+          | 'status_transition_invalid'
+          | 'tax_id_invalid'
+          | 'taxes_calculation_failed'
+          | 'terminal_location_country_unsupported'
+          | 'terminal_reader_busy'
+          | 'terminal_reader_offline'
+          | 'terminal_reader_timeout'
+          | 'testmode_charges_only'
+          | 'tls_version_unsupported'
+          | 'token_already_used'
+          | 'token_in_use'
+          | 'transfer_source_balance_parameters_mismatch'
+          | 'transfers_not_allowed'
+          | 'url_invalid';
+
         type Type =
           | 'api_error'
           | 'card_error'
@@ -1016,6 +1172,8 @@ declare module 'stripe' {
         us_bank_account?: PaymentMethodOptions.UsBankAccount;
 
         wechat_pay?: PaymentMethodOptions.WechatPay;
+
+        zip?: PaymentMethodOptions.Zip;
       }
 
       namespace PaymentMethodOptions {
@@ -1826,6 +1984,17 @@ declare module 'stripe' {
         namespace WechatPay {
           type Client = 'android' | 'ios' | 'web';
         }
+
+        interface Zip {
+          /**
+           * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+           *
+           * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+           *
+           * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+           */
+          setup_future_usage?: 'none';
+        }
       }
 
       interface Processing {
diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts
index a3161916..4adec86c 100644
--- a/types/PaymentIntentsResource.d.ts
+++ b/types/PaymentIntentsResource.d.ts
@@ -397,6 +397,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -724,7 +729,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -760,6 +766,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {
@@ -926,6 +934,11 @@ declare module 'stripe' {
          * If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
          */
         wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
+
+        /**
+         * If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+         */
+        zip?: Stripe.Emptyable<PaymentMethodOptions.Zip>;
       }
 
       namespace PaymentMethodOptions {
@@ -1925,6 +1938,19 @@ declare module 'stripe' {
         namespace WechatPay {
           type Client = 'android' | 'ios' | 'web';
         }
+
+        interface Zip {
+          /**
+           * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+           *
+           * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+           *
+           * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+           *
+           * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+           */
+          setup_future_usage?: 'none';
+        }
       }
 
       interface RadarOptions {
@@ -2281,6 +2307,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -2608,7 +2639,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -2644,6 +2676,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {
@@ -2810,6 +2844,11 @@ declare module 'stripe' {
          * If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
          */
         wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
+
+        /**
+         * If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+         */
+        zip?: Stripe.Emptyable<PaymentMethodOptions.Zip>;
       }
 
       namespace PaymentMethodOptions {
@@ -3809,6 +3848,19 @@ declare module 'stripe' {
         namespace WechatPay {
           type Client = 'android' | 'ios' | 'web';
         }
+
+        interface Zip {
+          /**
+           * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+           *
+           * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+           *
+           * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+           *
+           * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+           */
+          setup_future_usage?: 'none';
+        }
       }
 
       type SetupFutureUsage = 'off_session' | 'on_session';
@@ -4305,6 +4357,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -4632,7 +4689,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -4668,6 +4726,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {
@@ -4834,6 +4894,11 @@ declare module 'stripe' {
          * If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
          */
         wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
+
+        /**
+         * If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+         */
+        zip?: Stripe.Emptyable<PaymentMethodOptions.Zip>;
       }
 
       namespace PaymentMethodOptions {
@@ -5833,6 +5898,19 @@ declare module 'stripe' {
         namespace WechatPay {
           type Client = 'android' | 'ios' | 'web';
         }
+
+        interface Zip {
+          /**
+           * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+           *
+           * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+           *
+           * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+           *
+           * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+           */
+          setup_future_usage?: 'none';
+        }
       }
 
       interface RadarOptions {
diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts
index fa34e72a..4f0e3f7d 100644
--- a/types/PaymentMethods.d.ts
+++ b/types/PaymentMethods.d.ts
@@ -115,6 +115,8 @@ declare module 'stripe' {
       us_bank_account?: PaymentMethod.UsBankAccount;
 
       wechat_pay?: PaymentMethod.WechatPay;
+
+      zip?: PaymentMethod.Zip;
     }
 
     namespace PaymentMethod {
@@ -909,7 +911,8 @@ declare module 'stripe' {
         | 'sepa_debit'
         | 'sofort'
         | 'us_bank_account'
-        | 'wechat_pay';
+        | 'wechat_pay'
+        | 'zip';
 
       interface UsBankAccount {
         /**
@@ -1023,6 +1026,8 @@ declare module 'stripe' {
       }
 
       interface WechatPay {}
+
+      interface Zip {}
     }
   }
 }
diff --git a/types/PaymentMethodsResource.d.ts b/types/PaymentMethodsResource.d.ts
index 2d663437..a3f9b424 100644
--- a/types/PaymentMethodsResource.d.ts
+++ b/types/PaymentMethodsResource.d.ts
@@ -192,6 +192,11 @@ declare module 'stripe' {
        * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
        */
       wechat_pay?: PaymentMethodCreateParams.WechatPay;
+
+      /**
+       * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+       */
+      zip?: PaymentMethodCreateParams.Zip;
     }
 
     namespace PaymentMethodCreateParams {
@@ -546,7 +551,8 @@ declare module 'stripe' {
         | 'sepa_debit'
         | 'sofort'
         | 'us_bank_account'
-        | 'wechat_pay';
+        | 'wechat_pay'
+        | 'zip';
 
       interface UsBankAccount {
         /**
@@ -582,6 +588,8 @@ declare module 'stripe' {
       }
 
       interface WechatPay {}
+
+      interface Zip {}
     }
 
     interface PaymentMethodRetrieveParams {
@@ -656,6 +664,11 @@ declare module 'stripe' {
        * If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
        */
       us_bank_account?: PaymentMethodUpdateParams.UsBankAccount;
+
+      /**
+       * This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
+       */
+      zip?: PaymentMethodUpdateParams.Zip;
     }
 
     namespace PaymentMethodUpdateParams {
@@ -719,6 +732,8 @@ declare module 'stripe' {
       namespace UsBankAccount {
         type AccountHolderType = 'company' | 'individual';
       }
+
+      interface Zip {}
     }
 
     interface PaymentMethodListParams extends PaginationParams {
@@ -770,7 +785,8 @@ declare module 'stripe' {
         | 'sepa_debit'
         | 'sofort'
         | 'us_bank_account'
-        | 'wechat_pay';
+        | 'wechat_pay'
+        | 'zip';
     }
 
     interface PaymentMethodAttachParams {
diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts
index c88fe1d1..41d41f2d 100644
--- a/types/SetupAttempts.d.ts
+++ b/types/SetupAttempts.d.ts
@@ -491,7 +491,7 @@ declare module 'stripe' {
         /**
          * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
          */
-        code?: string;
+        code?: SetupError.Code;
 
         /**
          * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
@@ -582,6 +582,162 @@ declare module 'stripe' {
       }
 
       namespace SetupError {
+        type Code =
+          | 'account_closed'
+          | 'account_country_invalid_address'
+          | 'account_error_country_change_requires_additional_steps'
+          | 'account_information_mismatch'
+          | 'account_invalid'
+          | 'account_number_invalid'
+          | 'acss_debit_session_incomplete'
+          | 'alipay_upgrade_required'
+          | 'amount_too_large'
+          | 'amount_too_small'
+          | 'api_key_expired'
+          | 'authentication_required'
+          | 'balance_insufficient'
+          | 'bank_account_bad_routing_numbers'
+          | 'bank_account_declined'
+          | 'bank_account_exists'
+          | 'bank_account_restricted'
+          | 'bank_account_unusable'
+          | 'bank_account_unverified'
+          | 'bank_account_verification_failed'
+          | 'billing_invalid_mandate'
+          | 'bitcoin_upgrade_required'
+          | 'capture_charge_authorization_expired'
+          | 'capture_unauthorized_payment'
+          | 'card_decline_rate_limit_exceeded'
+          | 'card_declined'
+          | 'cardholder_phone_number_required'
+          | 'charge_already_captured'
+          | 'charge_already_refunded'
+          | 'charge_disputed'
+          | 'charge_exceeds_source_limit'
+          | 'charge_expired_for_capture'
+          | 'charge_invalid_parameter'
+          | 'charge_not_refundable'
+          | 'clearing_code_unsupported'
+          | 'country_code_invalid'
+          | 'country_unsupported'
+          | 'coupon_expired'
+          | 'customer_max_payment_methods'
+          | 'customer_max_subscriptions'
+          | 'debit_not_authorized'
+          | 'email_invalid'
+          | 'expired_card'
+          | 'idempotency_key_in_use'
+          | 'incorrect_address'
+          | 'incorrect_cvc'
+          | 'incorrect_number'
+          | 'incorrect_zip'
+          | 'instant_payouts_config_disabled'
+          | 'instant_payouts_currency_disabled'
+          | 'instant_payouts_limit_exceeded'
+          | 'instant_payouts_unsupported'
+          | 'insufficient_funds'
+          | 'intent_invalid_state'
+          | 'intent_verification_method_missing'
+          | 'invalid_card_type'
+          | 'invalid_characters'
+          | 'invalid_charge_amount'
+          | 'invalid_cvc'
+          | 'invalid_expiry_month'
+          | 'invalid_expiry_year'
+          | 'invalid_number'
+          | 'invalid_source_usage'
+          | 'invoice_no_customer_line_items'
+          | 'invoice_no_payment_method_types'
+          | 'invoice_no_subscription_line_items'
+          | 'invoice_not_editable'
+          | 'invoice_on_behalf_of_not_editable'
+          | 'invoice_payment_intent_requires_action'
+          | 'invoice_upcoming_none'
+          | 'livemode_mismatch'
+          | 'lock_timeout'
+          | 'missing'
+          | 'no_account'
+          | 'not_allowed_on_standard_account'
+          | 'out_of_inventory'
+          | 'ownership_declaration_not_allowed'
+          | 'parameter_invalid_empty'
+          | 'parameter_invalid_integer'
+          | 'parameter_invalid_string_blank'
+          | 'parameter_invalid_string_empty'
+          | 'parameter_missing'
+          | 'parameter_unknown'
+          | 'parameters_exclusive'
+          | 'payment_intent_action_required'
+          | 'payment_intent_authentication_failure'
+          | 'payment_intent_incompatible_payment_method'
+          | 'payment_intent_invalid_parameter'
+          | 'payment_intent_konbini_rejected_confirmation_number'
+          | 'payment_intent_mandate_invalid'
+          | 'payment_intent_payment_attempt_expired'
+          | 'payment_intent_payment_attempt_failed'
+          | 'payment_intent_unexpected_state'
+          | 'payment_method_bank_account_already_verified'
+          | 'payment_method_bank_account_blocked'
+          | 'payment_method_billing_details_address_missing'
+          | 'payment_method_configuration_failures'
+          | 'payment_method_currency_mismatch'
+          | 'payment_method_customer_decline'
+          | 'payment_method_invalid_parameter'
+          | 'payment_method_invalid_parameter_testmode'
+          | 'payment_method_microdeposit_failed'
+          | 'payment_method_microdeposit_verification_amounts_invalid'
+          | 'payment_method_microdeposit_verification_amounts_mismatch'
+          | 'payment_method_microdeposit_verification_attempts_exceeded'
+          | 'payment_method_microdeposit_verification_descriptor_code_mismatch'
+          | 'payment_method_microdeposit_verification_timeout'
+          | 'payment_method_not_available'
+          | 'payment_method_provider_decline'
+          | 'payment_method_provider_timeout'
+          | 'payment_method_unactivated'
+          | 'payment_method_unexpected_state'
+          | 'payment_method_unsupported_type'
+          | 'payout_reconciliation_not_ready'
+          | 'payouts_limit_exceeded'
+          | 'payouts_not_allowed'
+          | 'platform_account_required'
+          | 'platform_api_key_expired'
+          | 'postal_code_invalid'
+          | 'processing_error'
+          | 'product_inactive'
+          | 'progressive_onboarding_limit_exceeded'
+          | 'rate_limit'
+          | 'refer_to_customer'
+          | 'refund_disputed_payment'
+          | 'resource_already_exists'
+          | 'resource_missing'
+          | 'return_intent_already_processed'
+          | 'routing_number_invalid'
+          | 'secret_key_required'
+          | 'sepa_unsupported_account'
+          | 'setup_attempt_failed'
+          | 'setup_intent_authentication_failure'
+          | 'setup_intent_invalid_parameter'
+          | 'setup_intent_mandate_invalid'
+          | 'setup_intent_setup_attempt_expired'
+          | 'setup_intent_unexpected_state'
+          | 'shipping_calculation_failed'
+          | 'sku_inactive'
+          | 'state_unsupported'
+          | 'status_transition_invalid'
+          | 'tax_id_invalid'
+          | 'taxes_calculation_failed'
+          | 'terminal_location_country_unsupported'
+          | 'terminal_reader_busy'
+          | 'terminal_reader_offline'
+          | 'terminal_reader_timeout'
+          | 'testmode_charges_only'
+          | 'tls_version_unsupported'
+          | 'token_already_used'
+          | 'token_in_use'
+          | 'transfer_source_balance_parameters_mismatch'
+          | 'transfers_not_allowed'
+          | 'url_invalid';
+
         type Type =
           | 'api_error'
           | 'card_error'
diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts
index 2eca2896..e793d60d 100644
--- a/types/SetupIntents.d.ts
+++ b/types/SetupIntents.d.ts
@@ -182,7 +182,7 @@ declare module 'stripe' {
         /**
          * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
          */
-        code?: string;
+        code?: LastSetupError.Code;
 
         /**
          * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
@@ -273,6 +273,162 @@ declare module 'stripe' {
       }
 
       namespace LastSetupError {
+        type Code =
+          | 'account_closed'
+          | 'account_country_invalid_address'
+          | 'account_error_country_change_requires_additional_steps'
+          | 'account_information_mismatch'
+          | 'account_invalid'
+          | 'account_number_invalid'
+          | 'acss_debit_session_incomplete'
+          | 'alipay_upgrade_required'
+          | 'amount_too_large'
+          | 'amount_too_small'
+          | 'api_key_expired'
+          | 'authentication_required'
+          | 'balance_insufficient'
+          | 'bank_account_bad_routing_numbers'
+          | 'bank_account_declined'
+          | 'bank_account_exists'
+          | 'bank_account_restricted'
+          | 'bank_account_unusable'
+          | 'bank_account_unverified'
+          | 'bank_account_verification_failed'
+          | 'billing_invalid_mandate'
+          | 'bitcoin_upgrade_required'
+          | 'capture_charge_authorization_expired'
+          | 'capture_unauthorized_payment'
+          | 'card_decline_rate_limit_exceeded'
+          | 'card_declined'
+          | 'cardholder_phone_number_required'
+          | 'charge_already_captured'
+          | 'charge_already_refunded'
+          | 'charge_disputed'
+          | 'charge_exceeds_source_limit'
+          | 'charge_expired_for_capture'
+          | 'charge_invalid_parameter'
+          | 'charge_not_refundable'
+          | 'clearing_code_unsupported'
+          | 'country_code_invalid'
+          | 'country_unsupported'
+          | 'coupon_expired'
+          | 'customer_max_payment_methods'
+          | 'customer_max_subscriptions'
+          | 'debit_not_authorized'
+          | 'email_invalid'
+          | 'expired_card'
+          | 'idempotency_key_in_use'
+          | 'incorrect_address'
+          | 'incorrect_cvc'
+          | 'incorrect_number'
+          | 'incorrect_zip'
+          | 'instant_payouts_config_disabled'
+          | 'instant_payouts_currency_disabled'
+          | 'instant_payouts_limit_exceeded'
+          | 'instant_payouts_unsupported'
+          | 'insufficient_funds'
+          | 'intent_invalid_state'
+          | 'intent_verification_method_missing'
+          | 'invalid_card_type'
+          | 'invalid_characters'
+          | 'invalid_charge_amount'
+          | 'invalid_cvc'
+          | 'invalid_expiry_month'
+          | 'invalid_expiry_year'
+          | 'invalid_number'
+          | 'invalid_source_usage'
+          | 'invoice_no_customer_line_items'
+          | 'invoice_no_payment_method_types'
+          | 'invoice_no_subscription_line_items'
+          | 'invoice_not_editable'
+          | 'invoice_on_behalf_of_not_editable'
+          | 'invoice_payment_intent_requires_action'
+          | 'invoice_upcoming_none'
+          | 'livemode_mismatch'
+          | 'lock_timeout'
+          | 'missing'
+          | 'no_account'
+          | 'not_allowed_on_standard_account'
+          | 'out_of_inventory'
+          | 'ownership_declaration_not_allowed'
+          | 'parameter_invalid_empty'
+          | 'parameter_invalid_integer'
+          | 'parameter_invalid_string_blank'
+          | 'parameter_invalid_string_empty'
+          | 'parameter_missing'
+          | 'parameter_unknown'
+          | 'parameters_exclusive'
+          | 'payment_intent_action_required'
+          | 'payment_intent_authentication_failure'
+          | 'payment_intent_incompatible_payment_method'
+          | 'payment_intent_invalid_parameter'
+          | 'payment_intent_konbini_rejected_confirmation_number'
+          | 'payment_intent_mandate_invalid'
+          | 'payment_intent_payment_attempt_expired'
+          | 'payment_intent_payment_attempt_failed'
+          | 'payment_intent_unexpected_state'
+          | 'payment_method_bank_account_already_verified'
+          | 'payment_method_bank_account_blocked'
+          | 'payment_method_billing_details_address_missing'
+          | 'payment_method_configuration_failures'
+          | 'payment_method_currency_mismatch'
+          | 'payment_method_customer_decline'
+          | 'payment_method_invalid_parameter'
+          | 'payment_method_invalid_parameter_testmode'
+          | 'payment_method_microdeposit_failed'
+          | 'payment_method_microdeposit_verification_amounts_invalid'
+          | 'payment_method_microdeposit_verification_amounts_mismatch'
+          | 'payment_method_microdeposit_verification_attempts_exceeded'
+          | 'payment_method_microdeposit_verification_descriptor_code_mismatch'
+          | 'payment_method_microdeposit_verification_timeout'
+          | 'payment_method_not_available'
+          | 'payment_method_provider_decline'
+          | 'payment_method_provider_timeout'
+          | 'payment_method_unactivated'
+          | 'payment_method_unexpected_state'
+          | 'payment_method_unsupported_type'
+          | 'payout_reconciliation_not_ready'
+          | 'payouts_limit_exceeded'
+          | 'payouts_not_allowed'
+          | 'platform_account_required'
+          | 'platform_api_key_expired'
+          | 'postal_code_invalid'
+          | 'processing_error'
+          | 'product_inactive'
+          | 'progressive_onboarding_limit_exceeded'
+          | 'rate_limit'
+          | 'refer_to_customer'
+          | 'refund_disputed_payment'
+          | 'resource_already_exists'
+          | 'resource_missing'
+          | 'return_intent_already_processed'
+          | 'routing_number_invalid'
+          | 'secret_key_required'
+          | 'sepa_unsupported_account'
+          | 'setup_attempt_failed'
+          | 'setup_intent_authentication_failure'
+          | 'setup_intent_invalid_parameter'
+          | 'setup_intent_mandate_invalid'
+          | 'setup_intent_setup_attempt_expired'
+          | 'setup_intent_unexpected_state'
+          | 'shipping_calculation_failed'
+          | 'sku_inactive'
+          | 'state_unsupported'
+          | 'status_transition_invalid'
+          | 'tax_id_invalid'
+          | 'taxes_calculation_failed'
+          | 'terminal_location_country_unsupported'
+          | 'terminal_reader_busy'
+          | 'terminal_reader_offline'
+          | 'terminal_reader_timeout'
+          | 'testmode_charges_only'
+          | 'tls_version_unsupported'
+          | 'token_already_used'
+          | 'token_in_use'
+          | 'transfer_source_balance_parameters_mismatch'
+          | 'transfers_not_allowed'
+          | 'url_invalid';
+
         type Type =
           | 'api_error'
           | 'card_error'
diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts
index e7d317e0..d9bce5da 100644
--- a/types/SetupIntentsResource.d.ts
+++ b/types/SetupIntentsResource.d.ts
@@ -325,6 +325,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -652,7 +657,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -688,6 +694,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {
@@ -1231,6 +1239,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -1558,7 +1571,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -1594,6 +1608,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {
@@ -2219,6 +2235,11 @@ declare module 'stripe' {
          * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
          */
         wechat_pay?: PaymentMethodData.WechatPay;
+
+        /**
+         * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+         */
+        zip?: PaymentMethodData.Zip;
       }
 
       namespace PaymentMethodData {
@@ -2546,7 +2567,8 @@ declare module 'stripe' {
           | 'sepa_debit'
           | 'sofort'
           | 'us_bank_account'
-          | 'wechat_pay';
+          | 'wechat_pay'
+          | 'zip';
 
         interface UsBankAccount {
           /**
@@ -2582,6 +2604,8 @@ declare module 'stripe' {
         }
 
         interface WechatPay {}
+
+        interface Zip {}
       }
 
       interface PaymentMethodOptions {


Test patch:
diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js
index 4dc2f5fb..caa1b0f5 100644
--- a/test/resources/generated_examples_test.spec.js
+++ b/test/resources/generated_examples_test.spec.js
@@ -228,7 +228,7 @@ describe('Accounts', function() {
         method: 'GET',
         path: '/v1/accounts/acc_123',
         response:
-          '{"business_profile":{"mcc":"mcc","name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","sepa_debit_payments":"inactive","sofort_payments":"active","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"sole_establishment","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"details":"details","details_code":"details_code","document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}',
+          '{"business_profile":{"mcc":"mcc","name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","sepa_debit_payments":"inactive","sofort_payments":"active","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"sole_establishment","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"details":"details","details_code":"details_code","document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}',
       },
     ]);
     const account = await stripe.accounts.retrieve('acc_123');
@@ -3527,4 +3527,27 @@ describe('Tax.Calculations', function() {
     );
     expect(calculationLineItems).not.to.be.null;
   });
+
+  it('create method', async function() {
+    const calculation = await stripe.tax.calculations.create({
+      currency: 'usd',
+      line_items: [
+        {
+          amount: 1000,
+          reference: 'L1',
+        },
+      ],
+      customer_details: {
+        address: {
+          line1: '354 Oyster Point Blvd',
+          city: 'South San Francisco',
+          state: 'CA',
+          postal_code: '94080',
+          country: 'US',
+        },
+        address_source: 'shipping',
+      },
+    });
+    expect(calculation).not.to.be.null;
+  });
 });