diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 729e5bf658..c2632ad8fc 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -803,6 +803,13 @@ declare namespace Stripe { url: string; } + interface ILoginLinkOptions { + /** + * Where to redirect the user after they log out of their dashboard. + */ + redirect_url: string; + } + interface ICompanyShared { /** * The company’s primary address. @@ -9763,7 +9770,7 @@ declare namespace Stripe { createLoginLink(accId: string, response?: IResponseFn): Promise; createLoginLink( accId: string, - redirectUrl?: string, + options?: accounts.ILoginLinkOptions, response?: IResponseFn, ): Promise; diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index 26059e3ed4..124ec87100 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -1302,7 +1302,7 @@ stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk').then(loginLink => { const created: number = loginLink.created; const url: string = loginLink.url; }); -stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk', 'http://localhost:3000').then(loginLink => { +stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk', { redirect_url: 'http://localhost:3000' }).then(loginLink => { const object: string = loginLink.object; const created: number = loginLink.created; const url: string = loginLink.url;