diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f93f657afe..811b18420b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v249 \ No newline at end of file +v263 \ No newline at end of file diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 98660a0e03..e2eea57fb9 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -2908,6 +2908,11 @@ declare module 'stripe' { */ default_for_currency?: boolean; + /** + * Documents that may be submitted to satisfy various informational requests. + */ + documents?: ExternalAccountUpdateParams.Documents; + /** * Two digit number representing the card's expiration month. */ @@ -2938,6 +2943,22 @@ declare module 'stripe' { type AccountHolderType = 'company' | 'individual'; type AccountType = 'checking' | 'futsu' | 'savings' | 'toza'; + + interface Documents { + /** + * One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. + */ + bank_account_ownership_verification?: Documents.BankAccountOwnershipVerification; + } + + namespace Documents { + interface BankAccountOwnershipVerification { + /** + * One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + */ + files?: Array; + } + } } interface PersonUpdateParams { diff --git a/types/BankAccounts.d.ts b/types/BankAccounts.d.ts index 632b6e627f..8d22ba360c 100644 --- a/types/BankAccounts.d.ts +++ b/types/BankAccounts.d.ts @@ -81,6 +81,11 @@ declare module 'stripe' { */ fingerprint: string | null; + /** + * Information about upcoming new requirements for the bank account, including what information needs to be collected. + */ + future_requirements?: BankAccount.FutureRequirements | null; + /** * The last four digits of the bank account number. */ @@ -91,6 +96,11 @@ declare module 'stripe' { */ metadata?: Stripe.Metadata | null; + /** + * Information about the requirements for the bank account, including what information needs to be collected. + */ + requirements?: BankAccount.Requirements | null; + /** * The routing transit number for the bank account. */ @@ -106,6 +116,194 @@ declare module 'stripe' { namespace BankAccount { type AvailablePayoutMethod = 'instant' | 'standard'; + + interface FutureRequirements { + /** + * Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ + currently_due: Array | null; + + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors: Array | null; + + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + */ + past_due: Array | null; + + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + */ + pending_verification: Array | null; + } + + namespace FutureRequirements { + interface Error { + /** + * The code for the type of error. + */ + code: Error.Code; + + /** + * An informative message that indicates the error type and provides additional details about the error. + */ + reason: string; + + /** + * The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + */ + requirement: string; + } + + namespace Error { + type Code = + | 'invalid_address_city_state_postal_code' + | 'invalid_dob_age_under_18' + | 'invalid_representative_country' + | 'invalid_street_address' + | 'invalid_tos_acceptance' + | 'invalid_value_other' + | 'verification_document_address_mismatch' + | 'verification_document_address_missing' + | 'verification_document_corrupt' + | 'verification_document_country_not_supported' + | 'verification_document_dob_mismatch' + | 'verification_document_duplicate_type' + | 'verification_document_expired' + | 'verification_document_failed_copy' + | 'verification_document_failed_greyscale' + | 'verification_document_failed_other' + | 'verification_document_failed_test_mode' + | 'verification_document_fraudulent' + | 'verification_document_id_number_mismatch' + | 'verification_document_id_number_missing' + | 'verification_document_incomplete' + | 'verification_document_invalid' + | 'verification_document_issue_or_expiry_date_missing' + | 'verification_document_manipulated' + | 'verification_document_missing_back' + | 'verification_document_missing_front' + | 'verification_document_name_mismatch' + | 'verification_document_name_missing' + | 'verification_document_nationality_mismatch' + | 'verification_document_not_readable' + | 'verification_document_not_signed' + | 'verification_document_not_uploaded' + | 'verification_document_photo_mismatch' + | 'verification_document_too_large' + | 'verification_document_type_not_supported' + | 'verification_failed_address_match' + | 'verification_failed_business_iec_number' + | 'verification_failed_document_match' + | 'verification_failed_id_number_match' + | 'verification_failed_keyed_identity' + | 'verification_failed_keyed_match' + | 'verification_failed_name_match' + | 'verification_failed_other' + | 'verification_failed_residential_address' + | 'verification_failed_tax_id_match' + | 'verification_failed_tax_id_not_issued' + | 'verification_missing_executives' + | 'verification_missing_owners' + | 'verification_requires_additional_memorandum_of_associations'; + } + } + + interface Requirements { + /** + * Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ + currently_due: Array | null; + + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors: Array | null; + + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + */ + past_due: Array | null; + + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + */ + pending_verification: Array | null; + } + + namespace Requirements { + interface Error { + /** + * The code for the type of error. + */ + code: Error.Code; + + /** + * An informative message that indicates the error type and provides additional details about the error. + */ + reason: string; + + /** + * The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + */ + requirement: string; + } + + namespace Error { + type Code = + | 'invalid_address_city_state_postal_code' + | 'invalid_dob_age_under_18' + | 'invalid_representative_country' + | 'invalid_street_address' + | 'invalid_tos_acceptance' + | 'invalid_value_other' + | 'verification_document_address_mismatch' + | 'verification_document_address_missing' + | 'verification_document_corrupt' + | 'verification_document_country_not_supported' + | 'verification_document_dob_mismatch' + | 'verification_document_duplicate_type' + | 'verification_document_expired' + | 'verification_document_failed_copy' + | 'verification_document_failed_greyscale' + | 'verification_document_failed_other' + | 'verification_document_failed_test_mode' + | 'verification_document_fraudulent' + | 'verification_document_id_number_mismatch' + | 'verification_document_id_number_missing' + | 'verification_document_incomplete' + | 'verification_document_invalid' + | 'verification_document_issue_or_expiry_date_missing' + | 'verification_document_manipulated' + | 'verification_document_missing_back' + | 'verification_document_missing_front' + | 'verification_document_name_mismatch' + | 'verification_document_name_missing' + | 'verification_document_nationality_mismatch' + | 'verification_document_not_readable' + | 'verification_document_not_signed' + | 'verification_document_not_uploaded' + | 'verification_document_photo_mismatch' + | 'verification_document_too_large' + | 'verification_document_type_not_supported' + | 'verification_failed_address_match' + | 'verification_failed_business_iec_number' + | 'verification_failed_document_match' + | 'verification_failed_id_number_match' + | 'verification_failed_keyed_identity' + | 'verification_failed_keyed_match' + | 'verification_failed_name_match' + | 'verification_failed_other' + | 'verification_failed_residential_address' + | 'verification_failed_tax_id_match' + | 'verification_failed_tax_id_not_issued' + | 'verification_missing_executives' + | 'verification_missing_owners' + | 'verification_requires_additional_memorandum_of_associations'; + } + } } /** diff --git a/types/Charges.d.ts b/types/Charges.d.ts index b21caaf2b6..1b6a64d2cb 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -1501,7 +1501,13 @@ declare module 'stripe' { } } - interface Link {} + interface Link { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. + * You could use this attribute to get a sense of international fees. + */ + country: string | null; + } interface Multibanco { /** diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index d09a9b8fbd..dc80355cbd 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -760,7 +760,7 @@ declare module 'stripe' { } namespace PaymentIntentData { - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; type SetupFutureUsage = 'off_session' | 'on_session'; diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index c1c9a17b53..af42386a53 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -253,7 +253,7 @@ declare module 'stripe' { | 'requested_by_customer' | 'void_invoice'; - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; type ConfirmationMethod = 'automatic' | 'manual'; diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 2c8c72aed6..bc58b434b0 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -172,7 +172,7 @@ declare module 'stripe' { enabled: boolean; } - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; type ConfirmationMethod = 'automatic' | 'manual'; @@ -2035,7 +2035,7 @@ declare module 'stripe' { } namespace PaymentIntentUpdateParams { - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; interface PaymentMethodData { /** @@ -3894,7 +3894,7 @@ declare module 'stripe' { } namespace PaymentIntentConfirmParams { - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; interface MandateData1 { /** diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 994767731e..4817068359 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -376,7 +376,7 @@ declare module 'stripe' { } namespace PaymentIntentData { - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; type SetupFutureUsage = 'off_session' | 'on_session'; } diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index cec8e54ee5..a9c6c88400 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -432,7 +432,7 @@ declare module 'stripe' { } namespace PaymentIntentData { - type CaptureMethod = 'automatic' | 'manual'; + type CaptureMethod = 'automatic' | 'automatic_async' | 'manual'; type SetupFutureUsage = 'off_session' | 'on_session'; }