diff --git a/types/2020-08-27/Cards.d.ts b/types/2020-08-27/Cards.d.ts index d2757332b9..858273a8ee 100644 --- a/types/2020-08-27/Cards.d.ts +++ b/types/2020-08-27/Cards.d.ts @@ -83,7 +83,7 @@ declare module 'stripe' { customer?: string | Stripe.Customer | Stripe.DeletedCustomer | null; /** - * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). */ cvc_check: string | null; diff --git a/types/2020-08-27/Charges.d.ts b/types/2020-08-27/Charges.d.ts index 6ce925a334..e4a08a6d12 100644 --- a/types/2020-08-27/Charges.d.ts +++ b/types/2020-08-27/Charges.d.ts @@ -38,7 +38,7 @@ declare module 'stripe' { application_fee: string | Stripe.ApplicationFee | null; /** - * The amount of the application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + * The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ application_fee_amount: number | null; @@ -1361,6 +1361,12 @@ declare module 'stripe' { */ iban_last4: string | null; + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ + preferred_language?: Sofort.PreferredLanguage | null; + /** * Owner's verified full name. Values are verified or provided by SOFORT directly * (if supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -1368,6 +1374,17 @@ declare module 'stripe' { verified_name: string | null; } + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } + interface StripeAccount {} interface Wechat {} diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts index be3e2bc953..7c438d2a33 100644 --- a/types/2020-08-27/Checkout/Sessions.d.ts +++ b/types/2020-08-27/Checkout/Sessions.d.ts @@ -95,7 +95,7 @@ declare module 'stripe' { /** * The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. */ - mode: Session.Mode | null; + mode: Session.Mode; /** * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. @@ -825,10 +825,11 @@ declare module 'stripe' { interface PaymentIntentData { /** - * The amount of the application fee (if any) that will be applied to the payment and transferred to the - * application owner's Stripe account. To use an application fee, the request must be made on - * behalf of another account, using the `Stripe-Account` header or an OAuth key. For more - * information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The amount of the application fee (if any) that will be requested to be applied to the payment and + * transferred to the application owner's Stripe account. The amount of the application fee collected + * will be capped at the total payment amount. To use an application fee, the request must be made on + * behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, + * see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ application_fee_amount?: number; @@ -960,7 +961,8 @@ declare module 'stripe' { | 'fpx' | 'giropay' | 'ideal' - | 'p24'; + | 'p24' + | 'sofort'; interface SetupIntentData { /** diff --git a/types/2020-08-27/PaymentIntents.d.ts b/types/2020-08-27/PaymentIntents.d.ts index cb52f2fbf2..b0574ec460 100644 --- a/types/2020-08-27/PaymentIntents.d.ts +++ b/types/2020-08-27/PaymentIntents.d.ts @@ -36,7 +36,7 @@ declare module 'stripe' { application: string | Stripe.Application | null; /** - * The amount of the application fee (if any) for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + * The amount of the application fee (if any) requested for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ application_fee_amount: number | null; @@ -376,6 +376,8 @@ declare module 'stripe' { bancontact?: PaymentMethodOptions.Bancontact; card?: PaymentMethodOptions.Card; + + sofort?: PaymentMethodOptions.Sofort; } namespace PaymentMethodOptions { @@ -481,6 +483,24 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic' | 'challenge_only'; } + + interface Sofort { + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + */ + preferred_language: Sofort.PreferredLanguage | null; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } } type SetupFutureUsage = 'off_session' | 'on_session'; @@ -545,7 +565,7 @@ declare module 'stripe' { currency: string; /** - * The amount of the application fee (if any) that will be applied to the payment and transferred to the application owner's Stripe account. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ application_fee_amount?: number; @@ -807,6 +827,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodData.SepaDebit; + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodData.Sofort; + /** * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ @@ -974,6 +999,17 @@ declare module 'stripe' { iban: string; } + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + type Type = | 'alipay' | 'au_becs_debit' @@ -984,7 +1020,8 @@ declare module 'stripe' { | 'giropay' | 'ideal' | 'p24' - | 'sepa_debit'; + | 'sepa_debit' + | 'sofort'; } interface PaymentMethodOptions { @@ -1002,6 +1039,11 @@ declare module 'stripe' { * Configuration for any card payments attempted on this PaymentIntent. */ card?: PaymentMethodOptions.Card | null; + + /** + * If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + */ + sofort?: PaymentMethodOptions.Sofort | null; } namespace PaymentMethodOptions { @@ -1094,6 +1136,21 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic'; } + + interface Sofort { + preferred_language?: Sofort.PreferredLanguage; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } } type SetupFutureUsage = 'off_session' | 'on_session'; @@ -1166,7 +1223,7 @@ declare module 'stripe' { amount?: number; /** - * The amount of the application fee (if any) that will be applied to the payment and transferred to the application owner's Stripe account. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ application_fee_amount?: number | null; @@ -1330,6 +1387,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodData.SepaDebit; + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodData.Sofort; + /** * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ @@ -1497,6 +1559,17 @@ declare module 'stripe' { iban: string; } + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + type Type = | 'alipay' | 'au_becs_debit' @@ -1507,7 +1580,8 @@ declare module 'stripe' { | 'giropay' | 'ideal' | 'p24' - | 'sepa_debit'; + | 'sepa_debit' + | 'sofort'; } interface PaymentMethodOptions { @@ -1525,6 +1599,11 @@ declare module 'stripe' { * Configuration for any card payments attempted on this PaymentIntent. */ card?: PaymentMethodOptions.Card | null; + + /** + * If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + */ + sofort?: PaymentMethodOptions.Sofort | null; } namespace PaymentMethodOptions { @@ -1617,6 +1696,21 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic'; } + + interface Sofort { + preferred_language?: Sofort.PreferredLanguage; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } } type SetupFutureUsage = 'off_session' | 'on_session'; @@ -1700,7 +1794,7 @@ declare module 'stripe' { amount_to_capture?: number; /** - * The amount of the application fee (if any) that will be applied to the payment and transferred to the application owner's Stripe account. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. Must be greater than zero when provided. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ application_fee_amount?: number; @@ -1967,6 +2061,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodData.SepaDebit; + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodData.Sofort; + /** * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ @@ -2134,6 +2233,17 @@ declare module 'stripe' { iban: string; } + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + type Type = | 'alipay' | 'au_becs_debit' @@ -2144,7 +2254,8 @@ declare module 'stripe' { | 'giropay' | 'ideal' | 'p24' - | 'sepa_debit'; + | 'sepa_debit' + | 'sofort'; } interface PaymentMethodOptions { @@ -2162,6 +2273,11 @@ declare module 'stripe' { * Configuration for any card payments attempted on this PaymentIntent. */ card?: PaymentMethodOptions.Card | null; + + /** + * If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + */ + sofort?: PaymentMethodOptions.Sofort | null; } namespace PaymentMethodOptions { @@ -2254,6 +2370,21 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic'; } + + interface Sofort { + preferred_language?: Sofort.PreferredLanguage; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } } type SetupFutureUsage = 'off_session' | 'on_session'; diff --git a/types/2020-08-27/PaymentMethods.d.ts b/types/2020-08-27/PaymentMethods.d.ts index f596d0164e..d2b3260251 100644 --- a/types/2020-08-27/PaymentMethods.d.ts +++ b/types/2020-08-27/PaymentMethods.d.ts @@ -63,6 +63,8 @@ declare module 'stripe' { sepa_debit?: PaymentMethod.SepaDebit; + sofort?: PaymentMethod.Sofort; + /** * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ @@ -443,6 +445,13 @@ declare module 'stripe' { last4: string | null; } + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + } + type Type = | 'alipay' | 'au_becs_debit' @@ -454,7 +463,8 @@ declare module 'stripe' { | 'giropay' | 'ideal' | 'p24' - | 'sepa_debit'; + | 'sepa_debit' + | 'sofort'; } interface PaymentMethodCreateParams { @@ -543,6 +553,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodCreateParams.SepaDebit; + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodCreateParams.Sofort; + /** * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ @@ -736,6 +751,17 @@ declare module 'stripe' { iban: string; } + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + type Type = | 'alipay' | 'au_becs_debit' @@ -747,7 +773,8 @@ declare module 'stripe' { | 'giropay' | 'ideal' | 'p24' - | 'sepa_debit'; + | 'sepa_debit' + | 'sofort'; } interface PaymentMethodRetrieveParams {