diff --git a/types/react-stripe-elements/index.d.ts b/types/react-stripe-elements/index.d.ts index d7cea98728..fa68cb1b31 100644 --- a/types/react-stripe-elements/index.d.ts +++ b/types/react-stripe-elements/index.d.ts @@ -27,7 +27,10 @@ export namespace ReactStripeElements { error?: { decline_code?: string }; }; - type StripeProviderProps = { apiKey: string; stripe?: never; } | { apiKey?: never; stripe: StripeProps | null; }; + interface StripeProviderOptions { + stripeAccount?: string; + } + type StripeProviderProps = { apiKey: string; stripe?: never; options?: StripeProviderOptions } | { apiKey?: never; stripe: StripeProps | null; options?: StripeProviderOptions; }; interface StripeProps { createSource(sourceData?: SourceOptions): Promise; diff --git a/types/react-stripe-elements/react-stripe-elements-tests.tsx b/types/react-stripe-elements/react-stripe-elements-tests.tsx index 93a2a34588..575987a1d9 100644 --- a/types/react-stripe-elements/react-stripe-elements-tests.tsx +++ b/types/react-stripe-elements/react-stripe-elements-tests.tsx @@ -195,3 +195,8 @@ const TestStripeProviderProps2: React.SFC<{ const TestStripeProviderProps3: React.SFC<{ stripe: StripeProps; }> = props => ; + +/** + * StripeProvider should be able to accept an `options` prop + */ +const TestStripeProviderOptions: React.SFC = () => ;