diff --git a/types/stripe-v3/index.d.ts b/types/stripe-v3/index.d.ts index 78ca2c0f8b..a3386fa9fa 100644 --- a/types/stripe-v3/index.d.ts +++ b/types/stripe-v3/index.d.ts @@ -6,6 +6,7 @@ // Adam Cmiel // Justin Leider // Kamil GaƂuszka +// Stefan Langeder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare var Stripe: stripe.StripeStatic; @@ -313,6 +314,8 @@ declare namespace stripe { complete: boolean; empty: boolean; value?: { postalCode: string | number }; + country?: string; + bankName?: string; error?: Error; } @@ -321,7 +324,7 @@ declare namespace stripe { locale?: string; } - type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton'; + type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton' | 'iban'; interface Elements { create(type: elementsType, options?: ElementsOptions): Element; } @@ -339,6 +342,7 @@ declare namespace stripe { hideIcon?: boolean; iconStyle?: 'solid' | 'default'; placeholder?: string; + placeholderCountry?: string; style?: { base?: Style; complete?: Style; @@ -348,6 +352,8 @@ declare namespace stripe { }; value?: string | { [objectKey: string]: string; }; paymentRequest?: paymentRequest.StripePaymentRequest; + supportedCountries?: string[]; + disabled?: boolean; } interface Style extends StyleOptions { diff --git a/types/stripe-v3/stripe-v3-tests.ts b/types/stripe-v3/stripe-v3-tests.ts index abd15d5afd..664e627116 100644 --- a/types/stripe-v3/stripe-v3-tests.ts +++ b/types/stripe-v3/stripe-v3-tests.ts @@ -211,5 +211,10 @@ describe("Stripe v2 & v3", () => { (error: stripe.Error) => { console.error(error); }); + + elements.create('iban', { + supportedCountries: ['SEPA'], + placeholderCountry: 'AT' + }); }); });