diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index a1f13a16..9944c3b8 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -90,6 +90,9 @@ const options: StripeElementsOptions = { captureMethod: 'automatic', paymentMethodTypes: ['card'], paymentMethodCreation: 'manual', + paymentMethodOptions: { + card: {require_cvc_recollection: true}, + }, appearance: { disableAnimations: false, theme: 'night', @@ -119,6 +122,9 @@ stripe.elements({ capture_method: 'automatic', payment_method_types: ['card'], payment_method_creation: 'manual', + payment_method_options: { + us_bank_account: {financial_connections: {permissions: ['payment_method']}}, + }, }); const elementsClientSecret: StripeElements = stripe.elements({ diff --git a/types/stripe-js/elements-group.d.ts b/types/stripe-js/elements-group.d.ts index 8c4257e9..5e3b76d9 100644 --- a/types/stripe-js/elements-group.d.ts +++ b/types/stripe-js/elements-group.d.ts @@ -617,6 +617,18 @@ export type StripeElementLocale = | 'zh-HK' | 'zh-TW'; +type PaymentMethodOptions = { + card?: {require_cvc_recollection?: boolean}; + us_bank_account?: { + financial_connections?: { + permissions?: Array< + 'balances' | 'ownership' | 'payment_method' | 'transactions' + >; + }; + verification_method?: 'automatic' | 'instant'; + }; +}; + /** * Options to create an `Elements` instance with. */ @@ -771,6 +783,20 @@ export interface StripeElementsOptionsMode extends BaseStripeElementsOptions { */ payment_method_creation?: 'manual'; + /** + * Additional payment-method-specific options for configuring Payment Element behavior. + * + * @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions + */ + paymentMethodOptions?: PaymentMethodOptions; + + /** + * Additional payment-method-specific options for configuring Payment Element behavior. + * + * @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions + */ + payment_method_options?: PaymentMethodOptions; + /** * Either use mode or clientSecret when creating an Elements group */