diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b14d5f81..1ef6a94e1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ * Add support for `nonce` on `EphemeralKeyCreateParams` * Add support for `cashback_amount` on `Issuing.Authorization.amount_details`, `Issuing.Authorization.pending_request.amount_details`, `Issuing.Authorization.request_history[].amount_details`, and `Issuing.Transaction.amount_details` * Add support for `serial_number` on `Terminal.ReaderListParams` +* [#1895](https://github.com/stripe/stripe-node/pull/1895) feat: webhook signing Nestjs +* [#1878](https://github.com/stripe/stripe-node/pull/1878) Use src/apiVersion.ts, not API_VERSION as source of truth ## 13.6.0-beta.1 - 2023-09-07 * [#1898](https://github.com/stripe/stripe-node/pull/1898) Update generated code for beta diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e9281bf5d6..688708d739 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v532 \ No newline at end of file +v545 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index eef5b1faec..a31df469bd 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec export const ApiVersion = '2023-08-16'; -export const PreviewVersion = '2023-08-11.preview-v2'; +export const PreviewVersion = '2023-09-15.preview-v2'; diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index b06ef831f7..81f9073824 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -59,6 +59,9 @@ declare module 'stripe' { */ default_currency?: string; + /** + * Always true for a deleted object + */ deleted?: void; /** @@ -84,7 +87,7 @@ declare module 'stripe' { * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. * - * Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information) + * Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) */ individual?: Stripe.Person; diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 054a905ce1..f185976c23 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -987,12 +987,12 @@ declare module 'stripe' { gender?: string; /** - * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; @@ -2256,12 +2256,12 @@ declare module 'stripe' { gender?: string; /** - * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; @@ -2727,12 +2727,12 @@ declare module 'stripe' { gender?: string; /** - * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; @@ -3206,12 +3206,12 @@ declare module 'stripe' { gender?: string; /** - * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; diff --git a/types/ApplePayDomains.d.ts b/types/ApplePayDomains.d.ts index c235a65476..f9718cb204 100644 --- a/types/ApplePayDomains.d.ts +++ b/types/ApplePayDomains.d.ts @@ -21,6 +21,9 @@ declare module 'stripe' { */ created: number; + /** + * Always true for a deleted object + */ deleted?: void; domain_name: string; diff --git a/types/Applications.d.ts b/types/Applications.d.ts index 8802ef2fe6..62c131d254 100644 --- a/types/Applications.d.ts +++ b/types/Applications.d.ts @@ -16,6 +16,9 @@ declare module 'stripe' { */ object: 'application'; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/BankAccounts.d.ts b/types/BankAccounts.d.ts index 7b7cfaad2f..ccd5ecbe97 100644 --- a/types/BankAccounts.d.ts +++ b/types/BankAccounts.d.ts @@ -74,6 +74,9 @@ declare module 'stripe' { */ default_for_currency?: boolean | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Cards.d.ts b/types/Cards.d.ts index 3ae976b98c..744490fa31 100644 --- a/types/Cards.d.ts +++ b/types/Cards.d.ts @@ -100,6 +100,9 @@ declare module 'stripe' { */ default_for_currency?: boolean | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index c2a1d3d673..ea9425257e 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -629,19 +629,31 @@ declare module 'stripe' { * Custom text that should be displayed alongside the payment confirmation button. */ submit: CustomText.Submit | null; + + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + terms_of_service_acceptance: CustomText.TermsOfServiceAcceptance | null; } namespace CustomText { interface ShippingAddress { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. */ message: string; } interface Submit { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. + */ + message: string; + } + + interface TermsOfServiceAcceptance { + /** + * Text may be up to 1200 characters in length. */ message: string; } diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index dce35fd75c..a724bf1445 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -423,19 +423,33 @@ declare module 'stripe' { * Custom text that should be displayed alongside the payment confirmation button. */ submit?: Stripe.Emptyable; + + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + terms_of_service_acceptance?: Stripe.Emptyable< + CustomText.TermsOfServiceAcceptance + >; } namespace CustomText { interface ShippingAddress { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. */ message: string; } interface Submit { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. + */ + message: string; + } + + interface TermsOfServiceAcceptance { + /** + * Text may be up to 1200 characters in length. */ message: string; } diff --git a/types/ConfirmationTokens.d.ts b/types/ConfirmationTokens.d.ts index ebb28f67c6..bf99815f8b 100644 --- a/types/ConfirmationTokens.d.ts +++ b/types/ConfirmationTokens.d.ts @@ -23,11 +23,6 @@ declare module 'stripe' { */ created: number; - /** - * ID of the Customer this ConfirmationToken belongs to. - */ - customer: string | null; - /** * Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. */ diff --git a/types/Coupons.d.ts b/types/Coupons.d.ts index a0ca3a2456..fddc93e050 100644 --- a/types/Coupons.d.ts +++ b/types/Coupons.d.ts @@ -42,6 +42,9 @@ declare module 'stripe' { [key: string]: Coupon.CurrencyOptions; }; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Customers.d.ts b/types/Customers.d.ts index 4d76c7e48d..6a18b80ee1 100644 --- a/types/Customers.d.ts +++ b/types/Customers.d.ts @@ -50,6 +50,9 @@ declare module 'stripe' { */ default_source: string | Stripe.CustomerSource | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Discounts.d.ts b/types/Discounts.d.ts index 6fd4bd9c69..2fa1db6556 100644 --- a/types/Discounts.d.ts +++ b/types/Discounts.d.ts @@ -36,6 +36,9 @@ declare module 'stripe' { */ customer: string | Stripe.Customer | Stripe.DeletedCustomer | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/FileLinks.d.ts b/types/FileLinks.d.ts index 4ac78737ca..50c083d3ab 100644 --- a/types/FileLinks.d.ts +++ b/types/FileLinks.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { /** * To share the contents of a `File` object with non-Stripe users, you can - * create a `FileLink`. `FileLink`s contain a URL that can be used to + * create a `FileLink`. `FileLink`s contain a URL that you can use to * retrieve the contents of the file without authentication. */ interface FileLink { @@ -24,12 +24,12 @@ declare module 'stripe' { created: number; /** - * Whether this link is already expired. + * Returns if the link is already expired. */ expired: boolean; /** - * Time at which the link expires. + * Time that the link expires. */ expires_at: number | null; diff --git a/types/FileLinksResource.d.ts b/types/FileLinksResource.d.ts index a73f03c8cf..b781c3f4d5 100644 --- a/types/FileLinksResource.d.ts +++ b/types/FileLinksResource.d.ts @@ -14,7 +14,7 @@ declare module 'stripe' { expand?: Array; /** - * A future timestamp after which the link will no longer be usable. + * The link isn't usable after this future timestamp. */ expires_at?: number; @@ -57,7 +57,7 @@ declare module 'stripe' { expand?: Array; /** - * Filter links by their expiration status. By default, all links are returned. + * Filter links by their expiration status. By default, Stripe returns all links. */ expired?: boolean; diff --git a/types/Files.d.ts b/types/Files.d.ts index c2c20819ec..12fa3c10b8 100644 --- a/types/Files.d.ts +++ b/types/Files.d.ts @@ -3,10 +3,10 @@ declare module 'stripe' { namespace Stripe { /** - * This is an object representing a file hosted on Stripe's servers. The - * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) - * request (for example, when uploading dispute evidence) or it may have - * been created by Stripe (for example, the results of a [Sigma scheduled + * This object represents files hosted on Stripe's servers. You can upload + * files with the [create file](https://stripe.com/docs/api#create_file) request + * (for example, when uploading dispute evidence). Stripe also + * creates files independetly (for example, the results of a [Sigma scheduled * query](https://stripe.com/docs/api#scheduled_queries)). * * Related guide: [File upload guide](https://stripe.com/docs/file-upload) @@ -28,12 +28,12 @@ declare module 'stripe' { created: number; /** - * The time at which the file expires and is no longer available in epoch seconds. + * The file expires and isn't available at this time in epoch seconds. */ expires_at: number | null; /** - * A filename for the file, suitable for saving to a filesystem. + * The suitable name for saving the file to a filesystem. */ filename: string | null; @@ -48,22 +48,22 @@ declare module 'stripe' { purpose: File.Purpose; /** - * The size in bytes of the file object. + * The size of the file object in bytes. */ size: number; /** - * A user friendly title for the document. + * A suitable title for the document. */ title: string | null; /** - * The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). + * The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). */ type: string | null; /** - * The URL from which the file can be downloaded using your live secret API key. + * Use your live secret API key to download the file from this URL. */ url: string | null; } diff --git a/types/FilesResource.d.ts b/types/FilesResource.d.ts index f7a2b60785..c4b1dbe551 100644 --- a/types/FilesResource.d.ts +++ b/types/FilesResource.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { interface FileCreateParams { /** - * A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). + * A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. */ file: FileData; @@ -19,7 +19,7 @@ declare module 'stripe' { expand?: Array; /** - * Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + * Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. */ file_link_data?: FileCreateParams.FileLinkData; } @@ -32,7 +32,7 @@ declare module 'stripe' { create: boolean; /** - * A future timestamp after which the link will no longer be usable. + * The link isn't available after this future timestamp. */ expires_at?: number; @@ -71,7 +71,7 @@ declare module 'stripe' { expand?: Array; /** - * The file purpose to filter queries by. If none is provided, files will not be filtered by purpose. + * Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. */ purpose?: FileListParams.Purpose; } @@ -97,9 +97,9 @@ declare module 'stripe' { class FilesResource { /** - * To upload a file to Stripe, you'll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file. + * To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. * - * All of Stripe's officially supported Client libraries should have support for sending multipart/form-data. + * All of Stripe's officially supported Client libraries support sending multipart/form-data. */ create( params: FileCreateParams, @@ -107,7 +107,7 @@ declare module 'stripe' { ): Promise>; /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the [File Upload Guide](https://stripe.com/docs/file-upload#download-file-contents). + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents). */ retrieve( id: string, @@ -120,7 +120,7 @@ declare module 'stripe' { ): Promise>; /** - * Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. */ list( params?: FileListParams, diff --git a/types/InvoiceItems.d.ts b/types/InvoiceItems.d.ts index 90de680d8a..60f475bdc5 100644 --- a/types/InvoiceItems.d.ts +++ b/types/InvoiceItems.d.ts @@ -46,6 +46,9 @@ declare module 'stripe' { */ date: number; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index d64f918b3e..e0e0b5c0d1 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -208,6 +208,9 @@ declare module 'stripe' { */ default_tax_rates: Array; + /** + * Always true for a deleted object + */ deleted?: void; /** @@ -262,6 +265,11 @@ declare module 'stripe' { */ invoice_pdf?: string | null; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: Invoice.Issuer | null; + /** * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ @@ -456,6 +464,11 @@ declare module 'stripe' { */ enabled: boolean; + /** + * The connected 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; + /** * The status of the most recent automated tax calculation for this invoice. */ @@ -463,6 +476,22 @@ declare module 'stripe' { } namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } + type Status = 'complete' | 'failed' | 'requires_location_inputs'; } @@ -612,6 +641,22 @@ declare module 'stripe' { invoice: string | Stripe.Invoice; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface LastFinalizationError { /** * For card errors, the ID of the failed charge. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 5ebc0f831a..698cf6d068 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -98,6 +98,11 @@ declare module 'stripe' { */ from_invoice?: InvoiceCreateParams.FromInvoice; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceCreateParams.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`. */ @@ -157,6 +162,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ 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 CollectionMethod = 'charge_automatically' | 'send_invoice'; @@ -241,6 +269,22 @@ declare module 'stripe' { invoice: 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 PaymentSettings { /** * ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -768,6 +812,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?: InvoiceUpdateParams.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`. */ @@ -817,6 +866,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ 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 CollectionMethod = 'charge_automatically' | 'send_invoice'; @@ -889,6 +961,22 @@ declare module 'stripe' { } } + 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 PaymentSettings { /** * ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -1424,6 +1512,16 @@ declare module 'stripe' { */ invoice_items?: Array; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceListUpcomingLinesParams.Issuer; + + /** + * The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + */ + on_behalf_of?: Stripe.Emptyable; + /** * The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ @@ -1510,6 +1608,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ 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'; + } } interface CustomerDetails { @@ -1890,6 +2011,22 @@ declare module 'stripe' { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + 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'; + } + type SubscriptionBillingCycleAnchor = 'now' | 'unchanged'; interface SubscriptionItem { @@ -2170,6 +2307,16 @@ declare module 'stripe' { */ invoice_items?: Array; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: InvoiceRetrieveUpcomingParams.Issuer; + + /** + * The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + */ + on_behalf_of?: Stripe.Emptyable; + /** * The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ @@ -2256,6 +2403,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ 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'; + } } interface CustomerDetails { @@ -2636,6 +2806,22 @@ declare module 'stripe' { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + 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'; + } + type SubscriptionBillingCycleAnchor = 'now' | 'unchanged'; interface SubscriptionItem { diff --git a/types/Issuing/AuthorizationsResource.d.ts b/types/Issuing/AuthorizationsResource.d.ts index e156d6d83e..f1d914716d 100644 --- a/types/Issuing/AuthorizationsResource.d.ts +++ b/types/Issuing/AuthorizationsResource.d.ts @@ -117,8 +117,8 @@ declare module 'stripe' { ): ApiListPromise; /** - * Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. - * You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found [here](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + * [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). */ approve( id: string, @@ -131,8 +131,8 @@ declare module 'stripe' { ): Promise>; /** - * Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. - * You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found [here](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + * [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). */ decline( id: string, diff --git a/types/Issuing/CardDesignsResource.d.ts b/types/Issuing/CardDesignsResource.d.ts index 58f526f799..b210f3c955 100644 --- a/types/Issuing/CardDesignsResource.d.ts +++ b/types/Issuing/CardDesignsResource.d.ts @@ -102,7 +102,7 @@ declare module 'stripe' { /** * Hash containing carrier text, for use with card bundles that support carrier text. */ - carrier_text?: CardDesignUpdateParams.CarrierText; + carrier_text?: Stripe.Emptyable; /** * Specifies which fields in the response should be expanded. diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index bb77098a82..b764c7ba3c 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -2485,7 +2485,7 @@ declare module 'stripe' { payment_method_options?: PaymentIntentUpdateParams.PaymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: Array; @@ -2523,12 +2523,12 @@ declare module 'stripe' { statement_descriptor_suffix?: string; /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentUpdateParams.TransferData; /** - * A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + * A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_group?: string; } @@ -7514,10 +7514,10 @@ declare module 'stripe' { /** * Updates properties on a PaymentIntent object without confirming. * - * Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to - * update and confirm at the same time, we recommend updating properties via + * Depending on which properties you update, you might need to confirm the + * PaymentIntent again. For example, updating the payment_method + * always requires you to confirm the PaymentIntent again. If you prefer to + * update and confirm at the same time, we recommend updating properties through * the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead. */ update( diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index c32068b624..10630e3a14 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -319,19 +319,31 @@ declare module 'stripe' { * Custom text that should be displayed alongside the payment confirmation button. */ submit: CustomText.Submit | null; + + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + terms_of_service_acceptance: CustomText.TermsOfServiceAcceptance | null; } namespace CustomText { interface ShippingAddress { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. */ message: string; } interface Submit { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. + */ + message: string; + } + + interface TermsOfServiceAcceptance { + /** + * Text may be up to 1200 characters in length. */ message: string; } diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 1403134b79..c6eafdaded 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -316,19 +316,33 @@ declare module 'stripe' { * Custom text that should be displayed alongside the payment confirmation button. */ submit?: Stripe.Emptyable; + + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + terms_of_service_acceptance?: Stripe.Emptyable< + CustomText.TermsOfServiceAcceptance + >; } namespace CustomText { interface ShippingAddress { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. */ message: string; } interface Submit { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. + */ + message: string; + } + + interface TermsOfServiceAcceptance { + /** + * Text may be up to 1200 characters in length. */ message: string; } @@ -1052,19 +1066,33 @@ declare module 'stripe' { * Custom text that should be displayed alongside the payment confirmation button. */ submit?: Stripe.Emptyable; + + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + terms_of_service_acceptance?: Stripe.Emptyable< + CustomText.TermsOfServiceAcceptance + >; } namespace CustomText { interface ShippingAddress { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. */ message: string; } interface Submit { /** - * Text may be up to 1000 characters in length. + * Text may be up to 1200 characters in length. + */ + message: string; + } + + interface TermsOfServiceAcceptance { + /** + * Text may be up to 1200 characters in length. */ message: string; } diff --git a/types/PaymentMethodsResource.d.ts b/types/PaymentMethodsResource.d.ts index 8a0a96b0fc..2f5f31e8f3 100644 --- a/types/PaymentMethodsResource.d.ts +++ b/types/PaymentMethodsResource.d.ts @@ -303,6 +303,9 @@ declare module 'stripe' { } interface Card2 { + /** + * For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + */ token: string; } diff --git a/types/Persons.d.ts b/types/Persons.d.ts index c7df6a725e..d3eee8bdfc 100644 --- a/types/Persons.d.ts +++ b/types/Persons.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. * - * Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information) + * Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) */ interface Person { /** @@ -43,6 +43,9 @@ declare module 'stripe' { */ created: number; + /** + * Always true for a deleted object + */ deleted?: void; dob?: Person.Dob; diff --git a/types/Plans.d.ts b/types/Plans.d.ts index 1a66f60286..fd03240f41 100644 --- a/types/Plans.d.ts +++ b/types/Plans.d.ts @@ -58,6 +58,9 @@ declare module 'stripe' { */ currency: string; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Prices.d.ts b/types/Prices.d.ts index c73e02dd5a..af340c618b 100644 --- a/types/Prices.d.ts +++ b/types/Prices.d.ts @@ -53,6 +53,9 @@ declare module 'stripe' { */ custom_unit_amount: Price.CustomUnitAmount | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Products.d.ts b/types/Products.d.ts index f069a00dd2..de3aed7f05 100644 --- a/types/Products.d.ts +++ b/types/Products.d.ts @@ -38,6 +38,9 @@ declare module 'stripe' { */ default_price?: string | Stripe.Price | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index 31443bc047..e6d26d0208 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -237,6 +237,11 @@ declare module 'stripe' { */ from_invoice: QuotePreviewInvoice.FromInvoice | null; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ + issuer?: QuotePreviewInvoice.Issuer | null; + /** * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ @@ -454,6 +459,11 @@ declare module 'stripe' { */ enabled: boolean; + /** + * The connected 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; + /** * The status of the most recent automated tax calculation for this invoice. */ @@ -461,6 +471,22 @@ declare module 'stripe' { } namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } + type Status = 'complete' | 'failed' | 'requires_location_inputs'; } @@ -610,6 +636,22 @@ declare module 'stripe' { invoice: string | Stripe.Invoice; } + interface Issuer { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } + interface LastFinalizationError { /** * For card errors, the ID of the failed charge. diff --git a/types/QuotePreviewSchedules.d.ts b/types/QuotePreviewSchedules.d.ts index 647e45ecaf..73803ff5ba 100644 --- a/types/QuotePreviewSchedules.d.ts +++ b/types/QuotePreviewSchedules.d.ts @@ -201,6 +201,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean; + + /** + * The connected 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 | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -224,6 +247,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due: number | null; + + /** + * 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 | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } } interface TransferData { @@ -421,6 +467,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean; + + /** + * The connected 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 | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -475,6 +544,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due: number | null; + + /** + * 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 | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } } interface Item { diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index bcf669e6f2..434709a2f2 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -198,6 +198,11 @@ declare module 'stripe' { */ 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; + /** * The status of the most recent automated tax calculation for this quote. */ @@ -205,6 +210,22 @@ declare module 'stripe' { } namespace AutomaticTax { + interface Liability { + /** + * The connected account being referenced when `type` is `account`. + */ + account: string | Stripe.Account | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } + type Status = 'complete' | 'failed' | 'requires_location_inputs'; } @@ -478,6 +499,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due: number | null; + + /** + * 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 | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } } type Status = diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index e675c527a9..8f3406a8e4 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -127,6 +127,29 @@ declare module 'stripe' { * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. */ 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 CollectionMethod = 'charge_automatically' | 'send_invoice'; @@ -204,6 +227,29 @@ declare module 'stripe' { * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number; + + /** + * 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 Line { @@ -1700,6 +1746,29 @@ declare module 'stripe' { * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. */ 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 CollectionMethod = 'charge_automatically' | 'send_invoice'; @@ -1765,6 +1834,29 @@ declare module 'stripe' { * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number; + + /** + * 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 Line { diff --git a/types/Radar/ValueListItems.d.ts b/types/Radar/ValueListItems.d.ts index 083dbb5091..ee7f92e192 100644 --- a/types/Radar/ValueListItems.d.ts +++ b/types/Radar/ValueListItems.d.ts @@ -29,6 +29,9 @@ declare module 'stripe' { */ created_by: string; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Radar/ValueLists.d.ts b/types/Radar/ValueLists.d.ts index c1231307cb..99a0321203 100644 --- a/types/Radar/ValueLists.d.ts +++ b/types/Radar/ValueLists.d.ts @@ -34,6 +34,9 @@ declare module 'stripe' { */ created_by: string; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/SubscriptionItems.d.ts b/types/SubscriptionItems.d.ts index 67df585f35..487462144e 100644 --- a/types/SubscriptionItems.d.ts +++ b/types/SubscriptionItems.d.ts @@ -27,6 +27,9 @@ declare module 'stripe' { */ created: number; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/SubscriptionSchedules.d.ts b/types/SubscriptionSchedules.d.ts index fd37659f9d..cf6e6cfde0 100644 --- a/types/SubscriptionSchedules.d.ts +++ b/types/SubscriptionSchedules.d.ts @@ -180,6 +180,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean; + + /** + * The connected 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 | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -203,6 +226,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due: number | null; + + /** + * 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 | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } } interface TransferData { @@ -400,6 +446,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean; + + /** + * The connected 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 | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } type BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -454,6 +523,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due: number | null; + + /** + * 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 | null; + + /** + * Type of the account referenced. + */ + type: Issuer.Type; + } + + namespace Issuer { + type Type = 'account' | 'self'; + } } interface Item { diff --git a/types/SubscriptionSchedulesResource.d.ts b/types/SubscriptionSchedulesResource.d.ts index 9f776742a2..247b80b9d9 100644 --- a/types/SubscriptionSchedulesResource.d.ts +++ b/types/SubscriptionSchedulesResource.d.ts @@ -117,6 +117,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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 BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -140,6 +163,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. */ days_until_due?: number; + + /** + * 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 TransferData { @@ -406,6 +452,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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 BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -485,6 +554,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due?: number; + + /** + * 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 Item { @@ -847,6 +939,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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 BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -870,6 +985,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. */ days_until_due?: number; + + /** + * 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 TransferData { @@ -1141,6 +1279,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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 BillingCycleAnchor = 'automatic' | 'phase_start'; @@ -1220,6 +1381,29 @@ declare module 'stripe' { * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ days_until_due?: number; + + /** + * 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 Item { diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index c2e0cf00e1..bf91700a8b 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -249,6 +249,29 @@ declare module 'stripe' { * Whether Stripe automatically computes tax on this subscription. */ enabled: boolean; + + /** + * The connected 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 | null; + + /** + * Type of the account referenced. + */ + type: Liability.Type; + } + + namespace Liability { + type Type = 'account' | 'self'; + } } interface BillingThresholds { diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 59c9ec018b..b846f23dd1 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -100,6 +100,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionCreateParams.InvoiceSettings; + /** * A list of up to 20 subscription items, each with an attached price. */ @@ -310,6 +315,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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'; + } } interface BillingThresholds { @@ -382,6 +410,31 @@ declare module 'stripe' { } } + 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 Item { /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. @@ -989,6 +1042,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: SubscriptionUpdateParams.InvoiceSettings; + /** * A list of up to 20 subscription items, each with an attached price. */ @@ -1202,6 +1260,29 @@ declare module 'stripe' { * Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. */ 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 BillingCycleAnchor = 'now' | 'unchanged'; @@ -1300,6 +1381,31 @@ declare module 'stripe' { } } + 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 Item { /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. diff --git a/types/TaxIds.d.ts b/types/TaxIds.d.ts index 1487990d75..ff65a122b0 100644 --- a/types/TaxIds.d.ts +++ b/types/TaxIds.d.ts @@ -3,10 +3,10 @@ declare module 'stripe' { namespace Stripe { /** - * You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). - * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + * You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account. + * Customer and account tax IDs get displayed on related invoices and credit notes. * - * Related guide: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids) + * Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) */ interface TaxId { /** @@ -34,6 +34,9 @@ declare module 'stripe' { */ customer: string | Stripe.Customer | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Terminal/Configurations.d.ts b/types/Terminal/Configurations.d.ts index f9d5650eaa..4484ba5239 100644 --- a/types/Terminal/Configurations.d.ts +++ b/types/Terminal/Configurations.d.ts @@ -19,6 +19,9 @@ declare module 'stripe' { bbpos_wisepos_e?: Configuration.BbposWiseposE; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Terminal/Locations.d.ts b/types/Terminal/Locations.d.ts index 9ce1b39ae6..a640c92b90 100644 --- a/types/Terminal/Locations.d.ts +++ b/types/Terminal/Locations.d.ts @@ -26,6 +26,9 @@ declare module 'stripe' { */ configuration_overrides?: string; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/Terminal/Readers.d.ts b/types/Terminal/Readers.d.ts index 43477ba4b6..83caafea45 100644 --- a/types/Terminal/Readers.d.ts +++ b/types/Terminal/Readers.d.ts @@ -24,6 +24,9 @@ declare module 'stripe' { */ action: Reader.Action | null; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/TestHelpers/TestClocks.d.ts b/types/TestHelpers/TestClocks.d.ts index 73f9a1e33a..8026aa58ce 100644 --- a/types/TestHelpers/TestClocks.d.ts +++ b/types/TestHelpers/TestClocks.d.ts @@ -24,6 +24,9 @@ declare module 'stripe' { */ created: number; + /** + * Always true for a deleted object + */ deleted?: void; /** diff --git a/types/TokensResource.d.ts b/types/TokensResource.d.ts index f922ce8e9c..a82d7047b6 100644 --- a/types/TokensResource.d.ts +++ b/types/TokensResource.d.ts @@ -292,12 +292,12 @@ declare module 'stripe' { gender?: string; /** - * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; @@ -581,12 +581,12 @@ declare module 'stripe' { gender?: string; /** - * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number?: string; /** - * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + * The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). */ id_number_secondary?: string; diff --git a/types/WebhookEndpoints.d.ts b/types/WebhookEndpoints.d.ts index ecb69ad211..0d249fc01b 100644 --- a/types/WebhookEndpoints.d.ts +++ b/types/WebhookEndpoints.d.ts @@ -37,6 +37,9 @@ declare module 'stripe' { */ created: number; + /** + * Always true for a deleted object + */ deleted?: void; /**