From 621c396d6955859d320e6cdb37636a7b3f9a424d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:22:48 +0000 Subject: [PATCH 01/23] Update generated code for v606 --- OPENAPI_VERSION | 2 +- types/Checkout/SessionsResource.d.ts | 5 +++++ types/Orders.d.ts | 5 +++++ types/OrdersResource.d.ts | 10 ++++++++++ types/PaymentIntents.d.ts | 5 +++++ types/PaymentIntentsResource.d.ts | 15 +++++++++++++++ types/SetupIntents.d.ts | 5 +++++ types/SetupIntentsResource.d.ts | 15 +++++++++++++++ 8 files changed, 61 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fb1dec85b4..9cf8111f78 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v605 \ No newline at end of file +v606 \ No newline at end of file diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 3514959389..ff9b6eda66 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -1520,6 +1520,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { diff --git a/types/Orders.d.ts b/types/Orders.d.ts index 5acc079539..4e4c2df06a 100644 --- a/types/Orders.d.ts +++ b/types/Orders.d.ts @@ -623,6 +623,11 @@ declare module 'stripe' { * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). */ setup_future_usage?: Paypal.SetupFutureUsage; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { diff --git a/types/OrdersResource.d.ts b/types/OrdersResource.d.ts index 0c801d5c8f..3c2a35e4d1 100644 --- a/types/OrdersResource.d.ts +++ b/types/OrdersResource.d.ts @@ -862,6 +862,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { @@ -2141,6 +2146,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index dde5b225d2..024d51d54d 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -2050,6 +2050,11 @@ declare module 'stripe' { * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). */ setup_future_usage?: Paypal.SetupFutureUsage; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 55e233d02b..93319590d8 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -2108,6 +2108,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { @@ -4456,6 +4461,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { @@ -7204,6 +7214,11 @@ declare module 'stripe' { * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } namespace Paypal { diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index bc9e41f553..6b141c1023 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -736,6 +736,11 @@ declare module 'stripe' { * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } interface SepaDebit { diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index 4b9f2bfa33..0e851670e2 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -933,6 +933,11 @@ declare module 'stripe' { billing_agreement_id?: string; currency?: string; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } interface SepaDebit { @@ -1870,6 +1875,11 @@ declare module 'stripe' { billing_agreement_id?: string; currency?: string; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } interface SepaDebit { @@ -2894,6 +2904,11 @@ declare module 'stripe' { billing_agreement_id?: string; currency?: string; + + /** + * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + */ + subsellers?: Array; } interface SepaDebit { From 22ccd3b7ae751df52e6cc0cd2c7ffc66fde42c6f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:07:57 +0000 Subject: [PATCH 02/23] Update generated code for v607 --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9cf8111f78..412d7bce5f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v606 \ No newline at end of file +v607 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index e0c6616e2b..1cb975daf4 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -907,7 +907,7 @@ declare module 'stripe' { currently_due: Array | null; /** - * If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. + * If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. */ disabled_reason: string | null; From 476f39405c3c399f6b0d60df5c88139bc9f951d1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:39:30 +0000 Subject: [PATCH 03/23] Update generated code for v608 --- OPENAPI_VERSION | 2 +- types/PaymentIntentsResource.d.ts | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 412d7bce5f..4d2b499697 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v607 \ No newline at end of file +v608 \ No newline at end of file diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 93319590d8..96a6680643 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -1703,21 +1703,12 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; - /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; - /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } - namespace CardPresent { - type RequestIncrementalAuthorization = 'if_available' | 'never'; - } - interface Cashapp { /** * Controls when the funds will be captured from the customer's account. @@ -4056,21 +4047,12 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; - /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; - /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } - namespace CardPresent { - type RequestIncrementalAuthorization = 'if_available' | 'never'; - } - interface Cashapp { /** * Controls when the funds will be captured from the customer's account. @@ -6809,21 +6791,12 @@ declare module 'stripe' { */ request_extended_authorization?: boolean; - /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; - /** * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } - namespace CardPresent { - type RequestIncrementalAuthorization = 'if_available' | 'never'; - } - interface Cashapp { /** * Controls when the funds will be captured from the customer's account. From 3d3541cce0fa12a8e41f24da98fa023d7641b234 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:04:34 +0000 Subject: [PATCH 04/23] Update generated code for v608 --- types/PaymentIntentsResource.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 96a6680643..5cb94563ef 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -1707,6 +1707,15 @@ declare module 'stripe' { * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; + + /** + * This field was released by mistake and will be removed in the next major version + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + } + + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; } interface Cashapp { @@ -4051,6 +4060,15 @@ declare module 'stripe' { * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; + + /** + * This field was released by mistake and will be removed in the next major version + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + } + + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; } interface Cashapp { @@ -6795,6 +6813,15 @@ declare module 'stripe' { * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; + + /** + * This field was released by mistake and will be removed in the next major version + */ + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + } + + namespace CardPresent { + type RequestIncrementalAuthorization = 'if_available' | 'never'; } interface Cashapp { From 0e1ea9f7c1921d1abe4c0e9e1b6cafa70c4b7633 Mon Sep 17 00:00:00 2001 From: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:56:51 -0700 Subject: [PATCH 05/23] Do not require passing apiVersion (#1940) --- README.md | 14 +++++++------- examples/webhook-signing/express/main.ts | 4 +--- examples/webhook-signing/koa/main.ts | 4 +--- examples/webhook-signing/nestjs/app.controller.ts | 1 - .../webhook-signing/nextjs/pages/api/webhooks.ts | 4 +--- examples/webhook-signing/test/main.ts | 4 +--- scripts/updateAPIVersion.js | 4 ---- testProjects/cloudflare-pages/functions/index.js | 1 - types/index.d.ts | 2 +- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 1 - 11 files changed, 13 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 5a43024341..f544382e2b 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,7 @@ and instantiate it as `new Stripe()` with the latest API version. ```ts import Stripe from 'stripe'; -const stripe = new Stripe('sk_test_...', { - apiVersion: '2023-10-16', -}); +const stripe = new Stripe('sk_test_...'); const createCustomer = async () => { const params: Stripe.CustomerCreateParams = { @@ -158,11 +156,13 @@ stripe.customers }); }); ``` + ### Usage with Deno As of 11.16.0, stripe-node provides a `deno` export target. In your Deno project, import stripe-node using an npm specifier: Import using npm specifiers: + ```js import Stripe from 'npm:stripe'; ``` @@ -179,7 +179,6 @@ The package can be initialized with several options: import ProxyAgent from 'https-proxy-agent'; const stripe = Stripe('sk_test_...', { - apiVersion: '2019-08-08', maxNetworkRetries: 1, httpAgent: new ProxyAgent(process.env.http_proxy), timeout: 1000, @@ -265,8 +264,8 @@ As of [v13](https://github.com/stripe/stripe-node/releases/tag/v13.0.0) stripe-n const stripe = Stripe('sk_test_...', { maxNetworkRetries: 0, // Disable retries }); - ``` + ```js const stripe = Stripe('sk_test_...', { maxNetworkRetries: 2, // Retry a request twice before giving up @@ -394,7 +393,7 @@ const stripe = require('stripe')('sk_test_...', { name: 'MyAwesomePlugin', version: '1.2.34', // Optional url: 'https://myawesomeplugin.info', // Optional - } + }, }); ``` @@ -406,7 +405,7 @@ const stripe = new Stripe(apiKey, { name: 'MyAwesomePlugin', version: '1.2.34', // Optional url: 'https://myawesomeplugin.info', // Optional - } + }, }); ``` @@ -496,6 +495,7 @@ const stripe = new Stripe('sk_test_...', { Stripe has features in the beta phase that can be accessed via the beta version of this package. We would love for you to try these and share feedback with us before these features reach the stable phase. The beta versions can be installed in one of two ways + - To install the latest beta version, run the command `npm install stripe@beta --save` - To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install stripe@1.2.3-beta.1 --save` diff --git a/examples/webhook-signing/express/main.ts b/examples/webhook-signing/express/main.ts index d5bdb83993..80eab3520d 100755 --- a/examples/webhook-signing/express/main.ts +++ b/examples/webhook-signing/express/main.ts @@ -7,9 +7,7 @@ import {AddressInfo} from 'net'; env.config(); -const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { - apiVersion: '2023-08-16', -}); +const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); const webhookSecret: string = process.env.STRIPE_WEBHOOK_SECRET; diff --git a/examples/webhook-signing/koa/main.ts b/examples/webhook-signing/koa/main.ts index 8768a1248b..b7785e65d4 100755 --- a/examples/webhook-signing/koa/main.ts +++ b/examples/webhook-signing/koa/main.ts @@ -11,9 +11,7 @@ const app = new Koa(); env.config(); const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET; -const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { - apiVersion: '2023-08-16', -}); +const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); const handleWebhook = async (ctx: Koa.ParameterizedContext, next: Koa.Next) => { const sig = ctx.request.headers['stripe-signature']; diff --git a/examples/webhook-signing/nestjs/app.controller.ts b/examples/webhook-signing/nestjs/app.controller.ts index 43e974b4f3..2868afb5c3 100644 --- a/examples/webhook-signing/nestjs/app.controller.ts +++ b/examples/webhook-signing/nestjs/app.controller.ts @@ -20,7 +20,6 @@ export class AppController { private readonly client: Stripe; constructor(@Inject(ConfigService) private readonly config: ConfigService) { this.client = new Stripe(this.config.get('Stripe.secret_key'), { - apiVersion: '2022-11-15', typescript: true, }); } diff --git a/examples/webhook-signing/nextjs/pages/api/webhooks.ts b/examples/webhook-signing/nextjs/pages/api/webhooks.ts index f287872f41..4c95f9d2c8 100644 --- a/examples/webhook-signing/nextjs/pages/api/webhooks.ts +++ b/examples/webhook-signing/nextjs/pages/api/webhooks.ts @@ -5,9 +5,7 @@ const handler = async ( req: NextApiRequest, res: NextApiResponse ): Promise => { - const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { - apiVersion: '2023-08-16', - }); + const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); const webhookSecret: string = process.env.STRIPE_WEBHOOK_SECRET; diff --git a/examples/webhook-signing/test/main.ts b/examples/webhook-signing/test/main.ts index e4d3eb949f..d0ecb30d8a 100755 --- a/examples/webhook-signing/test/main.ts +++ b/examples/webhook-signing/test/main.ts @@ -41,9 +41,7 @@ env.config({ }); const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET; -const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { - apiVersion: '2023-08-16', -}); +const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); const payload = Buffer.from( JSON.stringify( diff --git a/scripts/updateAPIVersion.js b/scripts/updateAPIVersion.js index ffcae46988..f70683852e 100755 --- a/scripts/updateAPIVersion.js +++ b/scripts/updateAPIVersion.js @@ -51,10 +51,6 @@ const main = () => { 'types/test/typescriptTest.ts', 'apiVersion: [\'"]API_VERSION[\'"]' ); - replaceAPIVersion( - 'testProjects/mjs-ts/index.ts', - 'apiVersion: [\'"]API_VERSION[\'"]' - ); }; if (require.main === module) { diff --git a/testProjects/cloudflare-pages/functions/index.js b/testProjects/cloudflare-pages/functions/index.js index f468b35a40..a2dc9d2605 100644 --- a/testProjects/cloudflare-pages/functions/index.js +++ b/testProjects/cloudflare-pages/functions/index.js @@ -5,7 +5,6 @@ export async function onRequestPost({env, request}) { const body = await request.text(); const stripe = new Stripe(env.STRIPE_API_KEY, { - apiVersion: '2023-08-16', httpClient: Stripe.createFetchHttpClient(), }); const webCrypto = Stripe.createSubtleCryptoProvider(); diff --git a/types/index.d.ts b/types/index.d.ts index 0babf7ccc5..9df785c1c9 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -231,7 +231,7 @@ declare module 'stripe' { export class Stripe { static Stripe: typeof Stripe; - constructor(apiKey: string, config: Stripe.StripeConfig); + constructor(apiKey: string, config?: Stripe.StripeConfig); StripeResource: Stripe.StripeResource; diff --git a/types/lib.d.ts b/types/lib.d.ts index 63985f2f00..96a9849f2a 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -44,7 +44,7 @@ declare module 'stripe' { * * @docs https://stripe.com/docs/api/versioning */ - apiVersion: LatestApiVersion; + apiVersion?: LatestApiVersion; /** * Optionally indicate that you are using TypeScript. diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index 8ad69529ec..91ed921df1 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -12,7 +12,6 @@ let stripe = new Stripe('sk_test_123', { apiVersion: '2023-10-16', }); -// @ts-ignore lazily ignore apiVersion requirement. stripe = new Stripe('sk_test_123'); stripe = new Stripe('sk_test_123', { From a51038a1f1e28470899d9e7e716e159e9e51f31e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:08:57 +0000 Subject: [PATCH 06/23] Update generated code for v609 --- OPENAPI_VERSION | 2 +- types/PaymentLinks.d.ts | 76 ++++++++++++++++ types/PaymentLinksResource.d.ts | 152 ++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4d2b499697..7cf2e9487a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v608 \ No newline at end of file +v609 \ No newline at end of file diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 05ec89bf29..5b63c3c3f1 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -190,6 +190,29 @@ declare module 'stripe' { * If `true`, tax will be calculated automatically using the customer's location. */ enabled: boolean; + + /** + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + */ + liability?: AutomaticTax.Liability | null; + } + + namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string | Stripe.Account; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingAddressCollection = 'auto' | 'required'; @@ -376,6 +399,11 @@ declare module 'stripe' { */ footer: string | null; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceData.Issuer | null; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -400,6 +428,22 @@ declare module 'stripe' { value: string; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string | Stripe.Account; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. @@ -749,6 +793,11 @@ declare module 'stripe' { */ description: string | null; + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionData.InvoiceSettings | null; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. */ @@ -760,6 +809,33 @@ declare module 'stripe' { trial_period_days: number | null; } + namespace SubscriptionData { + interface InvoiceSettings { + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceSettings.Issuer | null; + } + + namespace InvoiceSettings { + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string | Stripe.Account; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + } + } + interface TaxIdCollection { /** * Indicates whether tax ID collection is enabled for the session. diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 32532153e3..051a0b8444 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -181,6 +181,29 @@ declare module 'stripe' { * If `true`, tax will be calculated automatically using the customer's location. */ enabled: boolean; + + /** + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + */ + liability?: AutomaticTax.Liability; + } + + namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingAddressCollection = 'auto' | 'required'; @@ -382,6 +405,11 @@ declare module 'stripe' { */ footer?: string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceData.Issuer; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -406,6 +434,22 @@ declare module 'stripe' { value: string; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. @@ -803,6 +847,11 @@ declare module 'stripe' { */ description?: string; + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionData.InvoiceSettings; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. */ @@ -814,6 +863,33 @@ declare module 'stripe' { trial_period_days?: number; } + namespace SubscriptionData { + interface InvoiceSettings { + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceSettings.Issuer; + } + + namespace InvoiceSettings { + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + } + } + interface TaxIdCollection { /** * Set to `true` to enable tax ID collection. @@ -982,6 +1058,29 @@ declare module 'stripe' { * If `true`, tax will be calculated automatically using the customer's location. */ enabled: boolean; + + /** + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + */ + liability?: AutomaticTax.Liability; + } + + namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingAddressCollection = 'auto' | 'required'; @@ -1162,6 +1261,11 @@ declare module 'stripe' { */ footer?: string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceData.Issuer; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -1186,6 +1290,22 @@ declare module 'stripe' { value: string; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. @@ -1536,11 +1656,43 @@ declare module 'stripe' { } interface SubscriptionData { + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionData.InvoiceSettings; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. */ metadata?: Stripe.Emptyable; } + + namespace SubscriptionData { + interface InvoiceSettings { + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceSettings.Issuer; + } + + namespace InvoiceSettings { + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account?: string; + + /** + * Type of the account referenced in the request. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + } + } } interface PaymentLinkListParams extends PaginationParams { From e3df61be4b671f32ae7367a0e182dac9010b8ecf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:50:58 +0000 Subject: [PATCH 07/23] Update generated code for v610 --- OPENAPI_VERSION | 2 +- types/Issuing/PersonalizationDesigns.d.ts | 6 +++--- types/Issuing/PersonalizationDesignsResource.d.ts | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7cf2e9487a..f0b8ec7f88 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v609 \ No newline at end of file +v610 \ No newline at end of file diff --git a/types/Issuing/PersonalizationDesigns.d.ts b/types/Issuing/PersonalizationDesigns.d.ts index a31023823a..2d0d2c5940 100644 --- a/types/Issuing/PersonalizationDesigns.d.ts +++ b/types/Issuing/PersonalizationDesigns.d.ts @@ -84,12 +84,12 @@ declare module 'stripe' { /** * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. */ - account_default: boolean; + is_default: boolean; /** - * Whether this personalization design is used to create cards when one is not specified and an account default for this connected account does not exist. + * Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. */ - platform_default: boolean | null; + is_platform_default: boolean | null; } interface RejectionReasons { diff --git a/types/Issuing/PersonalizationDesignsResource.d.ts b/types/Issuing/PersonalizationDesignsResource.d.ts index 11e3c516ba..2fd141bbd0 100644 --- a/types/Issuing/PersonalizationDesignsResource.d.ts +++ b/types/Issuing/PersonalizationDesignsResource.d.ts @@ -75,9 +75,9 @@ declare module 'stripe' { interface Preferences { /** - * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. + * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as default. */ - account_default: boolean; + is_default: boolean; } } @@ -162,9 +162,9 @@ declare module 'stripe' { interface Preferences { /** - * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. + * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as default. */ - account_default: boolean; + is_default: boolean; } } @@ -193,14 +193,14 @@ declare module 'stripe' { namespace PersonalizationDesignListParams { interface Preferences { /** - * Only return the personalization design that is set as the account default. A connected account will use the Connect platform's default if no personalization design is set as the account default. + * Only return the personalization design that is set as default. A connected account will use the Connect platform's default if no personalization design is set as default. */ - account_default?: boolean; + is_default?: boolean; /** * Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. */ - platform_default?: boolean; + is_platform_default?: boolean; } type Status = 'active' | 'inactive' | 'rejected' | 'review'; From 3fac5bef75765e115682f3b81901c56e132f5d57 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:48:36 +0000 Subject: [PATCH 08/23] Update generated code for v611 --- OPENAPI_VERSION | 2 +- types/Quotes.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f0b8ec7f88..6e762b046d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v610 \ No newline at end of file +v611 \ No newline at end of file diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 58f8ec0f30..ad8bd19753 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -645,6 +645,7 @@ declare module 'stripe' { } type Type = + | 'accept_failed_validations' | 'bill_on_acceptance_invalid' | 'line_invalid' | 'marked_stale' From b836dfc9bdf3a0b7f4d78c313ed761dea07f25eb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:32:44 +0000 Subject: [PATCH 09/23] Update generated code for v612 --- OPENAPI_VERSION | 2 +- types/Tax/RegistrationsResource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6e762b046d..ec91a641c7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v611 \ No newline at end of file +v612 \ No newline at end of file diff --git a/types/Tax/RegistrationsResource.d.ts b/types/Tax/RegistrationsResource.d.ts index 6fcd1268f1..2ebfae0feb 100644 --- a/types/Tax/RegistrationsResource.d.ts +++ b/types/Tax/RegistrationsResource.d.ts @@ -5,7 +5,7 @@ declare module 'stripe' { namespace Tax { interface RegistrationCreateParams { /** - * Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + * Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. */ active_from: number | 'now'; From eca01323029a37e3c651423b4a8fe21be47b0cf1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 21:37:16 +0000 Subject: [PATCH 10/23] Update generated code for v614 --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ec91a641c7..99af071878 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v612 \ No newline at end of file +v614 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index 1cb975daf4..6d235c2c81 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -743,7 +743,7 @@ declare module 'stripe' { currently_due: Array | null; /** - * This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. + * This is typed as a string for consistency with `requirements.disabled_reason`. */ disabled_reason: string | null; From d9401bfc9eb13dac3d72d8d6e96602d0cf40b4c9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 16:35:08 +0000 Subject: [PATCH 11/23] Update generated code for v616 --- OPENAPI_VERSION | 2 +- types/Issuing/CreditUnderwritingRecords.d.ts | 10 ---------- .../CreditUnderwritingRecordsResource.d.ts | 20 ------------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 99af071878..4541c2cbd4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v614 \ No newline at end of file +v616 \ No newline at end of file diff --git a/types/Issuing/CreditUnderwritingRecords.d.ts b/types/Issuing/CreditUnderwritingRecords.d.ts index 01391f17f4..3a616caab7 100644 --- a/types/Issuing/CreditUnderwritingRecords.d.ts +++ b/types/Issuing/CreditUnderwritingRecords.d.ts @@ -151,40 +151,31 @@ declare module 'stripe' { | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' - | 'change_in_financial_state' - | 'change_in_utilization_of_credit_line' | 'customer_already_exists' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' - | 'decrease_in_income_to_expense_ratio' - | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' | 'duration_of_residence' - | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' | 'foreclosure_or_repossession' | 'frozen_file_at_credit_bureau' | 'garnishment_or_attachment' | 'government_loan_program_criteria' - | 'has_recent_credit_limit_increase' | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' - | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' | 'insufficient_collateral' | 'insufficient_credit_experience' - | 'insufficient_credit_utilization' | 'insufficient_deposits' | 'insufficient_income' | 'insufficient_period_in_operation' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' - | 'insufficient_usage_as_qualified_expenses' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -192,7 +183,6 @@ declare module 'stripe' { | 'other' | 'outside_supported_country' | 'outside_supported_state' - | 'poor_payment_history_with_platform' | 'prior_or_current_legal_action' | 'prohibited_industry' | 'rate_of_cash_balance_fluctuation_too_high' diff --git a/types/Issuing/CreditUnderwritingRecordsResource.d.ts b/types/Issuing/CreditUnderwritingRecordsResource.d.ts index 647e55cf3b..34027f8272 100644 --- a/types/Issuing/CreditUnderwritingRecordsResource.d.ts +++ b/types/Issuing/CreditUnderwritingRecordsResource.d.ts @@ -136,40 +136,31 @@ declare module 'stripe' { | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' - | 'change_in_financial_state' - | 'change_in_utilization_of_credit_line' | 'customer_already_exists' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' - | 'decrease_in_income_to_expense_ratio' - | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' | 'duration_of_residence' - | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' | 'foreclosure_or_repossession' | 'frozen_file_at_credit_bureau' | 'garnishment_or_attachment' | 'government_loan_program_criteria' - | 'has_recent_credit_limit_increase' | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' - | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' | 'insufficient_collateral' | 'insufficient_credit_experience' - | 'insufficient_credit_utilization' | 'insufficient_deposits' | 'insufficient_income' | 'insufficient_period_in_operation' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' - | 'insufficient_usage_as_qualified_expenses' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -177,7 +168,6 @@ declare module 'stripe' { | 'other' | 'outside_supported_country' | 'outside_supported_state' - | 'poor_payment_history_with_platform' | 'prior_or_current_legal_action' | 'prohibited_industry' | 'rate_of_cash_balance_fluctuation_too_high' @@ -798,40 +788,31 @@ declare module 'stripe' { | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' - | 'change_in_financial_state' - | 'change_in_utilization_of_credit_line' | 'customer_already_exists' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' - | 'decrease_in_income_to_expense_ratio' - | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' | 'duration_of_residence' - | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' | 'foreclosure_or_repossession' | 'frozen_file_at_credit_bureau' | 'garnishment_or_attachment' | 'government_loan_program_criteria' - | 'has_recent_credit_limit_increase' | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' - | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' | 'insufficient_collateral' | 'insufficient_credit_experience' - | 'insufficient_credit_utilization' | 'insufficient_deposits' | 'insufficient_income' | 'insufficient_period_in_operation' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' - | 'insufficient_usage_as_qualified_expenses' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -839,7 +820,6 @@ declare module 'stripe' { | 'other' | 'outside_supported_country' | 'outside_supported_state' - | 'poor_payment_history_with_platform' | 'prior_or_current_legal_action' | 'prohibited_industry' | 'rate_of_cash_balance_fluctuation_too_high' From ed7a3fdc21a5d91953733a54e476619ac0061b03 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:43:21 +0000 Subject: [PATCH 12/23] Update generated code for v617 --- OPENAPI_VERSION | 2 +- types/PaymentLinks.d.ts | 2 +- types/PaymentLinksResource.d.ts | 2 +- types/QuotePreviewSubscriptionSchedules.d.ts | 4 ++-- types/Quotes.d.ts | 4 ++-- types/QuotesResource.d.ts | 8 ++++---- types/SubscriptionSchedules.d.ts | 4 ++-- types/SubscriptionSchedulesResource.d.ts | 8 ++++---- types/Subscriptions.d.ts | 2 +- types/SubscriptionsResource.d.ts | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4541c2cbd4..e852fd7ad8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v616 \ No newline at end of file +v617 \ No newline at end of file diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 5b63c3c3f1..68358d93c1 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -789,7 +789,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 051a0b8444..9810302d62 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -843,7 +843,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; diff --git a/types/QuotePreviewSubscriptionSchedules.d.ts b/types/QuotePreviewSubscriptionSchedules.d.ts index b443e7472a..60f5ae78f3 100644 --- a/types/QuotePreviewSubscriptionSchedules.d.ts +++ b/types/QuotePreviewSubscriptionSchedules.d.ts @@ -175,7 +175,7 @@ declare module 'stripe' { default_payment_method: string | Stripe.PaymentMethod | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; @@ -336,7 +336,7 @@ declare module 'stripe' { default_tax_rates?: Array | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index ad8bd19753..26a20f0962 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -693,7 +693,7 @@ declare module 'stripe' { billing_cycle_anchor?: 'reset' | null; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; @@ -878,7 +878,7 @@ declare module 'stripe' { customer: string | null; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index 854fe99887..9e8ad663aa 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -1250,7 +1250,7 @@ declare module 'stripe' { billing_cycle_anchor?: Stripe.Emptyable<'reset'>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; @@ -1447,7 +1447,7 @@ declare module 'stripe' { customer?: string; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; @@ -2879,7 +2879,7 @@ declare module 'stripe' { billing_cycle_anchor?: Stripe.Emptyable<'reset'>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -3068,7 +3068,7 @@ declare module 'stripe' { customer?: string; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; diff --git a/types/SubscriptionSchedules.d.ts b/types/SubscriptionSchedules.d.ts index f4ff64f8b5..84ddd5303a 100644 --- a/types/SubscriptionSchedules.d.ts +++ b/types/SubscriptionSchedules.d.ts @@ -154,7 +154,7 @@ declare module 'stripe' { default_payment_method: string | Stripe.PaymentMethod | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; @@ -315,7 +315,7 @@ declare module 'stripe' { default_tax_rates?: Array | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/SubscriptionSchedulesResource.d.ts b/types/SubscriptionSchedulesResource.d.ts index 247b80b9d9..37f397e523 100644 --- a/types/SubscriptionSchedulesResource.d.ts +++ b/types/SubscriptionSchedulesResource.d.ts @@ -91,7 +91,7 @@ declare module 'stripe' { default_payment_method?: string; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -255,7 +255,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -913,7 +913,7 @@ declare module 'stripe' { default_payment_method?: string; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -1077,7 +1077,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 206e8c0f41..2926d80c3f 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -115,7 +115,7 @@ declare module 'stripe' { default_tax_rates?: Array | null; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index c39d724773..27f83d34fa 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -86,7 +86,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; @@ -1028,7 +1028,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; From 20d56755562280bd59907deb9f3e22529ad07bba Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 18:09:20 +0000 Subject: [PATCH 13/23] Update generated code for v618 --- OPENAPI_VERSION | 2 +- src/resources.ts | 1 + src/resources/Margins.ts | 20 ++++++ types/InvoiceItems.d.ts | 5 ++ types/InvoiceItemsResource.d.ts | 10 +++ types/InvoiceLineItems.d.ts | 22 ++++++ types/Invoices.d.ts | 22 ++++++ types/InvoicesResource.d.ts | 10 +++ types/Margins.d.ts | 56 ++++++++++++++++ types/MarginsResource.d.ts | 114 ++++++++++++++++++++++++++++++++ types/QuotePreviewInvoices.d.ts | 24 +++++++ types/index.d.ts | 3 + 12 files changed, 288 insertions(+), 1 deletion(-) create mode 100644 src/resources/Margins.ts create mode 100644 types/Margins.d.ts create mode 100644 types/MarginsResource.d.ts diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e852fd7ad8..1e4c4d357f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v617 \ No newline at end of file +v618 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index fb32726fd9..a098488912 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -87,6 +87,7 @@ export {Files} from './resources/Files.js'; export {InvoiceItems} from './resources/InvoiceItems.js'; export {Invoices} from './resources/Invoices.js'; export {Mandates} from './resources/Mandates.js'; +export {Margins} from './resources/Margins.js'; export {OAuth} from './resources/OAuth.js'; export {Orders} from './resources/Orders.js'; export {PaymentIntents} from './resources/PaymentIntents.js'; diff --git a/src/resources/Margins.ts b/src/resources/Margins.ts new file mode 100644 index 0000000000..046d2d48a0 --- /dev/null +++ b/src/resources/Margins.ts @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const Margins = StripeResource.extend({ + create: stripeMethod({method: 'POST', fullPath: '/v1/billing/margins'}), + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/billing/margins/{margin}', + }), + update: stripeMethod({ + method: 'POST', + fullPath: '/v1/billing/margins/{margin}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/billing/margins', + methodType: 'list', + }), +}); diff --git a/types/InvoiceItems.d.ts b/types/InvoiceItems.d.ts index a9479a8ff3..d64f84f12f 100644 --- a/types/InvoiceItems.d.ts +++ b/types/InvoiceItems.d.ts @@ -96,6 +96,11 @@ declare module 'stripe' { */ livemode: boolean; + /** + * The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + */ + margins?: Array | null; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ diff --git a/types/InvoiceItemsResource.d.ts b/types/InvoiceItemsResource.d.ts index 5ff6aa0b00..0d12bf0fef 100644 --- a/types/InvoiceItemsResource.d.ts +++ b/types/InvoiceItemsResource.d.ts @@ -43,6 +43,11 @@ declare module 'stripe' { */ invoice?: string; + /** + * The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + */ + margins?: Array; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -235,6 +240,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + */ + margins?: Stripe.Emptyable>; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ diff --git a/types/InvoiceLineItems.d.ts b/types/InvoiceLineItems.d.ts index c855408511..4bef7844b0 100644 --- a/types/InvoiceLineItems.d.ts +++ b/types/InvoiceLineItems.d.ts @@ -61,6 +61,16 @@ declare module 'stripe' { */ livemode: boolean; + /** + * The amount of margin calculated per margin for this line item. + */ + margin_amounts?: Array | null; + + /** + * The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. + */ + margins?: Array | null; + /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. */ @@ -137,6 +147,18 @@ declare module 'stripe' { discount: string | Stripe.Discount | Stripe.DeletedDiscount; } + interface MarginAmount { + /** + * The amount, in cents (or local equivalent), of the reduction in line item amount. + */ + amount: number; + + /** + * The margin that was applied to get this margin amount. + */ + margin: string | Stripe.Margin; + } + interface Period { /** * The end of the period, which must be greater than or equal to the start. This value is inclusive. diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index ab674c51b6..2686aadea6 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -213,6 +213,11 @@ declare module 'stripe' { */ customer_tax_ids?: Array | null; + /** + * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + */ + default_margins?: Array | null; + /** * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -466,6 +471,11 @@ declare module 'stripe' { */ total_excluding_tax: number | null; + /** + * The aggregate amounts calculated per margin across all line items. + */ + total_margin_amounts?: Array | null; + /** * The aggregate amounts calculated per tax rate for all line items. */ @@ -1379,6 +1389,18 @@ declare module 'stripe' { discount: string | Stripe.Discount | Stripe.DeletedDiscount; } + interface TotalMarginAmount { + /** + * The amount, in cents (or local equivalent), of the reduction in line item amount. + */ + amount: number; + + /** + * The margin that was applied to get this margin amount. + */ + margin: string | Stripe.Margin; + } + interface TotalTaxAmount { /** * The amount, in cents (or local equivalent), of the tax. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 2b4ae4c224..c14aabf260 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -48,6 +48,11 @@ declare module 'stripe' { */ days_until_due?: number; + /** + * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + */ + default_margins?: Array; + /** * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -801,6 +806,11 @@ declare module 'stripe' { */ days_until_due?: number; + /** + * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + */ + default_margins?: Stripe.Emptyable>; + /** * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ diff --git a/types/Margins.d.ts b/types/Margins.d.ts new file mode 100644 index 0000000000..deb8ef1eb7 --- /dev/null +++ b/types/Margins.d.ts @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + /** + * A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who + * resell products and services and earn a discount (margin) for doing so. + */ + interface Margin { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'margin'; + + /** + * Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + */ + active: boolean; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: Stripe.Metadata | null; + + /** + * Name of the margin that's displayed on, for example, invoices. + */ + name: string | null; + + /** + * Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + */ + percent_off: number; + + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number; + } + } +} diff --git a/types/MarginsResource.d.ts b/types/MarginsResource.d.ts new file mode 100644 index 0000000000..9b01c1056b --- /dev/null +++ b/types/MarginsResource.d.ts @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + interface MarginCreateParams { + /** + * Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + */ + percent_off: number; + + /** + * Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + */ + active?: boolean; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * Name of the margin, which is displayed to customers, such as on invoices. + */ + name?: string; + } + + interface MarginRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface MarginUpdateParams { + /** + * Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + */ + active?: boolean; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * Name of the margin, which is displayed to customers, such as on invoices. + */ + name?: string; + } + + interface MarginListParams extends PaginationParams { + /** + * Only return margins that are active or inactive, i.e., pass false to list all inactive margins. + */ + active?: boolean; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class MarginsResource { + /** + * Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + */ + create( + params: MarginCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a margin object with the given ID. + */ + retrieve( + id: string, + params?: MarginRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Update the specified margin object. Certain fields of the margin object are not editable. + */ + update( + id: string, + params?: MarginUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of your margins. + */ + list( + params?: MarginListParams, + options?: RequestOptions + ): ApiListPromise; + list(options?: RequestOptions): ApiListPromise; + } + } +} diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index 67188a52e6..e19780a1bc 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -180,6 +180,11 @@ declare module 'stripe' { */ customer_tax_ids?: Array | null; + /** + * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + */ + default_margins?: Array | null; + /** * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -420,6 +425,13 @@ declare module 'stripe' { */ total_excluding_tax: number | null; + /** + * The aggregate amounts calculated per margin across all line items. + */ + total_margin_amounts?: Array< + QuotePreviewInvoice.TotalMarginAmount + > | null; + /** * The aggregate amounts calculated per tax rate for all line items. */ @@ -1354,6 +1366,18 @@ declare module 'stripe' { discount: string | Stripe.Discount | Stripe.DeletedDiscount; } + interface TotalMarginAmount { + /** + * The amount, in cents (or local equivalent), of the reduction in line item amount. + */ + amount: number; + + /** + * The margin that was applied to get this margin amount. + */ + margin: string | Stripe.Margin; + } + interface TotalTaxAmount { /** * The amount, in cents (or local equivalent), of the tax. diff --git a/types/index.d.ts b/types/index.d.ts index d4202a1636..1f614f8b5a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -55,6 +55,7 @@ /// /// /// +/// /// /// /// @@ -189,6 +190,7 @@ /// /// /// +/// /// /// /// @@ -297,6 +299,7 @@ declare module 'stripe' { invoiceItems: Stripe.InvoiceItemsResource; invoices: Stripe.InvoicesResource; mandates: Stripe.MandatesResource; + margins: Stripe.MarginsResource; orders: Stripe.OrdersResource; paymentIntents: Stripe.PaymentIntentsResource; paymentLinks: Stripe.PaymentLinksResource; From 9ac17a43c788f6836d06ce81602d9b1d92a8d8ff Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 18:22:19 +0000 Subject: [PATCH 14/23] Update generated code for v619 --- OPENAPI_VERSION | 2 +- types/Quotes.d.ts | 3 +++ types/QuotesResource.d.ts | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1e4c4d357f..48d4bd41c7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v618 \ No newline at end of file +v619 \ No newline at end of file diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 26a20f0962..fc4137d272 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -169,6 +169,9 @@ declare module 'stripe' { subscription_data: Quote.SubscriptionData; + /** + * List representing overrides for `subscription_data` configurations for specific subscription schedules. + */ subscription_data_overrides?: Array< Quote.SubscriptionDataOverride > | null; diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index 9e8ad663aa..c6e6d4bf21 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -109,7 +109,7 @@ declare module 'stripe' { subscription_data?: QuoteCreateParams.SubscriptionData; /** - * List representing overrides for `subscription_data` configurations for specific groups. + * List representing overrides for `subscription_data` configurations for specific subscription schedules. */ subscription_data_overrides?: Array< QuoteCreateParams.SubscriptionDataOverride @@ -1738,7 +1738,7 @@ declare module 'stripe' { subscription_data?: QuoteUpdateParams.SubscriptionData; /** - * List representing overrides for `subscription_data` configurations for specific groups. + * List representing overrides for `subscription_data` configurations for specific subscription schedules. */ subscription_data_overrides?: Stripe.Emptyable< Array From ce654c70e3f278e1c51f4b744e3dc7ea22c663b0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:05:59 +0000 Subject: [PATCH 15/23] Update generated code for v620 --- OPENAPI_VERSION | 2 +- types/Issuing/Cardholders.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 48d4bd41c7..4486b6ac90 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v619 \ No newline at end of file +v620 \ No newline at end of file diff --git a/types/Issuing/Cardholders.d.ts b/types/Issuing/Cardholders.d.ts index 731f3615a8..c07224f706 100644 --- a/types/Issuing/Cardholders.d.ts +++ b/types/Issuing/Cardholders.d.ts @@ -101,7 +101,7 @@ declare module 'stripe' { /** * Information related to the card_issuing program for this cardholder. */ - card_issuing: Individual.CardIssuing | null; + card_issuing?: Individual.CardIssuing | null; /** * The date of birth of this cardholder. From 53bc3817fae67fb6708219fae6f92e08764d2544 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:46:13 +0000 Subject: [PATCH 16/23] Update generated code for v620 --- src/apiVersion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 489f7afb36..fce43864e5 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec export const ApiVersion = '2023-10-16'; -export const PreviewVersion = '2023-09-15.preview-v2'; +export const PreviewVersion = '2023-10-25.preview-v2'; From 2ffc6154bcc25dc996236f5322f70d4814257c37 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 19:23:05 +0000 Subject: [PATCH 17/23] Update generated code for v621 --- OPENAPI_VERSION | 2 +- types/PaymentIntentsResource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4486b6ac90..1ddbd687f9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v620 \ No newline at end of file +v621 \ No newline at end of file diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 5cb94563ef..aab235b167 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -170,7 +170,7 @@ declare module 'stripe' { statement_descriptor_suffix?: string; /** - * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * The parameters that you can use to automatically create a Transfer. * Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentCreateParams.TransferData; From 179e67d5b1c04ba7b4bb2ddb53068b52753a7624 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 19:41:08 +0000 Subject: [PATCH 18/23] Update generated code for v623 --- OPENAPI_VERSION | 2 +- types/Invoices.d.ts | 1 + types/Issuing/CreditUnderwritingRecords.d.ts | 4 ++-- types/Issuing/CreditUnderwritingRecordsResource.d.ts | 8 ++++---- types/PaymentIntents.d.ts | 1 + types/QuotePreviewInvoices.d.ts | 1 + types/SetupAttempts.d.ts | 1 + types/SetupIntents.d.ts | 1 + 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1ddbd687f9..0e0942b4f8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v621 \ No newline at end of file +v623 \ No newline at end of file diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 2686aadea6..ddd3731cf8 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -806,6 +806,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/Issuing/CreditUnderwritingRecords.d.ts b/types/Issuing/CreditUnderwritingRecords.d.ts index 3a616caab7..a9816a8192 100644 --- a/types/Issuing/CreditUnderwritingRecords.d.ts +++ b/types/Issuing/CreditUnderwritingRecords.d.ts @@ -4,9 +4,9 @@ declare module 'stripe' { namespace Stripe { namespace Issuing { /** - * Every time an applicant submits an application for a Charge Card product your Platform offers, or every time your Platform takes a proactive credit decision on an existing account, you must record the decision by creating a new CreditUnderwritingRecord object on a Connected account. + * Every time an applicant submits an application for a Charge Card product your platform offers, or every time your platform takes a proactive credit decision on an existing account, you must record the decision by creating a new `CreditUnderwritingRecord` object on a connected account. * - * [Follow the guide](https://stripe.com/docs/issuing/coming_soon) to learn about your requirements as a Platform. + * [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. */ interface CreditUnderwritingRecord { /** diff --git a/types/Issuing/CreditUnderwritingRecordsResource.d.ts b/types/Issuing/CreditUnderwritingRecordsResource.d.ts index 34027f8272..9c7b30ed85 100644 --- a/types/Issuing/CreditUnderwritingRecordsResource.d.ts +++ b/types/Issuing/CreditUnderwritingRecordsResource.d.ts @@ -905,7 +905,7 @@ declare module 'stripe' { ): ApiListPromise; /** - * Update a CreditUnderwritingRecord object to correct mistakes + * Update a CreditUnderwritingRecord object to correct mistakes. */ correct( id: string, @@ -918,7 +918,7 @@ declare module 'stripe' { ): Promise>; /** - * Creates a CreditUnderwritingRecord object with information about a credit application submission + * Creates a CreditUnderwritingRecord object with information about a credit application submission. */ createFromApplication( params: CreditUnderwritingRecordCreateFromApplicationParams, @@ -926,7 +926,7 @@ declare module 'stripe' { ): Promise>; /** - * Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder + * Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder. */ createFromProactiveReview( params: CreditUnderwritingRecordCreateFromProactiveReviewParams, @@ -934,7 +934,7 @@ declare module 'stripe' { ): Promise>; /** - * Update a CreditUnderwritingRecord object from an decision made on a credit application + * Update a CreditUnderwritingRecord object from a decision made on a credit application. */ reportDecision( id: string, diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 024d51d54d..a73831b37c 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -393,6 +393,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index e19780a1bc..9a844e23a2 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -783,6 +783,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 6998640499..ba92a1a6fa 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -594,6 +594,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 6b141c1023..abdf55f8c0 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -302,6 +302,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' From 0acd940f847bdd50368efed815d5bbae1193f317 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:40:02 +0000 Subject: [PATCH 19/23] Update generated code for v625 --- OPENAPI_VERSION | 2 +- types/QuotePreviewSubscriptionSchedules.d.ts | 2 +- types/SubscriptionSchedules.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0e0942b4f8..1d2ef1a16b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v623 \ No newline at end of file +v625 \ No newline at end of file diff --git a/types/QuotePreviewSubscriptionSchedules.d.ts b/types/QuotePreviewSubscriptionSchedules.d.ts index 60f5ae78f3..634aacadb8 100644 --- a/types/QuotePreviewSubscriptionSchedules.d.ts +++ b/types/QuotePreviewSubscriptionSchedules.d.ts @@ -696,7 +696,7 @@ declare module 'stripe' { interface TrialSettings { /** - * Defines how the subscription should behaves when a trial ensd. + * Defines how the subscription should behave when a trial ends. */ end_behavior: TrialSettings.EndBehavior | null; } diff --git a/types/SubscriptionSchedules.d.ts b/types/SubscriptionSchedules.d.ts index 84ddd5303a..0e7041bcc2 100644 --- a/types/SubscriptionSchedules.d.ts +++ b/types/SubscriptionSchedules.d.ts @@ -675,7 +675,7 @@ declare module 'stripe' { interface TrialSettings { /** - * Defines how the subscription should behaves when a trial ensd. + * Defines how the subscription should behave when a trial ends. */ end_behavior: TrialSettings.EndBehavior | null; } From fc020fdfb0fc0759907707794316fbaf5e85c8d9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 15:55:16 +0000 Subject: [PATCH 20/23] Update generated code for v626 --- OPENAPI_VERSION | 2 +- types/Issuing/PersonalizationDesigns.d.ts | 4 ++-- types/Issuing/PersonalizationDesignsResource.d.ts | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1d2ef1a16b..67f4d1ebff 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v625 \ No newline at end of file +v626 \ No newline at end of file diff --git a/types/Issuing/PersonalizationDesigns.d.ts b/types/Issuing/PersonalizationDesigns.d.ts index 2d0d2c5940..ddcff5df67 100644 --- a/types/Issuing/PersonalizationDesigns.d.ts +++ b/types/Issuing/PersonalizationDesigns.d.ts @@ -18,7 +18,7 @@ declare module 'stripe' { object: 'issuing.personalization_design'; /** - * The file for the card logo, for use with physical bundles that support card logos. + * The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. */ card_logo: string | Stripe.File | null; @@ -82,7 +82,7 @@ declare module 'stripe' { interface Preferences { /** - * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. */ is_default: boolean; diff --git a/types/Issuing/PersonalizationDesignsResource.d.ts b/types/Issuing/PersonalizationDesignsResource.d.ts index 2fd141bbd0..f7dba27ebc 100644 --- a/types/Issuing/PersonalizationDesignsResource.d.ts +++ b/types/Issuing/PersonalizationDesignsResource.d.ts @@ -10,7 +10,7 @@ declare module 'stripe' { physical_bundle: string; /** - * The file for the card logo, for use with physical bundles that support card logos. Must have `purpose` value of `issuing_logo`. + * The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. */ card_logo?: string; @@ -75,7 +75,7 @@ declare module 'stripe' { interface Preferences { /** - * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as default. + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. */ is_default: boolean; } @@ -90,7 +90,7 @@ declare module 'stripe' { interface PersonalizationDesignUpdateParams { /** - * The file for the card logo, for use with physical bundles that support card logos. Must have `purpose` value of `issuing_logo`. + * The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. */ card_logo?: Stripe.Emptyable; @@ -162,7 +162,7 @@ declare module 'stripe' { interface Preferences { /** - * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as default. + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. */ is_default: boolean; } @@ -193,7 +193,7 @@ declare module 'stripe' { namespace PersonalizationDesignListParams { interface Preferences { /** - * Only return the personalization design that is set as default. A connected account will use the Connect platform's default if no personalization design is set as default. + * Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. */ is_default?: boolean; From 720465c9494826c77fbe5c9e3a6c8d0eb822a139 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:06:45 -0700 Subject: [PATCH 21/23] Update generated code (#1939) * Update generated code for v607 * Update generated code for v608 * Update generated code for v608 * Update generated code for v614 * Update generated code for v617 * Update generated code for v620 * Update generated code for v621 * Update generated code for v623 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 4 ++-- types/Invoices.d.ts | 1 + types/Issuing/Cardholders.d.ts | 2 +- types/PaymentIntents.d.ts | 1 + types/PaymentIntentsResource.d.ts | 26 ++++++++++++------------ types/PaymentLinks.d.ts | 2 +- types/PaymentLinksResource.d.ts | 2 +- types/Quotes.d.ts | 2 +- types/QuotesResource.d.ts | 4 ++-- types/SetupAttempts.d.ts | 1 + types/SetupIntents.d.ts | 1 + types/SubscriptionSchedules.d.ts | 4 ++-- types/SubscriptionSchedulesResource.d.ts | 8 ++++---- types/Subscriptions.d.ts | 2 +- types/SubscriptionsResource.d.ts | 4 ++-- 16 files changed, 35 insertions(+), 31 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fb1dec85b4..0e0942b4f8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v605 \ No newline at end of file +v623 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index 94df0339f5..eb30c05047 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -704,7 +704,7 @@ declare module 'stripe' { currently_due: Array | null; /** - * This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. + * This is typed as a string for consistency with `requirements.disabled_reason`. */ disabled_reason: string | null; @@ -868,7 +868,7 @@ declare module 'stripe' { currently_due: Array | null; /** - * If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. + * If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. */ disabled_reason: string | null; diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 763f3a38d2..4084ae1799 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -754,6 +754,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/Issuing/Cardholders.d.ts b/types/Issuing/Cardholders.d.ts index 731f3615a8..c07224f706 100644 --- a/types/Issuing/Cardholders.d.ts +++ b/types/Issuing/Cardholders.d.ts @@ -101,7 +101,7 @@ declare module 'stripe' { /** * Information related to the card_issuing program for this cardholder. */ - card_issuing: Individual.CardIssuing | null; + card_issuing?: Individual.CardIssuing | null; /** * The date of birth of this cardholder. diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 28c39ae276..28a251764b 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -386,6 +386,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index eb0569f951..e6168bbd93 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -153,7 +153,7 @@ declare module 'stripe' { statement_descriptor_suffix?: string; /** - * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * The parameters that you can use to automatically create a Transfer. * Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentCreateParams.TransferData; @@ -1385,14 +1385,14 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + request_incremental_authorization_support?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * This field was released by mistake and will be removed in the next major version */ - request_incremental_authorization_support?: boolean; + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; } namespace CardPresent { @@ -3355,14 +3355,14 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + request_incremental_authorization_support?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * This field was released by mistake and will be removed in the next major version */ - request_incremental_authorization_support?: boolean; + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; } namespace CardPresent { @@ -5463,14 +5463,14 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ - request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; + request_incremental_authorization_support?: boolean; /** - * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * This field was released by mistake and will be removed in the next major version */ - request_incremental_authorization_support?: boolean; + request_incremental_authorization?: CardPresent.RequestIncrementalAuthorization; } namespace CardPresent { diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 05ec89bf29..0687c7a97f 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -745,7 +745,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 32532153e3..7d01ad2fd5 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -799,7 +799,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 2bdaea14fb..a30ac82a77 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -477,7 +477,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index dce061cf63..6b27b97962 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -223,7 +223,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; @@ -467,7 +467,7 @@ declare module 'stripe' { interface SubscriptionData { /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index ca96310ffa..4803918e4a 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -594,6 +594,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 0c1ac28e55..cc5457787a 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -302,6 +302,7 @@ declare module 'stripe' { | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' + | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' diff --git a/types/SubscriptionSchedules.d.ts b/types/SubscriptionSchedules.d.ts index 3cc2412c23..1578acc68e 100644 --- a/types/SubscriptionSchedules.d.ts +++ b/types/SubscriptionSchedules.d.ts @@ -142,7 +142,7 @@ declare module 'stripe' { default_payment_method: string | Stripe.PaymentMethod | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; @@ -257,7 +257,7 @@ declare module 'stripe' { default_tax_rates?: Array | null; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/SubscriptionSchedulesResource.d.ts b/types/SubscriptionSchedulesResource.d.ts index d9365da30f..6d3202a717 100644 --- a/types/SubscriptionSchedulesResource.d.ts +++ b/types/SubscriptionSchedulesResource.d.ts @@ -79,7 +79,7 @@ declare module 'stripe' { default_payment_method?: string; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -197,7 +197,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -529,7 +529,7 @@ declare module 'stripe' { default_payment_method?: string; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; @@ -647,7 +647,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index f1de38e0a0..19ec206d01 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -115,7 +115,7 @@ declare module 'stripe' { default_tax_rates?: Array | null; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description: string | null; diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 6df1cf678d..72e86f3e53 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -86,7 +86,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: string; @@ -744,7 +744,7 @@ declare module 'stripe' { default_tax_rates?: Stripe.Emptyable>; /** - * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. */ description?: Stripe.Emptyable; From e2a2fb387049c70d25731efb7e10fa0288dc642f Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 26 Oct 2023 10:33:49 -0700 Subject: [PATCH 22/23] Bump version to 14.2.0 --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- package.json | 2 +- src/stripe.core.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8983f67742..1e34236953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 14.2.0 - 2023-10-26 +* [#1939](https://github.com/stripe/stripe-node/pull/1939) Update generated code + * Add support for new value `balance_invalid_parameter` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code` + * Change `Issuing.Cardholder.individual.card_issuing` to be optional +* [#1940](https://github.com/stripe/stripe-node/pull/1940) Do not require passing apiVersion + ## 14.1.0 - 2023-10-17 * [#1933](https://github.com/stripe/stripe-node/pull/1933) Update generated code * Add support for new value `invalid_dob_age_under_minimum` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `BankAccount.future_requirements.errors[].code`, and `BankAccount.requirements.errors[].code` diff --git a/VERSION b/VERSION index 7b3b6e02bb..07ea9fa438 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.1.0 +14.2.0 diff --git a/package.json b/package.json index 130a005ef2..94c7734958 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "14.1.0", + "version": "14.2.0", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 4f7e12462e..985029e733 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -49,7 +49,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '14.1.0'; + Stripe.PACKAGE_VERSION = '14.2.0'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', From eafe8baba1d6ce340997809c47da6a8d47ee64d6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:34:26 +0000 Subject: [PATCH 23/23] Update generated code for v627 --- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/FundingInstructions.d.ts | 62 ++++++++++++++++++- types/Issuing/CreditUnderwritingRecords.d.ts | 16 +++++ .../CreditUnderwritingRecordsResource.d.ts | 32 ++++++++++ types/PaymentIntents.d.ts | 62 ++++++++++++++++++- 6 files changed, 170 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 67f4d1ebff..477d817d45 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v626 \ No newline at end of file +v627 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index fce43864e5..9fa01c8d6c 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec export const ApiVersion = '2023-10-16'; -export const PreviewVersion = '2023-10-25.preview-v2'; +export const PreviewVersion = '2023-10-26.preview-v2'; diff --git a/types/FundingInstructions.d.ts b/types/FundingInstructions.d.ts index dc90899afc..e6f3710f69 100644 --- a/types/FundingInstructions.d.ts +++ b/types/FundingInstructions.d.ts @@ -53,6 +53,11 @@ declare module 'stripe' { namespace BankTransfer { interface FinancialAddress { + /** + * ABA Records contain U.S. bank account details per the ABA format. + */ + aba?: FinancialAddress.Aba; + /** * Iban Records contain E.U. bank account details per the SEPA format. */ @@ -73,6 +78,11 @@ declare module 'stripe' { */ supported_networks?: Array; + /** + * SWIFT Records contain U.S. bank account details per the SWIFT format. + */ + swift?: FinancialAddress.Swift; + /** * The type of financial address */ @@ -85,6 +95,23 @@ declare module 'stripe' { } namespace FinancialAddress { + interface Aba { + /** + * The ABA account number + */ + account_number: string; + + /** + * The bank name + */ + bank_name: string; + + /** + * The ABA routing number + */ + routing_number: string; + } + interface Iban { /** * The name of the person or business that owns the bank account @@ -141,9 +168,40 @@ declare module 'stripe' { clabe: string; } - type SupportedNetwork = 'bacs' | 'fps' | 'sepa' | 'spei' | 'zengin'; + type SupportedNetwork = + | 'ach' + | 'bacs' + | 'domestic_wire_us' + | 'fps' + | 'sepa' + | 'spei' + | 'swift' + | 'zengin'; + + interface Swift { + /** + * The account number + */ + account_number: string; + + /** + * The bank name + */ + bank_name: string; + + /** + * The SWIFT code + */ + swift_code: string; + } - type Type = 'iban' | 'sort_code' | 'spei' | 'zengin'; + type Type = + | 'aba' + | 'iban' + | 'sort_code' + | 'spei' + | 'swift' + | 'zengin'; interface Zengin { /** diff --git a/types/Issuing/CreditUnderwritingRecords.d.ts b/types/Issuing/CreditUnderwritingRecords.d.ts index a9816a8192..7d86cdaf1a 100644 --- a/types/Issuing/CreditUnderwritingRecords.d.ts +++ b/types/Issuing/CreditUnderwritingRecords.d.ts @@ -147,14 +147,18 @@ declare module 'stripe' { namespace ApplicationRejected { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' @@ -165,6 +169,7 @@ declare module 'stripe' { | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' + | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' @@ -176,6 +181,7 @@ declare module 'stripe' { | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -235,18 +241,22 @@ declare module 'stripe' { namespace CreditLimitDecreased { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -273,6 +283,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -311,18 +322,22 @@ declare module 'stripe' { namespace CreditLineClosed { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -349,6 +364,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' diff --git a/types/Issuing/CreditUnderwritingRecordsResource.d.ts b/types/Issuing/CreditUnderwritingRecordsResource.d.ts index 9c7b30ed85..fa16cb15c9 100644 --- a/types/Issuing/CreditUnderwritingRecordsResource.d.ts +++ b/types/Issuing/CreditUnderwritingRecordsResource.d.ts @@ -132,14 +132,18 @@ declare module 'stripe' { namespace ApplicationRejected { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' @@ -150,6 +154,7 @@ declare module 'stripe' { | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' + | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' @@ -161,6 +166,7 @@ declare module 'stripe' { | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -220,18 +226,22 @@ declare module 'stripe' { namespace CreditLimitDecreased { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -258,6 +268,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -296,18 +307,22 @@ declare module 'stripe' { namespace CreditLineClosed { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -334,6 +349,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -555,18 +571,22 @@ declare module 'stripe' { namespace CreditLimitDecreased { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -593,6 +613,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -631,18 +652,22 @@ declare module 'stripe' { namespace CreditLineClosed { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' | 'change_in_financial_state' | 'change_in_utilization_of_credit_line' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'decrease_in_income_to_expense_ratio' | 'decrease_in_social_media_performance' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'exceeds_acceptable_platform_exposure' | 'excessive_income_or_revenue_obligations' @@ -669,6 +694,7 @@ declare module 'stripe' { | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' @@ -784,14 +810,18 @@ declare module 'stripe' { namespace ApplicationRejected { type Reason = + | 'applicant_is_not_beneficial_owner' | 'applicant_too_young' | 'application_is_not_beneficial_owner' | 'bankruptcy' | 'business_size_too_small' + | 'current_account_tier_ineligible' | 'customer_already_exists' + | 'customer_requested_account_closure' | 'debt_to_cash_balance_ratio_too_high' | 'debt_to_equity_ratio_too_high' | 'delinquent_credit_obligations' + | 'dispute_rate_too_high' | 'duration_of_residence' | 'excessive_income_or_revenue_obligations' | 'expenses_to_cash_balance_ratio_too_high' @@ -802,6 +832,7 @@ declare module 'stripe' { | 'high_concentration_of_clients' | 'incomplete_application' | 'inconsistent_monthly_revenues' + | 'insufficient_account_history_with_platform' | 'insufficient_bank_account_history' | 'insufficient_cash_balance' | 'insufficient_cash_flow' @@ -813,6 +844,7 @@ declare module 'stripe' { | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_trade_credit_insurance' + | 'invalid_business_license' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index a73831b37c..5dc5d96504 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -717,6 +717,11 @@ declare module 'stripe' { namespace DisplayBankTransferInstructions { interface FinancialAddress { + /** + * ABA Records contain U.S. bank account details per the ABA format. + */ + aba?: FinancialAddress.Aba; + /** * Iban Records contain E.U. bank account details per the SEPA format. */ @@ -737,6 +742,11 @@ declare module 'stripe' { */ supported_networks?: Array; + /** + * SWIFT Records contain U.S. bank account details per the SWIFT format. + */ + swift?: FinancialAddress.Swift; + /** * The type of financial address */ @@ -749,6 +759,23 @@ declare module 'stripe' { } namespace FinancialAddress { + interface Aba { + /** + * The ABA account number + */ + account_number: string; + + /** + * The bank name + */ + bank_name: string; + + /** + * The ABA routing number + */ + routing_number: string; + } + interface Iban { /** * The name of the person or business that owns the bank account @@ -805,9 +832,40 @@ declare module 'stripe' { clabe: string; } - type SupportedNetwork = 'bacs' | 'fps' | 'sepa' | 'spei' | 'zengin'; + type SupportedNetwork = + | 'ach' + | 'bacs' + | 'domestic_wire_us' + | 'fps' + | 'sepa' + | 'spei' + | 'swift' + | 'zengin'; + + interface Swift { + /** + * The account number + */ + account_number: string; - type Type = 'iban' | 'sort_code' | 'spei' | 'zengin'; + /** + * The bank name + */ + bank_name: string; + + /** + * The SWIFT code + */ + swift_code: string; + } + + type Type = + | 'aba' + | 'iban' + | 'sort_code' + | 'spei' + | 'swift' + | 'zengin'; interface Zengin { /**