diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/api.ts index 5e04939..272b76f 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/api.ts @@ -11,12 +11,32 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { baseUrl: config.baseUrl || 'https://{environment}.example.com/v{version}', middleware }, { +/** + * Product catalog operations + * + * Endpoints for managing products in the store. + */ 'products': { +/** + * List products + * + * Retrieve a paginated list of products with filtering options. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ category: z.enum(['electronics', 'clothing', 'books']).optional(), priceRange: z.array(z.number()).optional(), page: z.number().int().min(1).optional(), limit: z.number().int().min(1).max(100).optional(), sort: z.record(z.string(), z.enum(['asc', 'desc'])).optional() }).parse).def_response(async ({ json }) => z.array(Model.Product).parse(await json())), +/** + * Create a new product + * + * Add a new product to the catalog. Supports different product types via polymorphism. + */ 'POST': f.builder().def_json().def_body(Model.Product.parse).def_response(async ({ json }) => Model.Product.parse(await json())) }, 'orders': { '$orderId': { +/** + * Get order details + * + * Retrieve details of a specific order. + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse_2/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse_2/api.ts index 623e1ea..6382086 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse_2/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse_2/api.ts @@ -11,16 +11,35 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { baseUrl: config.baseUrl || 'https://{environment}.example-commerce.com/api/v2', middleware }, { +/** + * Product Collection + * + * Endpoint for searching and creating products. + */ 'products': { +/** + * Search and filter products + */ 'GET': f.builder().def_json().def_searchparams(z.object({ searchQuery: z.string().optional(), tags: z.array(z.string()).optional(), page: z.number().int().min(1).optional() }).parse).def_response(async ({ json }) => Model.PaginatedProductResponse.parse(await json())), +/** + * Add a new product with an image + */ 'POST': f.builder().def_json().def_body(z.instanceof(FormData).parse).def_response(async ({ json }) => Model.Product.parse(await json())), '$productId': { +/** + * Get a single product by its ID + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())) } }, 'orders': { '$orderId': { 'process': { +/** + * Process an order asynchronously + * + * Begins processing an order. A callback URL is invoked upon completion. + */ 'POST': f.builder().def_json() } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/simple/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/simple/api.ts index 08ec2c3..0a128fb 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/simple/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/simple/api.ts @@ -12,9 +12,18 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { middleware }, { 'books': { +/** + * Get a list of books + */ 'GET': f.builder().def_json().def_response(async ({ json }) => z.array(Model.Book).parse(await json())), +/** + * Create a new book + */ 'POST': f.builder().def_json().def_body(Model.BookRequest.parse).def_response(async ({ json }) => Model.Book.parse(await json())), '$id': { +/** + * Get a book by ID + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.Book.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/api.ts index 885aa40..fdffdaa 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/api.ts @@ -13,54 +13,197 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, { 'v1': { 'account': { +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())) }, 'account_links': { +/** + * Create an account link + * + * Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountLink.parse(await json())) }, 'account_sessions': { +/** + * Create an Account Session + * + * Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountSession.parse(await json())) }, 'accounts': { +/** + * List all connected accounts + * + * Returns a list of accounts connected to your platform via [Connect](/docs/connect). If you’re not a platform, the list is empty. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * With [Connect](/docs/connect), you can create Stripe accounts for your users. + * To do this, you’ll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). + * + * If you’ve already collected information for your connected accounts, you [can prefill that information](/docs/connect/best-practices#onboarding) when + * creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. + * You can prefill any information on the account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), '$account': { +/** + * Delete an account + * + * With [Connect](/connect), you can delete accounts you manage. + * + * Test-mode accounts can be deleted at any time. + * + * Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all [balances](/api/balance/balance_object) are zero. + * + * If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedAccount.parse(await json())), +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())), +/** + * Update an account + * + * Updates a [connected account](/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + * left unchanged. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, you can update any information on the account. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, you can update all information until you create + * an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) to start Connect onboarding, + * after which some properties can no longer be updated. + * + * To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our + * [Connect](/docs/connect/updating-accounts) documentation to learn more about updating accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), 'bank_accounts': { +/** + * Create an external account + * + * Create an external account for a given account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), '$id': { +/** + * Delete an external account + * + * Delete a specified external account for a given account. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedExternalAccount.parse(await json())), +/** + * Retrieve an external account + * + * Retrieve a specified external account for a given account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'capabilities': { +/** + * List all account capabilities + * + * Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$capability': { +/** + * Retrieve an Account Capability + * + * Retrieves information about the specified Account Capability. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Capability.parse(await json())), +/** + * Update an Account Capability + * + * Updates an existing Account Capability. Request or remove a capability by updating its `requested` parameter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Capability.parse(await json())) } }, 'external_accounts': { +/** + * List all external accounts + * + * List external accounts for an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.enum(['bank_account', 'card']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create an external account + * + * Create an external account for a given account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), '$id': { +/** + * Delete an external account + * + * Delete a specified external account for a given account. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedExternalAccount.parse(await json())), +/** + * Retrieve an external account + * + * Retrieve a specified external account for a given account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'login_links': { +/** + * Create a login link + * + * Creates a login link for a connected account to access the Express Dashboard. + * + * **You can only create login links for accounts that use the [Express Dashboard](/connect/express-dashboard) and are connected to your platform**. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LoginLink.parse(await json())) }, 'people': { +/** + * List all persons + * + * Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), relationship: z.object({ 'authorizer': z.boolean().optional(), 'director': z.boolean().optional(), @@ -69,14 +212,39 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'owner': z.boolean().optional(), 'representative': z.boolean().optional() }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a person + * + * Creates a new person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())), '$person': { +/** + * Delete a person + * + * Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the `account_opener`. If your integration is using the `executive` parameter, you cannot delete the only verified `executive` on file. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPerson.parse(await json())), +/** + * Retrieve a person + * + * Retrieves an existing person. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Person.parse(await json())), +/** + * Update a person + * + * Updates an existing person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())) } }, 'persons': { +/** + * List all persons + * + * Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), relationship: z.object({ 'authorizer': z.boolean().optional(), 'director': z.boolean().optional(), @@ -85,29 +253,73 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'owner': z.boolean().optional(), 'representative': z.boolean().optional() }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a person + * + * Creates a new person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())), '$person': { +/** + * Delete a person + * + * Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the `account_opener`. If your integration is using the `executive` parameter, you cannot delete the only verified `executive` on file. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPerson.parse(await json())), +/** + * Retrieve a person + * + * Retrieves an existing person. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Person.parse(await json())), +/** + * Update a person + * + * Updates an existing person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())) } }, 'reject': { +/** + * Reject an account + * + * With [Connect](/connect), you can reject accounts that you have flagged as suspicious. + * + * Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())) } } }, 'apple_pay': { 'domains': { +/** + * List apple pay domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an apple pay domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())), '$domain': { +/** + * Delete an apple pay domain. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedApplePayDomain.parse(await json())), +/** + * Retrieve an apple pay domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())) } } }, 'application_fees': { +/** + * List all application fees + * + * Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -117,31 +329,81 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$fee': { 'refunds': { '$id': { +/** + * Retrieve an application fee refund + * + * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FeeRefund.parse(await json())), +/** + * Update an application fee refund + * + * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, '$id': { +/** + * Retrieve an application fee + * + * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplicationFee.parse(await json())), 'refund': { 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ApplicationFee.parse(await json())) }, 'refunds': { +/** + * List all application fee refunds + * + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an application fee refund + * + * Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected. + * + * You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded. + * + * Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, 'apps': { 'secrets': { +/** + * List secrets + * + * List all secrets stored on the given scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() }), starting_after: z.string().optional() }).parse), +/** + * Set a Secret + * + * Create or replace a secret in the secret store. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AppsSecret.parse(await json())), 'DELETE': f.builder().def_json(), 'find': { +/** + * Find a Secret + * + * Finds a secret in the secret store by name and scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), name: z.string(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() @@ -150,8 +412,21 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { } }, 'balance': { +/** + * Retrieve balance + * + * Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see [Accounting for negative balances](/docs/connect/account-balances#accounting-for-negative-balances). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Balance.parse(await json())), 'history': { +/** + * List all balance transactions + * + * Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + * + * Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -159,15 +434,41 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payout: z.string().optional(), source: z.string().optional(), starting_after: z.string().optional(), type: z.string().optional() }).parse), '$id': { +/** + * Retrieve a balance transaction + * + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path `/v1/balance/history/:id`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceTransaction.parse(await json())) } } }, 'balance_settings': { +/** + * Retrieve balance settings + * + * Retrieves balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceSettings.parse(await json())), +/** + * Update balance settings + * + * Updates balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BalanceSettings.parse(await json())) }, 'balance_transactions': { +/** + * List all balance transactions + * + * Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + * + * Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -175,27 +476,69 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payout: z.string().optional(), source: z.string().optional(), starting_after: z.string().optional(), type: z.string().optional() }).parse), '$id': { +/** + * Retrieve a balance transaction + * + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path `/v1/balance/history/:id`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceTransaction.parse(await json())) } }, 'billing': { 'alerts': { +/** + * List billing alerts + * + * Lists billing active and inactive alerts + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alert_type: z.enum(['usage_threshold']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), meter: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a billing alert + * + * Creates a billing alert + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())), '$id': { +/** + * Retrieve a billing alert + * + * Retrieves a billing alert given an ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingAlert.parse(await json())), 'activate': { +/** + * Activate a billing alert + * + * Reactivates this alert, allowing it to trigger again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'archive': { +/** + * Archive a billing alert + * + * Archives this alert, removing it from the list view and APIs. This is non-reversible. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'deactivate': { +/** + * Deactivate a billing alert + * + * Deactivates this alert, preventing it from triggering. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) } } }, 'credit_balance_summary': { +/** + * Retrieve the credit balance summary for a customer + * + * Retrieves the credit balance summary for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), expand: z.array(z.string()).optional(), filter: z.object({ 'applicability_scope': z.object({ 'price_type': z.enum(['metered']).optional(), @@ -208,44 +551,129 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }) }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceSummary.parse(await json())) }, 'credit_balance_transactions': { +/** + * List credit balance transactions + * + * Retrieve a list of credit balance transactions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ credit_grant: z.string().optional(), customer: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a credit balance transaction + * + * Retrieves a credit balance transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceTransaction.parse(await json())) } }, 'credit_grants': { +/** + * List credit grants + * + * Retrieve a list of credit grants. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit grant + * + * Creates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), '$id': { +/** + * Retrieve a credit grant + * + * Retrieves a credit grant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), +/** + * Update a credit grant + * + * Updates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), 'expire': { +/** + * Expire a credit grant + * + * Expires a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) }, 'void': { +/** + * Void a credit grant + * + * Voids a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) } } }, 'meter_event_adjustments': { +/** + * Create a billing meter event adjustment + * + * Creates a billing meter event adjustment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEventAdjustment.parse(await json())) }, 'meter_events': { +/** + * Create a billing meter event + * + * Creates a billing meter event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEvent.parse(await json())) }, 'meters': { +/** + * List billing meters + * + * Retrieve a list of billing meters. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive']).optional() }).parse), +/** + * Create a billing meter + * + * Creates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), '$id': { +/** + * Retrieve a billing meter + * + * Retrieves a billing meter given an ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingMeter.parse(await json())), +/** + * Update a billing meter + * + * Updates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), 'deactivate': { +/** + * Deactivate a billing meter + * + * When a meter is deactivated, no more meter events will be accepted for this meter. You can’t attach a deactivated meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) }, 'event_summaries': { +/** + * List billing meter event summaries + * + * Retrieve a list of billing meter event summaries. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), end_time: z.number().int(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), start_time: z.number().int(), starting_after: z.string().optional(), value_grouping_window: z.enum(['day', 'hour']).optional() }).parse) }, 'reactivate': { +/** + * Reactivate a billing meter + * + * When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) } } @@ -253,35 +681,100 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'billing_portal': { 'configurations': { +/** + * List portal configurations + * + * Returns a list of configurations that describe the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a portal configuration + * + * Creates a configuration that describes the functionality and behavior of a PortalSession + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve a portal configuration + * + * Retrieves a configuration that describes the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), +/** + * Update a portal configuration + * + * Updates a configuration that describes the functionality of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())) } }, 'sessions': { +/** + * Create a portal session + * + * Creates a session of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalSession.parse(await json())) } }, 'charges': { +/** + * List all charges + * + * Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * This method is no longer recommended—use the [Payment Intents API](/docs/api/payment_intents) + * to initiate a new payment instead. Confirmation of the PaymentIntent creates the `Charge` + * object used to request payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'search': { +/** + * Search charges + * + * Search for charges you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$charge': { +/** + * Retrieve a charge + * + * Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Charge.parse(await json())), +/** + * Update a charge + * + * Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'capture': { +/** + * Capture a payment + * + * Capture the payment of an existing, uncaptured charge that was created with the `capture` option set to false. + * + * Uncaptured payments expire a set number of days after they are created ([7 by default](/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + * + * Don’t use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](/docs/api/payment_intents/capture). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())) }, 'dispute': { +/** + * Retrieve a dispute for a specified charge. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Dispute.parse(await json())), 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())), 'close': { @@ -289,13 +782,54 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { } }, 'refund': { +/** + * Create a refund + * + * When you create a new refund, you must specify either a Charge or a PaymentIntent object. + * + * This action refunds a previously created charge that’s not refunded yet. + * Funds are refunded to the credit or debit card that’s originally charged. + * + * You can optionally refund only part of a charge. + * You can repeat this until the entire charge is refunded. + * + * After you entirely refund a charge, you can’t refund it again. + * This method raises an error when it’s called on an already-refunded charge, + * or when you attempt to refund more money than is left on a charge. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())) }, 'refunds': { +/** + * List all refunds + * + * You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create customer balance refund + * + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. + * + * You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), '$refund': { +/** + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())), +/** + * Update a specified refund. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -303,6 +837,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'checkout': { 'sessions': { +/** + * List all Checkout Sessions + * + * Returns a list of Checkout Sessions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -311,14 +850,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), customer: z.string().optional(), customer_details: z.object({ 'email': z.string() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), payment_link: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['complete', 'expired', 'open']).optional(), subscription: z.string().optional() }).parse), +/** + * Create a Checkout Session + * + * Creates a Checkout Session object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), '$session': { +/** + * Retrieve a Checkout Session + * + * Retrieves a Checkout Session object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), +/** + * Update a Checkout Session + * + * Updates a Checkout Session object. + * + * Related guide: [Dynamically update Checkout](/payments/checkout/dynamic-updates) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), 'expire': { +/** + * Expire a Checkout Session + * + * A Checkout Session can be expired when it is in one of these statuses: `open` + * + * After it expires, a customer can’t complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())) }, 'line_items': { +/** + * Retrieve a Checkout Session's line items + * + * When retrieving a Checkout Session, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } @@ -326,63 +894,182 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'climate': { 'orders': { +/** + * List orders + * + * Lists all Climate order objects. The orders are returned sorted by creation date, with the + * most recently created orders appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an order + * + * Creates a Climate order object for a given Climate product. The order will be processed immediately + * after creation and payment will be deducted your Stripe balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), '$order': { +/** + * Retrieve an order + * + * Retrieves the details of a Climate order object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), +/** + * Update an order + * + * Updates the specified order by setting the values of the parameters passed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), 'cancel': { +/** + * Cancel an order + * + * Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + * reservation `amount_subtotal`, but not the `amount_fees` for user-triggered cancellations. Frontier + * might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + * provides 90 days advance notice and refunds the `amount_total`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())) } } }, 'products': { +/** + * List products + * + * Lists all available Climate product objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$product': { +/** + * Retrieve a product + * + * Retrieves the details of a Climate product with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateProduct.parse(await json())) } }, 'suppliers': { +/** + * List suppliers + * + * Lists all available Climate supplier objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$supplier': { +/** + * Retrieve a supplier + * + * Retrieves a Climate supplier object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateSupplier.parse(await json())) } } }, 'confirmation_tokens': { '$confirmation_token': { +/** + * Retrieve a ConfirmationToken + * + * Retrieves an existing ConfirmationToken object + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) } }, 'country_specs': { +/** + * List Country Specs + * + * Lists all Country Spec objects available in the API. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$country': { +/** + * Retrieve a Country Spec + * + * Returns a Country Spec for a given Country code. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CountrySpec.parse(await json())) } }, 'coupons': { +/** + * List all coupons + * + * Returns a list of your coupons. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a coupon + * + * You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. + * + * A coupon has either a `percent_off` or an `amount_off` and `currency`. If you set an `amount_off`, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an `amount_off` of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an `amount_off` of 200 is applied to it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())), '$coupon': { +/** + * Delete a coupon + * + * You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCoupon.parse(await json())), +/** + * Retrieve a coupon + * + * Retrieves the coupon with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Coupon.parse(await json())), +/** + * Update a coupon + * + * Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())) } }, 'credit_notes': { +/** + * List all credit notes + * + * Returns a list of credit notes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit note + * + * Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s `amount_remaining` (and `amount_due`), but not below zero. + * This amount is indicated by the credit note’s `pre_payment_amount`. The excess amount is indicated by `post_payment_amount`, and it can result in any combination of the following: + * + * - Refunds: create a new refund (using `refund_amount`) or link existing refunds (using `refunds`). + * + * - Customer balance credit: credit the customer’s balance (using `credit_amount`) which will be automatically applied to their next invoice when it’s finalized. + * + * - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using `out_of_band_amount`). + * + * The sum of refunds, customer balance credits, and outside of Stripe credits must equal the `post_payment_amount`. + * + * You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s `pre_payment_credit_notes_amount`, + * `post_payment_credit_notes_amount`, or both, depending on the invoice’s `amount_remaining` at the time of credit note creation. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'preview': { +/** + * Preview a credit note + * + * Get a preview of a credit note without creating it. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), expand: z.array(z.string()).optional(), invoice: z.string(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -409,6 +1096,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'shipping_rate': z.string().optional() }).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'lines': { +/** + * Retrieve a credit note preview's line items + * + * When retrieving a credit note preview, you’ll get a **lines** property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string(), limit: z.number().int().optional(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -438,128 +1130,398 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, '$credit_note': { 'lines': { +/** + * Retrieve a credit note's line items + * + * When retrieving a credit note, you’ll get a **lines** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } }, '$id': { +/** + * Retrieve a credit note + * + * Retrieves the credit note object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), +/** + * Update a credit note + * + * Updates an existing credit note. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'void': { +/** + * Void a credit note + * + * Marks a credit note as void. Learn more about [voiding credit notes](/docs/billing/invoices/credit-notes#voiding). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())) } } }, 'customer_sessions': { +/** + * Create a Customer Session + * + * Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerSession.parse(await json())) }, 'customers': { +/** + * List all customers + * + * Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), test_clock: z.string().optional() }).parse), +/** + * Create a customer + * + * Creates a new customer object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'search': { +/** + * Search customers + * + * Search for customers you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$customer': { +/** + * Delete a customer + * + * Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCustomer.parse(await json())), +/** + * Retrieve a customer + * + * Retrieves a Customer object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a customer + * + * Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the **source** parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the **source** parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the `past_due` state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the **default_source** for a customer will not trigger this behavior. + * + * This request accepts mostly the same arguments as the customer creation call. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'balance_transactions': { +/** + * List customer balance transactions + * + * Returns a list of transactions that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a customer balance transaction + * + * Creates an immutable transaction that updates the customer’s credit [balance](/docs/billing/customer/balance). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), '$transaction': { +/** + * Retrieve a customer balance transaction + * + * Retrieves a specific customer balance transaction that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), +/** + * Update a customer credit balance transaction + * + * Most credit balance transaction fields are immutable, but you may update its `description` and `metadata`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())) } }, 'bank_accounts': { +/** + * List all bank accounts + * + * You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional bank accounts. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a card + * + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](/docs/api#update_customer) to have a new `default_source`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentSource.parse(await json())), '$id': { +/** + * Delete a customer source + * + * Delete a specified source for a given customer. + */ 'DELETE': f.builder().def_json(), +/** + * Retrieve a bank account + * + * By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BankAccount.parse(await json())), +/** + * Update a specified source for a given customer. + */ 'POST': f.builder().def_json(), 'verify': { +/** + * Verify a bank account + * + * Verify a specified bank account for a given customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BankAccount.parse(await json())) } } }, 'cards': { +/** + * List all cards + * + * You can see a list of the cards belonging to a customer. + * Note that the 10 most recent sources are always available on the `Customer` object. + * If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional cards. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a card + * + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](/docs/api#update_customer) to have a new `default_source`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentSource.parse(await json())), '$id': { +/** + * Delete a customer source + * + * Delete a specified source for a given customer. + */ 'DELETE': f.builder().def_json(), +/** + * Retrieve a card + * + * You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Card.parse(await json())), +/** + * Update a specified source for a given customer. + */ 'POST': f.builder().def_json() } }, 'cash_balance': { +/** + * Retrieve a cash balance + * + * Retrieves a customer’s cash balance. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CashBalance.parse(await json())), +/** + * Update a cash balance's settings + * + * Changes the settings on a customer’s cash balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CashBalance.parse(await json())) }, 'cash_balance_transactions': { +/** + * List cash balance transactions + * + * Returns a list of transactions that modified the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$transaction': { +/** + * Retrieve a cash balance transaction + * + * Retrieves a specific cash balance transaction, which updated the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } }, 'discount': { +/** + * Delete a customer discount + * + * Removes the currently applied discount on a customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())), 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Discount.parse(await json())) }, 'funding_instructions': { +/** + * Create or retrieve funding instructions for a customer cash balance + * + * Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FundingInstructions.parse(await json())) }, 'payment_methods': { +/** + * List a Customer's PaymentMethods + * + * Returns a list of PaymentMethods for a given Customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ allow_redisplay: z.enum(['always', 'limited', 'unspecified']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), '$payment_method': { +/** + * Retrieve a Customer's PaymentMethod + * + * Retrieves a PaymentMethod object for a given Customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } }, 'sources': { +/** + * List sources for a specified customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a card + * + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](/docs/api#update_customer) to have a new `default_source`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentSource.parse(await json())), '$id': { +/** + * Delete a customer source + * + * Delete a specified source for a given customer. + */ 'DELETE': f.builder().def_json(), +/** + * Retrieve a specified source for a given customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentSource.parse(await json())), +/** + * Update a specified source for a given customer. + */ 'POST': f.builder().def_json(), 'verify': { +/** + * Verify a bank account + * + * Verify a specified bank account for a given customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BankAccount.parse(await json())) } } }, 'subscriptions': { +/** + * List active subscriptions + * + * You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a subscription + * + * Creates a new subscription on an existing customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), '$subscription_exposed_id': { +/** + * Cancel a subscription + * + * Cancels a customer’s subscription. If you set the `at_period_end` parameter to `true`, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default `false` value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription. + * + * Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually [deleted](#delete_invoiceitem). If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + * + * By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Retrieve a subscription + * + * Retrieves the subscription with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Update a subscription on a customer + * + * Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the [upcoming invoice](#upcoming_invoice) endpoint. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'discount': { +/** + * Delete a customer discount + * + * Removes the currently applied discount on a customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())), 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Discount.parse(await json())) } } }, 'tax_ids': { +/** + * List all Customer tax IDs + * + * Returns a list of tax IDs for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Customer tax ID + * + * Creates a new `tax_id` object for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a Customer tax ID + * + * Deletes an existing `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a Customer tax ID + * + * Retrieves the `tax_id` object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } } } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of your disputes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -567,36 +1529,100 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves the dispute with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Dispute.parse(await json())), +/** + * Update a dispute + * + * When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. + * + * Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](/docs/disputes/categories). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())), 'close': { +/** + * Close a dispute + * + * Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + * + * The status of the dispute will change from `needs_response` to `lost`. *Closing a dispute is irreversible*. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())) } } }, 'entitlements': { 'active_entitlements': { +/** + * List all active entitlements + * + * Retrieve a list of active entitlements for a customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve an active entitlement + * + * Retrieve an active entitlement + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsActiveEntitlement.parse(await json())) } }, 'features': { +/** + * List all features + * + * Retrieve a list of features + */ 'GET': f.builder().def_json().def_searchparams(z.object({ archived: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_key: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a feature + * + * Creates a feature + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), '$id': { +/** + * Retrieve a feature + * + * Retrieves a feature + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), +/** + * Updates a feature + * + * Update a feature’s metadata or permanently deactivate it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())) } } }, 'ephemeral_keys': { +/** + * Create an ephemeral key + * + * Creates a short-lived API key for a given resource. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())), '$key': { +/** + * Immediately invalidate an ephemeral key + * + * Invalidates a short-lived API key for a given resource. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())) } }, 'events': { +/** + * List all events + * + * List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -604,77 +1630,193 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), delivery_success: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.string().optional(), types: z.array(z.string()).optional() }).parse), '$id': { +/** + * Retrieve an event + * + * Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Event.parse(await json())) } }, 'exchange_rates': { +/** + * List all exchange rates + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$rate_id': { +/** + * Retrieve an exchange rate + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Retrieves the exchange rates from the given currency to every supported currency. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExchangeRate.parse(await json())) } }, 'external_accounts': { '$id': { +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'file_links': { +/** + * List all file links + * + * Returns a list of file links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), expired: z.boolean().optional(), file: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a file link + * + * Creates a new file link object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())), '$link': { +/** + * Retrieve a file link + * + * Retrieves the file link with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FileLink.parse(await json())), +/** + * Update a file link + * + * Updates an existing file link object. Expired links can no longer be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())) } }, 'files': { +/** + * List all files + * + * 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. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), purpose: z.enum(['account_requirement', 'additional_verification', 'business_icon', 'business_logo', 'customer_signature', 'dispute_evidence', 'document_provider_identity_document', 'finance_report_run', 'financial_account_statement', 'identity_document', 'identity_document_downloadable', 'issuing_regulatory_reporting', 'pci_document', 'platform_terms_of_service', 'selfie', 'sigma_scheduled_query', 'tax_document_user_upload', 'terminal_android_apk', 'terminal_reader_splashscreen']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create 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 support sending `multipart/form-data`. + */ 'POST': f.builder().def_json().def_body(z.instanceof(FormData).parse).def_response(async ({ json }) => Model.File.parse(await json())), '$file': { +/** + * Retrieve a file + * + * 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](/docs/file-upload#download-file-contents). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.File.parse(await json())) } }, 'financial_connections': { 'accounts': { +/** + * List Accounts + * + * Returns a list of Financial Connections `Account` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account_holder: z.object({ 'account': z.string().optional(), 'customer': z.string().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), session: z.string().optional(), starting_after: z.string().optional() }).parse), '$account': { +/** + * Retrieve an Account + * + * Retrieves the details of an Financial Connections `Account`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())), 'disconnect': { +/** + * Disconnect an Account + * + * Disables your access to a Financial Connections `Account`. You will no longer be able to access data associated with the account (e.g. balances, transactions). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'owners': { +/** + * List Account Owners + * + * Lists all owners for a given `Account` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), ownership: z.string(), starting_after: z.string().optional() }).parse) }, 'refresh': { +/** + * Refresh Account data + * + * Refreshes the data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'subscribe': { +/** + * Subscribe to data refreshes for an Account + * + * Subscribes to periodic refreshes of data associated with a Financial Connections `Account`. When the account status is active, data is typically refreshed once a day. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'unsubscribe': { +/** + * Unsubscribe from data refreshes for an Account + * + * Unsubscribes from periodic refreshes of data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) } } }, 'sessions': { +/** + * Create a Session + * + * To launch the Financial Connections authorization flow, create a `Session`. The session’s `client_secret` can be used to launch the flow using Stripe.js. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())), '$session': { +/** + * Retrieve a Session + * + * Retrieves the details of a Financial Connections `Session` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())) } }, 'transactions': { +/** + * List Transactions + * + * Returns a list of Financial Connections `Transaction` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transacted_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -684,26 +1826,51 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'after': z.string() }).optional() }).parse), '$transaction': { +/** + * Retrieve a Transaction + * + * Retrieves the details of a Financial Connections `Transaction` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsTransaction.parse(await json())) } } }, 'forwarding': { 'requests': { +/** + * List all ForwardingRequests + * + * Lists all ForwardingRequest objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a ForwardingRequest + * + * Creates a ForwardingRequest object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())), '$id': { +/** + * Retrieve a ForwardingRequest + * + * Retrieves a ForwardingRequest object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())) } } }, 'identity': { 'verification_reports': { +/** + * List VerificationReports + * + * List all verification reports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -711,30 +1878,102 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['document', 'id_number']).optional(), verification_session: z.string().optional() }).parse), '$report': { +/** + * Retrieve a VerificationReport + * + * Retrieves an existing VerificationReport + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationReport.parse(await json())) } }, 'verification_sessions': { +/** + * List VerificationSessions + * + * Returns a list of VerificationSessions + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), related_customer: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'processing', 'requires_input', 'verified']).optional() }).parse), +/** + * Create a VerificationSession + * + * Creates a VerificationSession object. + * + * After the VerificationSession is created, display a verification modal using the session `client_secret` or send your users to the session’s `url`. + * + * If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode. + * + * Related guide: [Verify your users’ identity documents](/docs/identity/verify-identity-documents) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), '$session': { +/** + * Retrieve a VerificationSession + * + * Retrieves the details of a VerificationSession that was previously created. + * + * When the session status is `requires_input`, you can use this method to retrieve a valid + * `client_secret` or `url` to allow re-submission. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), +/** + * Update a VerificationSession + * + * Updates a VerificationSession object. + * + * When the session status is `requires_input`, you can use this method to update the + * verification check and options. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), 'cancel': { +/** + * Cancel a VerificationSession + * + * A VerificationSession object can be canceled when it is in `requires_input` [status](/docs/identity/how-sessions-work). + * + * Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](/docs/identity/verification-sessions#cancel). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) }, 'redact': { +/** + * Redact a VerificationSession + * + * Redact a VerificationSession to remove all collected information from Stripe. This will redact + * the VerificationSession and all objects related to it, including VerificationReports, Events, + * request logs, etc. + * + * A VerificationSession object can be redacted when it is in `requires_input` or `verified` + * [status](/docs/identity/how-sessions-work). Redacting a VerificationSession in `requires_action` + * state will automatically cancel it. + * + * The redaction process may take up to four days. When the redaction process is in progress, the + * VerificationSession’s `redaction.status` field will be set to `processing`; when the process is + * finished, it will change to `redacted` and an `identity.verification_session.redacted` event + * will be emitted. + * + * Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + * fields that contain personal data will be replaced by the string `[redacted]` or a similar + * placeholder. The `metadata` field will also be erased. Redacted objects cannot be updated or + * used for any purpose. + * + * [Learn more](/docs/identity/verification-sessions#redact). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) } } } }, 'invoice_payments': { +/** + * List all payments for an invoice + * + * When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -746,36 +1985,91 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'type': z.enum(['payment_intent', 'payment_record']) }).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'open', 'paid']).optional() }).parse), '$invoice_payment': { +/** + * Retrieve an InvoicePayment + * + * Retrieves the invoice payment with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.InvoicePayment.parse(await json())) } }, 'invoice_rendering_templates': { +/** + * List all invoice rendering templates + * + * List all templates, ordered by creation date, with the most recently created template appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'archived']).optional() }).parse), '$template': { +/** + * Retrieve an invoice rendering template + * + * Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), version: z.number().int().optional() }).parse).def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())), 'archive': { +/** + * Archive an invoice rendering template + * + * Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) }, 'unarchive': { +/** + * Unarchive an invoice rendering template + * + * Unarchive an invoice rendering template so it can be used on new Stripe objects again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) } } }, 'invoiceitems': { +/** + * List all invoice items + * + * Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), pending: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an invoice item + * + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), '$invoiceitem': { +/** + * Delete an invoice item + * + * Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoiceitem.parse(await json())), +/** + * Retrieve an invoice item + * + * Retrieves the invoice item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), +/** + * Update an invoice item + * + * Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())) } }, 'invoices': { +/** + * List all invoices + * + * You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -787,54 +2081,176 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['draft', 'open', 'paid', 'uncollectible', 'void']).optional(), subscription: z.string().optional() }).parse), +/** + * Create an invoice + * + * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize](#finalize_invoice) the invoice, which allows you to [pay](#pay_invoice) or [send](#send_invoice) the invoice to your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'create_preview': { +/** + * Create a preview invoice + * + * At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + * + * You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the `subscription_details.proration_date` parameter when doing the actual subscription update. + * + * The recommended way to get only the prorations being previewed on the invoice is to consider line items where `parent.subscription_item_details.proration` is `true`. + * + * Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount. + * + * Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'search': { +/** + * Search invoices + * + * Search for invoices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$invoice': { +/** + * Delete a draft invoice + * + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](#void_invoice). + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoice.parse(await json())), +/** + * Retrieve an invoice + * + * Retrieves the invoice with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoice.parse(await json())), +/** + * Update an invoice + * + * Draft invoices are fully editable. Once an invoice is [finalized](/docs/billing/invoices/workflow#finalized), + * monetary values, as well as `collection_method`, become uneditable. + * + * If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or [automatically reconciling](/docs/billing/invoices/reconciliation) invoices, pass + * `auto_advance=false`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'add_lines': { +/** + * Bulk add invoice line items + * + * Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'attach_payment': { +/** + * Attach a payment to an Invoice + * + * Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of `payments`. + * + * For the PaymentIntent, when the PaymentIntent’s status changes to `succeeded`, the payment is credited + * to the invoice, increasing its `amount_paid`. When the invoice is fully paid, the + * invoice’s status becomes `paid`. + * + * If the PaymentIntent’s status is already `succeeded` when it’s attached, it’s + * credited to the invoice immediately. + * + * See: [Partial payments](/docs/invoicing/partial-payments) to learn more. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'finalize': { +/** + * Finalize an invoice + * + * Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'lines': { +/** + * Retrieve an invoice's line items + * + * When retrieving an invoice, you’ll get a **lines** property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$line_item_id': { +/** + * Update an invoice's line item + * + * Updates an invoice’s line item. Some fields, such as `tax_amounts`, only live on the invoice line item, + * so they can only be updated through this endpoint. Other fields, such as `amount`, live on both the invoice + * item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + * Updating an invoice’s line item is only possible before the invoice is finalized. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LineItem.parse(await json())) } }, 'mark_uncollectible': { +/** + * Mark an invoice as uncollectible + * + * Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'pay': { +/** + * Pay an invoice + * + * Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'remove_lines': { +/** + * Bulk remove invoice line items + * + * Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'send': { +/** + * Send an invoice for manual payment + * + * Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + * + * Requests made in test-mode result in no emails being sent, despite sending an `invoice.sent` event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'update_lines': { +/** + * Bulk update invoice line items + * + * Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'void': { +/** + * Void an invoice + * + * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + * + * Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to [issue another invoice](#create_invoice) or [credit note](#create_credit_note) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * List all authorizations + * + * Returns a list of Issuing `Authorization` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -842,82 +2258,214 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'expired', 'pending', 'reversed']).optional() }).parse), '$authorization': { +/** + * Retrieve an authorization + * + * Retrieves an Issuing `Authorization` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), +/** + * Update an authorization + * + * Updates the specified Issuing `Authorization` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), 'approve': { +/** + * Approve an authorization + * + * [Deprecated] Approves a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real-time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'decline': { +/** + * Decline an authorization + * + * [Deprecated] Declines a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } }, 'cardholders': { +/** + * List all cardholders + * + * Returns a list of Issuing `Cardholder` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), phone_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'blocked', 'inactive']).optional(), type: z.enum(['company', 'individual']).optional() }).parse), +/** + * Create a cardholder + * + * Creates a new Issuing `Cardholder` object that can be issued cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), '$cardholder': { +/** + * Retrieve a cardholder + * + * Retrieves an Issuing `Cardholder` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), +/** + * Update a cardholder + * + * Updates the specified Issuing `Cardholder` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())) } }, 'cards': { +/** + * List all cards + * + * Returns a list of Issuing `Card` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), exp_month: z.number().int().optional(), exp_year: z.number().int().optional(), expand: z.array(z.string()).optional(), last4: z.string().optional(), limit: z.number().int().optional(), personalization_design: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'canceled', 'inactive']).optional(), type: z.enum(['physical', 'virtual']).optional() }).parse), +/** + * Create a card + * + * Creates an Issuing `Card` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())), '$card': { +/** + * Retrieve a card + * + * Retrieves an Issuing `Card` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCard.parse(await json())), +/** + * Update a card + * + * Updates the specified Issuing `Card` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of Issuing `Dispute` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['expired', 'lost', 'submitted', 'unsubmitted', 'won']).optional(), transaction: z.string().optional() }).parse), +/** + * Create a dispute + * + * Creates an Issuing `Dispute` object. Individual pieces of evidence within the `evidence` object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves an Issuing `Dispute` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), +/** + * Update a dispute + * + * Updates the specified Issuing `Dispute` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the `evidence` object can be unset by passing in an empty string. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), 'submit': { +/** + * Submit a dispute + * + * Submits an Issuing `Dispute` to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())) } } }, 'personalization_designs': { +/** + * List all personalization designs + * + * Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_keys: z.array(z.string()).optional(), preferences: z.object({ 'is_default': z.boolean().optional(), 'is_platform_default': z.boolean().optional() }).optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'rejected', 'review']).optional() }).parse), +/** + * Create a personalization design + * + * Creates a personalization design object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), '$personalization_design': { +/** + * Retrieve a personalization design + * + * Retrieves a personalization design object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), +/** + * Update a personalization design + * + * Updates a card personalization object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } }, 'physical_bundles': { +/** + * List all physical bundles + * + * Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'review']).optional(), type: z.enum(['custom', 'standard']).optional() }).parse), '$physical_bundle': { +/** + * Retrieve a physical bundle + * + * Retrieves a physical bundle object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPhysicalBundle.parse(await json())) } }, 'settlements': { '$settlement': { +/** + * Retrieve a settlement + * + * Retrieves an Issuing `Settlement` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingSettlement.parse(await json())), +/** + * Update a settlement + * + * Updates the specified Issuing `Settlement` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingSettlement.parse(await json())) } }, 'tokens': { +/** + * List all issuing tokens for card + * + * Lists all Issuing `Token` objects for a given card. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -925,11 +2473,26 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'deleted', 'requested', 'suspended']).optional() }).parse), '$token': { +/** + * Retrieve an issuing token + * + * Retrieves an Issuing `Token` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingToken.parse(await json())), +/** + * Update a token status + * + * Attempts to update the specified Issuing `Token` object to the status specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingToken.parse(await json())) } }, 'transactions': { +/** + * List all transactions + * + * Returns a list of Issuing `Transaction` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -937,154 +2500,527 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['capture', 'refund']).optional() }).parse), '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves an Issuing `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())), +/** + * Update a transaction + * + * Updates the specified Issuing `Transaction` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } }, 'link_account_sessions': { +/** + * Create a Session + * + * To launch the Financial Connections authorization flow, create a `Session`. The session’s `client_secret` can be used to launch the flow using Stripe.js. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())), '$session': { +/** + * Retrieve a Session + * + * Retrieves the details of a Financial Connections `Session` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())) } }, 'linked_accounts': { +/** + * List Accounts + * + * Returns a list of Financial Connections `Account` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account_holder: z.object({ 'account': z.string().optional(), 'customer': z.string().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), session: z.string().optional(), starting_after: z.string().optional() }).parse), '$account': { +/** + * Retrieve an Account + * + * Retrieves the details of an Financial Connections `Account`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())), 'disconnect': { +/** + * Disconnect an Account + * + * Disables your access to a Financial Connections `Account`. You will no longer be able to access data associated with the account (e.g. balances, transactions). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'owners': { +/** + * List Account Owners + * + * Lists all owners for a given `Account` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), ownership: z.string(), starting_after: z.string().optional() }).parse) }, 'refresh': { +/** + * Refresh Account data + * + * Refreshes the data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) } } }, 'mandates': { '$mandate': { +/** + * Retrieve a Mandate + * + * Retrieves a Mandate object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Mandate.parse(await json())) } }, 'payment_attempt_records': { +/** + * List Payment Attempt Records + * + * List all the Payment Attempt Records attached to the specified Payment Record. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_record: z.string(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a Payment Attempt Record + * + * Retrieves a Payment Attempt Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentAttemptRecord.parse(await json())) } }, 'payment_intents': { +/** + * List all PaymentIntents + * + * Returns a list of PaymentIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a PaymentIntent + * + * Creates a PaymentIntent object. + * + * After the PaymentIntent is created, attach a payment method and [confirm](/docs/api/payment_intents/confirm) + * to continue the payment. Learn more about the available payment flows + * with the Payment Intents API. + * + * When you use `confirm=true` during creation, it’s equivalent to creating + * and confirming the PaymentIntent in the same call. You can use any parameters + * available in the [confirm API](/docs/api/payment_intents/confirm) when you supply + * `confirm=true`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'search': { +/** + * Search PaymentIntents + * + * Search for PaymentIntents you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$intent': { +/** + * Retrieve a PaymentIntent + * + * Retrieves the details of a PaymentIntent that has previously been created. + * + * You can retrieve a PaymentIntent client-side using a publishable key when the `client_secret` is in the query string. + * + * If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](#payment_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), +/** + * Update a PaymentIntent + * + * Updates properties on a PaymentIntent object without confirming. + * + * 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](/docs/api/payment_intents/confirm) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'amount_details_line_items': { +/** + * List all PaymentIntent LineItems + * + * Lists all LineItems of a given PaymentIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'apply_customer_balance': { +/** + * Reconcile a customer_balance PaymentIntent + * + * Manually reconcile the remaining amount for a `customer_balance` PaymentIntent. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'cancel': { +/** + * Cancel a PaymentIntent + * + * You can cancel a PaymentIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_action` or, [in rare cases](/docs/payments/intents), `processing`. + * + * After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a `status` of `requires_capture`, the remaining `amount_capturable` is automatically refunded. + * + * You can’t cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'capture': { +/** + * Capture a PaymentIntent + * + * Capture the funds of an existing uncaptured PaymentIntent when its status is `requires_capture`. + * + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + * + * Learn more about [separate authorization and capture](/docs/payments/capture-later). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a PaymentIntent + * + * Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment. + * + * If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If payment fails, + * the PaymentIntent transitions to the `requires_payment_method` status or the + * `canceled` status if the confirmation limit is reached. If + * payment succeeds, the PaymentIntent will transition to the `succeeded` + * status (or `requires_capture`, if `capture_method` is set to `manual`). + * + * If the `confirmation_method` is `automatic`, payment may be attempted + * using our [client SDKs](/docs/stripe-js/reference#stripe-handle-card-payment) + * and the PaymentIntent’s [client_secret](#payment_intent_object-client_secret). + * After `next_action`s are handled by the client, no additional + * confirmation is required to complete the payment. + * + * If the `confirmation_method` is `manual`, all payment attempts must be + * initiated using a secret key. + * + * If any actions are required for the payment, the PaymentIntent will + * return to the `requires_confirmation` state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. + * + * There is a variable upper limit on how many times a PaymentIntent can be confirmed. + * After this limit is reached, any further calls to this endpoint will + * transition the PaymentIntent to the `canceled` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'increment_authorization': { +/** + * Increment an authorization + * + * Perform an incremental authorization on an eligible + * [PaymentIntent](/docs/api/payment_intents/object). To be eligible, the + * PaymentIntent’s status must be `requires_capture` and + * [incremental_authorization_supported](/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + * must be `true`. + * + * Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher `amount` provided. Similar to the + * initial authorization, incremental authorizations can be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount. + * + * If the incremental authorization succeeds, the PaymentIntent object + * returns with the updated + * [amount](/docs/api/payment_intents/object#payment_intent_object-amount). + * If the incremental authorization fails, a + * [card_declined](/docs/error-codes#card-declined) error returns, and no other + * fields on the PaymentIntent or Charge update. The PaymentIntent + * object remains capturable for the previously authorized amount. + * + * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * After it’s captured, a PaymentIntent can no longer be incremented. + * + * Learn more about [incremental authorizations](/docs/terminal/features/incremental-authorizations). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a PaymentIntent + * + * Verifies microdeposits on a PaymentIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) } } }, 'payment_links': { +/** + * List all payment links + * + * Returns a list of your payment links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment link + * + * Creates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), '$payment_link': { +/** + * Retrieve payment link + * + * Retrieve a payment link. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentLink.parse(await json())), +/** + * Update a payment link + * + * Updates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), 'line_items': { +/** + * Retrieve a payment link's line items + * + * When retrieving a payment link, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'payment_method_configurations': { +/** + * List payment method configurations + * + * List payment method configurations + */ 'GET': f.builder().def_json().def_searchparams(z.object({ application: z.union([z.string(), z.enum([''])]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method configuration + * + * Creates a payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve payment method configuration + * + * Retrieve payment method configuration + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), +/** + * Update payment method configuration + * + * Update payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())) } }, 'payment_method_domains': { +/** + * List payment method domains + * + * Lists the details of existing payment method domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), enabled: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method domain + * + * Creates a payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), '$payment_method_domain': { +/** + * Retrieve a payment method domain + * + * Retrieves the details of an existing payment method domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), +/** + * Update a payment method domain + * + * Updates an existing payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), 'validate': { +/** + * Validate an existing payment method domain + * + * Some payment methods might require additional steps to register a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain. + * The payment method doesn’t appear in Elements or Embedded Checkout for this domain until it is active. + * + * To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint. + * + * Related guides: [Payment method domains](/docs/payments/payment-methods/pmd-registration). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())) } } }, 'payment_methods': { +/** + * List PaymentMethods + * + * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer’s PaymentMethods](/docs/api/payment_methods/customer_list) API instead. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), +/** + * Shares a PaymentMethod + * + * Creates a PaymentMethod object. Read the [Stripe.js reference](/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. + * + * Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents](/docs/payments/accept-a-payment) API to accept a payment immediately or the [SetupIntent](/docs/payments/save-and-reuse) API to collect payment method details ahead of a future payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), '$payment_method': { +/** + * Retrieve a PaymentMethod + * + * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer’s PaymentMethods](/docs/api/payment_methods/customer) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), +/** + * Update a PaymentMethod + * + * Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), 'attach': { +/** + * Attach a PaymentMethod to a Customer + * + * Attaches a PaymentMethod object to a Customer. + * + * To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](/docs/api/setup_intents) + * or a PaymentIntent with [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the `/v1/payment_methods/:id/attach` + * endpoint without first using a SetupIntent or PaymentIntent with `setup_future_usage` does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See [Optimizing cards for future payments](/docs/payments/payment-intents#future-usage) for more information about setting up + * future payments. + * + * To use this PaymentMethod as the default for invoice or subscription payments, + * set [`invoice_settings.default_payment_method`](/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + * on the Customer to the PaymentMethod’s ID. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) }, 'detach': { +/** + * Detach a PaymentMethod from a Customer + * + * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } } }, 'payment_records': { 'report_payment': { +/** + * Report a payment + * + * Report a new Payment Record. You may report a Payment Record as it is + * initialized and later report updates through the other report_* methods, or report Payment + * Records in a terminal state directly, through this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, '$id': { +/** + * Retrieve a Payment Record + * + * Retrieves a Payment Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentRecord.parse(await json())), 'report_payment_attempt': { +/** + * Report a payment attempt + * + * Report a new payment attempt on the specified Payment Record. A new payment + * attempt can only be specified if all other payment attempts are canceled or failed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_canceled': { +/** + * Report payment attempt canceled + * + * Report that the most recent payment attempt on the specified Payment Record + * was canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_failed': { +/** + * Report payment attempt failed + * + * Report that the most recent payment attempt on the specified Payment Record + * failed or errored. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_guaranteed': { +/** + * Report payment attempt guaranteed + * + * Report that the most recent payment attempt on the specified Payment Record + * was guaranteed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_informational': { +/** + * Report payment attempt informational + * + * Report informational updates on the specified Payment Record. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_refund': { +/** + * Report a refund + * + * Report that the most recent payment attempt on the specified Payment Record + * was refunded. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) } } }, 'payouts': { +/** + * List all payouts + * + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ arrival_date: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1096,33 +3032,94 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.string().optional() }).parse), +/** + * Create a payout + * + * To send funds to your own bank account, create a new payout object. Your [Stripe balance](#balance) must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. + * + * If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. + * + * If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](#balance_object) details available and pending amounts by source type. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), '$payout': { +/** + * Retrieve a payout + * + * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Payout.parse(await json())), +/** + * Update a payout + * + * Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), 'cancel': { +/** + * Cancel a payout + * + * You can cancel a previously created payout if its status is `pending`. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) }, 'reverse': { +/** + * Reverse a payout + * + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the `pending` status, use `/v1/payouts/:id/cancel` instead. + * + * By requesting a reversal through `/v1/payouts/:id/reverse`, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) } } }, 'plans': { +/** + * List all plans + * + * Returns a list of your plans. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), product: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a plan + * + * You can now model subscriptions more flexibly using the [Prices API](#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())), '$plan': { +/** + * Delete a plan + * + * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPlan.parse(await json())), +/** + * Retrieve a plan + * + * Retrieves the plan with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Plan.parse(await json())), +/** + * Update a plan + * + * Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())) } }, 'prices': { +/** + * List all prices + * + * Returns a list of your active prices, excluding [inline prices](/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set `active` to false. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1133,83 +3130,234 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'meter': z.string().optional(), 'usage_type': z.enum(['licensed', 'metered']).optional() }).optional(), starting_after: z.string().optional(), type: z.enum(['one_time', 'recurring']).optional() }).parse), +/** + * Create a price + * + * Creates a new [Price](https://docs.stripe.com/api/prices) for an existing [Product](https://docs.stripe.com/api/products). The Price can be recurring or one-time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())), 'search': { +/** + * Search prices + * + * Search for prices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$price': { +/** + * Retrieve a price + * + * Retrieves the price with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Price.parse(await json())), +/** + * Update a price + * + * Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())) } }, 'products': { +/** + * List all products + * + * Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), ids: z.array(z.string()).optional(), limit: z.number().int().optional(), shippable: z.boolean().optional(), starting_after: z.string().optional(), url: z.string().optional() }).parse), +/** + * Create a product + * + * Creates a new product object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())), 'search': { +/** + * Search products + * + * Search for products you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$id': { +/** + * Delete a product + * + * Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with `type=good` is only possible if it has no SKUs associated with it. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProduct.parse(await json())), +/** + * Retrieve a product + * + * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Product.parse(await json())), +/** + * Update a product + * + * Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())) }, '$product': { 'features': { +/** + * List all features attached to a product + * + * Retrieve a list of features for a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Attach a feature to a product + * + * Creates a product_feature, which represents a feature attachment to a product + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ProductFeature.parse(await json())), '$id': { +/** + * Remove a feature from a product + * + * Deletes the feature attachment to a product + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProductFeature.parse(await json())), +/** + * Retrieve a product_feature + * + * Retrieves a product_feature, which represents a feature attachment to a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ProductFeature.parse(await json())) } } } }, 'promotion_codes': { +/** + * List all promotion codes + * + * Returns a list of your promotion codes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), code: z.string().optional(), coupon: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a promotion code + * + * A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())), '$promotion_code': { +/** + * Retrieve a promotion code + * + * Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing `code` use [list](/docs/api/promotion_codes/list) with the desired `code`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PromotionCode.parse(await json())), +/** + * Update a promotion code + * + * Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())) } }, 'quotes': { +/** + * List all quotes + * + * Returns a list of your quotes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['accepted', 'canceled', 'draft', 'open']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a quote + * + * A quote models prices and services for a customer. Default options for `header`, `description`, `footer`, and `expires_at` can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), '$quote': { +/** + * Retrieve a quote + * + * Retrieves the quote with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Quote.parse(await json())), +/** + * Update a quote + * + * A quote models prices and services for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), 'accept': { +/** + * Accept a quote + * + * Accepts the specified quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'cancel': { +/** + * Cancel a quote + * + * Cancels the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'computed_upfront_line_items': { +/** + * Retrieve a quote's upfront line items + * + * When retrieving a quote, there is an includable [**computed.upfront.line_items**](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'finalize': { +/** + * Finalize a quote + * + * Finalizes the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'line_items': { +/** + * Retrieve a quote's line items + * + * When retrieving a quote, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'pdf': { +/** + * Download quote PDF + * + * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse) } } }, 'radar': { 'early_fraud_warnings': { +/** + * List all early fraud warnings + * + * Returns a list of early fraud warnings. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1217,74 +3365,195 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$early_fraud_warning': { +/** + * Retrieve an early fraud warning + * + * Retrieves the details of an early fraud warning that has previously been created. + * + * Please refer to the [early fraud warning](#early_fraud_warning_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarEarlyFraudWarning.parse(await json())) } }, 'value_list_items': { +/** + * List all value list items + * + * Returns a list of `ValueListItem` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), value: z.string().optional(), value_list: z.string() }).parse), +/** + * Create a value list item + * + * Creates a new `ValueListItem` object, which is added to the specified parent value list. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())), '$item': { +/** + * Delete a value list item + * + * Deletes a `ValueListItem` object, removing it from its parent value list. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueListItem.parse(await json())), +/** + * Retrieve a value list item + * + * Retrieves a `ValueListItem` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())) } }, 'value_lists': { +/** + * List all value lists + * + * Returns a list of `ValueList` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alias: z.string().optional(), contains: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a value list + * + * Creates a new `ValueList` object, which can then be referenced in rules. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())), '$value_list': { +/** + * Delete a value list + * + * Deletes a `ValueList` object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueList.parse(await json())), +/** + * Retrieve a value list + * + * Retrieves a `ValueList` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueList.parse(await json())), +/** + * Update a value list + * + * Updates a `ValueList` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that `item_type` is immutable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())) } } }, 'refunds': { +/** + * List all refunds + * + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create customer balance refund + * + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. + * + * You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), '$refund': { +/** + * Retrieve a refund + * + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())), +/** + * Update a refund + * + * Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged. + * + * This request only accepts `metadata` as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), 'cancel': { +/** + * Cancel a refund + * + * Cancels a refund with a status of `requires_action`. + * + * You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the `requires_action` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } }, 'reporting': { 'report_runs': { +/** + * List all Report Runs + * + * Returns a list of Report Runs, with the most recent appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Report Run + * + * Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())), '$report_run': { +/** + * Retrieve a Report Run + * + * Retrieves the details of an existing Report Run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())) } }, 'report_types': { +/** + * List all Report Types + * + * Returns a full list of Report Types. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$report_type': { +/** + * Retrieve a Report Type + * + * Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportType.parse(await json())) } } }, 'reviews': { +/** + * List all open reviews + * + * Returns a list of `Review` objects that have `open` set to `true`. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1292,13 +3561,28 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$review': { +/** + * Retrieve a review + * + * Retrieves a `Review` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Review.parse(await json())), 'approve': { +/** + * Approve a review + * + * Approves a `Review` object, closing it and removing it from the list of reviews. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Review.parse(await json())) } } }, 'setup_attempts': { +/** + * List all SetupAttempts + * + * Returns a list of SetupAttempts that associate with a provided SetupIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1307,84 +3591,239 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), setup_intent: z.string(), starting_after: z.string().optional() }).parse) }, 'setup_intents': { +/** + * List all SetupIntents + * + * Returns a list of SetupIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ attach_to_self: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_method: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a SetupIntent + * + * Creates a SetupIntent object. + * + * After you create the SetupIntent, attach a payment method and [confirm](/docs/api/setup_intents/confirm) + * it to collect any required permissions to charge the payment method later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), '$intent': { +/** + * Retrieve a SetupIntent + * + * Retrieves the details of a SetupIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the `client_secret` is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](#setup_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SetupIntent.parse(await json())), +/** + * Update a SetupIntent + * + * Updates a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), 'cancel': { +/** + * Cancel a SetupIntent + * + * You can cancel a SetupIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_confirmation`, or `requires_action`. + * + * After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can’t cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a SetupIntent + * + * Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website. + * + * If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * `succeeded` status. + * + * Otherwise, it will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If setup fails, + * the SetupIntent will transition to the + * `requires_payment_method` status or the `canceled` status if the + * confirmation limit is reached. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a SetupIntent + * + * Verifies microdeposits on a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) } } }, 'shipping_rates': { +/** + * List all shipping rates + * + * Returns a list of your shipping rates. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a shipping rate + * + * Creates a new shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())), '$shipping_rate_token': { +/** + * Retrieve a shipping rate + * + * Returns the shipping rate object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ShippingRate.parse(await json())), +/** + * Update a shipping rate + * + * Updates an existing shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())) } }, 'sigma': { 'saved_queries': { '$id': { +/** + * Update an existing Sigma Query + * + * Update an existing Sigma query that previously exists + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SigmaSigmaApiQuery.parse(await json())) } }, 'scheduled_query_runs': { +/** + * List all scheduled query runs + * + * Returns a list of scheduled query runs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$scheduled_query_run': { +/** + * Retrieve a scheduled query run + * + * Retrieves the details of an scheduled query run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ScheduledQueryRun.parse(await json())) } } }, 'sources': { +/** + * Shares a source + * + * Creates a new source object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), '$source': { +/** + * Retrieve a source + * + * Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Source.parse(await json())), +/** + * Update a source + * + * Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts the `metadata` and `owner` as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](/docs/sources) for more detail. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), 'mandate_notifications': { '$mandate_notification': { +/** + * Retrieve a Source MandateNotification + * + * Retrieves a new Source MandateNotification. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SourceMandateNotification.parse(await json())) } }, 'source_transactions': { +/** + * List source transactions for a given source. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$source_transaction': { +/** + * Retrieve a source transaction + * + * Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SourceTransaction.parse(await json())) } }, 'verify': { +/** + * Verify a given source. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())) } } }, 'subscription_items': { +/** + * List all subscription items + * + * Returns a list of your subscription items for a given subscription. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), subscription: z.string() }).parse), +/** + * Create a subscription item + * + * Adds a new item to an existing subscription. No existing items will be changed or replaced. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), '$item': { +/** + * Delete a subscription item + * + * Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedSubscriptionItem.parse(await json())), +/** + * Retrieve a subscription item + * + * Retrieves the subscription item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), +/** + * Update a subscription item + * + * Updates the plan or quantity of an item on a current subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())) } }, 'subscription_schedules': { +/** + * List all schedules + * + * Retrieves the list of your subscription schedules. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ canceled_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1406,19 +3845,49 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), scheduled: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a schedule + * + * Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), '$schedule': { +/** + * Retrieve a schedule + * + * Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), +/** + * Update a schedule + * + * Updates an existing subscription schedule. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), 'cancel': { +/** + * Cancel a schedule + * + * Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is `not_started` or `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) }, 'release': { +/** + * Release a schedule + * + * Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is `not_started` or `active`. If the subscription schedule is currently associated with a subscription, releasing it will remove its `subscription` property and set the subscription’s ID to the `released_subscription` property. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) } } }, 'subscriptions': { +/** + * List subscriptions + * + * By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify `status=canceled`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ automatic_tax: z.object({ 'enabled': z.boolean() }).optional(), collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ @@ -1437,23 +3906,96 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), price: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a subscription + * + * Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. + * + * When you create a subscription with `collection_method=charge_automatically`, the first invoice is finalized as part of the request. + * The `payment_behavior` parameter determines the exact behavior of the initial payment. + * + * To start subscriptions where the first invoice always begins in a `draft` status, use [subscription schedules](/docs/billing/subscriptions/subscription-schedules#managing) instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'search': { +/** + * Search subscriptions + * + * Search for subscriptions you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$subscription_exposed_id': { +/** + * Cancel a subscription + * + * Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its [metadata](/metadata). + * + * Any pending invoice items that you’ve created are still charged at the end of the period, unless manually [deleted](#delete_invoiceitem). If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if `invoice_now` and `prorate` are both set to true. + * + * By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Retrieve a subscription + * + * Retrieves the subscription with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Update a subscription + * + * Updates an existing subscription to match the specified parameters. + * When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + * To preview how the proration is calculated, use the [create preview](/docs/api/invoices/create_preview) endpoint. + * + * By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. + * + * Switching prices does not normally change the billing date or generate an immediate charge unless: + * + * - The billing interval is changed (for example, from monthly to yearly). + * + * - The subscription moves from free to paid. + * + * - A trial starts or ends. + * + * In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). + * + * If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass `create_prorations`, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually [invoice the customer](/docs/api/invoices/create). + * + * If you don’t want to prorate, set the `proration_behavior` option to `none`. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription. + * + * Updating the quantity on a subscription many times in an hour may result in [rate limiting](/docs/rate-limits). If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](/docs/billing/subscriptions/usage-based) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'discount': { +/** + * Delete a subscription discount + * + * Removes the currently applied discount on a subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())) } }, '$subscription': { 'migrate': { +/** + * Migrate a subscription + * + * Upgrade the billing_mode of an existing subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) }, 'resume': { +/** + * Resume a subscription + * + * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become `active`, and if payment fails the subscription will be `past_due`. The resumption invoice will void automatically if not paid by the expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) } } @@ -1461,130 +4003,378 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'tax': { 'associations': { 'find': { +/** + * Find a Tax Association + * + * Finds a tax association object by PaymentIntent id. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), payment_intent: z.string() }).parse).def_response(async ({ json }) => Model.TaxAssociation.parse(await json())) } }, 'calculations': { +/** + * Create a Tax Calculation + * + * Calculates tax based on the input and returns a Tax `Calculation` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), '$calculation': { +/** + * Retrieve a Tax Calculation + * + * Retrieves a Tax `Calculation` object, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), 'line_items': { +/** + * Retrieve a calculation's line items + * + * Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'registrations': { +/** + * List registrations + * + * Returns a list of Tax `Registration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'expired', 'scheduled']).optional() }).parse), +/** + * Create a registration + * + * Creates a new Tax `Registration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), '$id': { +/** + * Retrieve a registration + * + * Returns a Tax `Registration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), +/** + * Update a registration + * + * Updates an existing Tax `Registration` object. + * + * A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting `expires_at`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())) } }, 'settings': { +/** + * Retrieve settings + * + * Retrieves Tax `Settings` for a merchant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxSettings.parse(await json())), +/** + * Update settings + * + * Updates Tax `Settings` parameters used in tax calculations. All parameters are editable but none can be removed once set. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxSettings.parse(await json())) }, 'transactions': { 'create_from_calculation': { +/** + * Create a transaction from a calculation + * + * Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, 'create_reversal': { +/** + * Create a reversal transaction + * + * Partially or fully reverses a previously created `Transaction`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves a Tax `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxTransaction.parse(await json())), 'line_items': { +/** + * Retrieve a transaction's line items + * + * Retrieves the line items of a committed standalone transaction as a collection. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } } }, 'tax_codes': { +/** + * List all tax codes + * + * A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a tax code + * + * Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCode.parse(await json())) } }, 'tax_ids': { +/** + * List all tax IDs + * + * Returns a list of tax IDs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), owner: z.object({ 'account': z.string().optional(), 'customer': z.string().optional(), 'type': z.enum(['account', 'application', 'customer', 'self']) }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax ID + * + * Creates a new account or customer `tax_id` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a tax ID + * + * Deletes an existing account or customer `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a tax ID + * + * Retrieves an account or customer `tax_id` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } }, 'tax_rates': { +/** + * List all tax rates + * + * Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), inclusive: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax rate + * + * Creates a new tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())), '$tax_rate': { +/** + * Retrieve a tax rate + * + * Retrieves a tax rate with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRate.parse(await json())), +/** + * Update a tax rate + * + * Updates an existing tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())) } }, 'terminal': { 'configurations': { +/** + * List all Configurations + * + * Returns a list of `Configuration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_account_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Configuration + * + * Creates a new `Configuration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConfiguration.parse(await json())), '$configuration': { +/** + * Delete a Configuration + * + * Deletes a `Configuration` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalConfiguration.parse(await json())), +/** + * Retrieve a Configuration + * + * Retrieves a `Configuration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Configuration + * + * Updates a new `Configuration` object. + */ 'POST': f.builder().def_json() } }, 'connection_tokens': { +/** + * Create a Connection Token + * + * To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConnectionToken.parse(await json())) }, 'locations': { +/** + * List all Locations + * + * Returns a list of `Location` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Location + * + * Creates a new `Location` object. + * For further details, including which address fields are required in each country, see the [Manage locations](/docs/terminal/fleet/locations) guide. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalLocation.parse(await json())), '$location': { +/** + * Delete a Location + * + * Deletes a `Location` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalLocation.parse(await json())), +/** + * Retrieve a Location + * + * Retrieves a `Location` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Location + * + * Updates a `Location` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json() } }, 'onboarding_links': { +/** + * Create an Onboarding Link + * + * Creates a new `OnboardingLink` object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalOnboardingLink.parse(await json())) }, 'readers': { +/** + * List all Readers + * + * Returns a list of `Reader` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ device_type: z.enum(['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'verifone_P400']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), location: z.string().optional(), serial_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['offline', 'online']).optional() }).parse), +/** + * Create a Reader + * + * Creates a new `Reader` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())), '$reader': { +/** + * Delete a Reader + * + * Deletes a `Reader` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalReader.parse(await json())), +/** + * Retrieve a Reader + * + * Retrieves a `Reader` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Reader + * + * Updates a `Reader` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json(), 'cancel_action': { +/** + * Cancel the current reader action + * + * Cancels the current reader action. See [Programmatic Cancellation](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_inputs': { +/** + * Collect inputs using a Reader + * + * Initiates an [input collection flow](/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_payment_method': { +/** + * Hand off a PaymentIntent to a Reader and collect card details + * + * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'confirm_payment_intent': { +/** + * Confirm a PaymentIntent on the Reader + * + * Finalizes a payment on a Reader. See [Confirming a Payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_payment_intent': { +/** + * Hand-off a PaymentIntent to a Reader + * + * Initiates a payment flow on a Reader. See [process the payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_setup_intent': { +/** + * Hand-off a SetupIntent to a Reader + * + * Initiates a SetupIntent flow on a Reader. See [Save directly without charging](/docs/terminal/features/saving-payment-details/save-directly) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'refund_payment': { +/** + * Refund a Charge or a PaymentIntent in-person + * + * Initiates an in-person refund on a Reader. See [Refund an Interac Payment](/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'set_reader_display': { +/** + * Set reader display + * + * Sets the reader display to show [cart details](/docs/terminal/features/display). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } @@ -1592,37 +4382,82 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'test_helpers': { 'confirmation_tokens': { +/** + * Create a test Confirmation Token + * + * Creates a test mode Confirmation Token server side for your integration tests. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) }, 'customers': { '$customer': { 'fund_cash_balance': { +/** + * Fund a test mode cash balance + * + * Create an incoming testmode bank transfer + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * Create a test-mode authorization + * + * Create a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), '$authorization': { 'capture': { +/** + * Capture a test-mode authorization + * + * Capture a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'expire': { +/** + * Expire a test-mode authorization + * + * Expire a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'finalize_amount': { +/** + * Finalize a test-mode authorization's amount + * + * Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'fraud_challenges': { 'respond': { +/** + * Respond to fraud challenge + * + * Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } }, 'increment': { +/** + * Increment a test-mode authorization + * + * Increment a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'reverse': { +/** + * Reverse a test-mode authorization + * + * Reverse a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } @@ -1631,18 +4466,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$card': { 'shipping': { 'deliver': { +/** + * Deliver a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `delivered`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'fail': { +/** + * Fail a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `failure`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'return': { +/** + * Return a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `returned`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'ship': { +/** + * Ship a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `shipped`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'submit': { +/** + * Submit a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `submitted`. This method requires Stripe Version ‘2024-09-30.acacia’ or later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } } @@ -1651,33 +4511,73 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'personalization_designs': { '$personalization_design': { 'activate': { +/** + * Activate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'deactivate': { +/** + * Deactivate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `inactive`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'reject': { +/** + * Reject a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `rejected`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } } }, 'settlements': { +/** + * Create a test-mode settlement + * + * Allows the user to create an Issuing settlement. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingSettlement.parse(await json())), '$settlement': { 'complete': { +/** + * Complete a test-mode settlement + * + * Allows the user to mark an Issuing settlement as complete. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingSettlement.parse(await json())) } } }, 'transactions': { 'create_force_capture': { +/** + * Create a test-mode force capture + * + * Allows the user to capture an arbitrary amount, also known as a forced capture. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, 'create_unlinked_refund': { +/** + * Create a test-mode unlinked refund + * + * Allows the user to refund an arbitrary amount, also known as a unlinked refund. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, '$transaction': { 'refund': { +/** + * Refund a test-mode transaction + * + * Refund a test-mode Transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } @@ -1686,6 +4586,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'refunds': { '$refund': { 'expire': { +/** + * Expire a pending refund. + * + * Expire a refund with a status of `requires_action`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -1694,24 +4599,64 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'readers': { '$reader': { 'present_payment_method': { +/** + * Simulate presenting a payment method + * + * Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'succeed_input_collection': { +/** + * Simulate a successful input collection + * + * Use this endpoint to trigger a successful input collection on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'timeout_input_collection': { +/** + * Simulate an input collection timeout + * + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } } }, 'test_clocks': { +/** + * List all test clocks + * + * Returns a list of your test clocks. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a test clock + * + * Creates a new test clock that can be attached to new customers and quotes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), '$test_clock': { +/** + * Delete a test clock + * + * Deletes a test clock. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTestHelpersTestClock.parse(await json())), +/** + * Retrieve a test clock + * + * Retrieves a test clock. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), 'advance': { +/** + * Advance a test clock + * + * Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to `Ready`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())) } } @@ -1720,53 +4665,124 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'inbound_transfers': { '$id': { 'fail': { +/** + * Test mode: Fail an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `failed` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an InboundTransfer + * + * Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the `succeeded` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'succeed': { +/** + * Test mode: Succeed an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `succeeded` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { '$id': { +/** + * Test mode: Update an OutboundPayment + * + * Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `failed` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `returned` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { '$outbound_transfer': { +/** + * Test mode: Update an OutboundTransfer + * + * Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `failed` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `returned` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * Test mode: Create a ReceivedCredit + * + * Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) }, 'received_debits': { +/** + * Test mode: Create a ReceivedDebit + * + * Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } } }, 'tokens': { +/** + * Create a CVC update token + * + * Creates a single-use token that represents a bank account’s details. + * You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](#accounts) where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Token.parse(await json())), '$token': { +/** + * Retrieve a token + * + * Retrieves the token with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Token.parse(await json())) } }, 'topups': { +/** + * List all top-ups + * + * Returns a list of top-ups. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1778,35 +4794,103 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'pending', 'succeeded']).optional() }).parse), +/** + * Create a top-up + * + * Top up the balance of an account + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), '$topup': { +/** + * Retrieve a top-up + * + * Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Topup.parse(await json())), +/** + * Update a top-up + * + * Updates the metadata of a top-up. Other top-up details are not editable by design. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), 'cancel': { +/** + * Cancel a top-up + * + * Cancels a top-up. Only pending top-ups can be canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())) } } }, 'transfers': { +/** + * List all transfers + * + * Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * Create a transfer + * + * To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](#balance) must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), '$id': { 'reversals': { +/** + * List all reversals + * + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional reversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a transfer reversal + * + * When you create a new reversal, you must specify a transfer to create it on. + * + * When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. + * + * Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } }, '$transfer': { +/** + * Retrieve a transfer + * + * Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Transfer.parse(await json())), +/** + * Update a transfer + * + * Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts only metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), 'reversals': { '$id': { +/** + * Retrieve a reversal + * + * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TransferReversal.parse(await json())), +/** + * Update a reversal + * + * Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata and description as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } } @@ -1814,91 +4898,241 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'treasury': { 'credit_reversals': { +/** + * List all CreditReversals + * + * Returns a list of CreditReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_credit: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'posted', 'processing']).optional() }).parse), +/** + * Create a CreditReversal + * + * Reverses a ReceivedCredit and creates a CreditReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())), '$credit_reversal': { +/** + * Retrieve a CreditReversal + * + * Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())) } }, 'debit_reversals': { +/** + * List all DebitReversals + * + * Returns a list of DebitReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_debit: z.string().optional(), resolution: z.enum(['lost', 'won']).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'completed', 'processing']).optional() }).parse), +/** + * Create a DebitReversal + * + * Reverses a ReceivedDebit and creates a DebitReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())), '$debit_reversal': { +/** + * Retrieve a DebitReversal + * + * Retrieves a DebitReversal object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())) } }, 'financial_accounts': { +/** + * List all FinancialAccounts + * + * Returns a list of FinancialAccounts. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'open']).optional() }).parse), +/** + * Create a FinancialAccount + * + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), '$financial_account': { +/** + * Retrieve a FinancialAccount + * + * Retrieves the details of a FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), +/** + * Update a FinancialAccount + * + * Updates the details of a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), 'close': { +/** + * Close a FinancialAccount + * + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())) }, 'features': { +/** + * Retrieve FinancialAccount Features + * + * Retrieves Features information associated with the FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())), +/** + * Update FinancialAccount Features + * + * Updates the Features associated with a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())) } } }, 'inbound_transfers': { +/** + * List all InboundTransfers + * + * Returns a list of InboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'processing', 'succeeded']).optional() }).parse), +/** + * Create an InboundTransfer + * + * Creates an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())), '$id': { +/** + * Retrieve an InboundTransfer + * + * Retrieves the details of an existing InboundTransfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, '$inbound_transfer': { 'cancel': { +/** + * Cancel an InboundTransfer + * + * Cancels an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { +/** + * List all OutboundPayments + * + * Returns a list of OutboundPayments sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundPayment + * + * Creates an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), '$id': { +/** + * Retrieve an OutboundPayment + * + * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'cancel': { +/** + * Cancel an OutboundPayment + * + * Cancel an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { +/** + * List all OutboundTransfers + * + * Returns a list of OutboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundTransfer + * + * Creates an OutboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), '$outbound_transfer': { +/** + * Retrieve an OutboundTransfer + * + * Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'cancel': { +/** + * Cancel an OutboundTransfer + * + * An OutboundTransfer can be canceled if the funds have not yet been paid out. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * List all ReceivedCredits + * + * Returns a list of ReceivedCredits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), linked_flows: z.object({ 'source_flow_type': z.enum(['credit_reversal', 'other', 'outbound_payment', 'outbound_transfer', 'payout']) }).optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedCredit + * + * Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) } }, 'received_debits': { +/** + * List all ReceivedDebits + * + * Returns a list of ReceivedDebits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedDebit + * + * Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } }, 'transaction_entries': { +/** + * List all TransactionEntries + * + * Retrieves a list of TransactionEntry objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1911,10 +5145,20 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), order_by: z.enum(['created', 'effective_at']).optional(), starting_after: z.string().optional(), transaction: z.string().optional() }).parse), '$id': { +/** + * Retrieve a TransactionEntry + * + * Retrieves a TransactionEntry object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransactionEntry.parse(await json())) } }, 'transactions': { +/** + * List all Transactions + * + * Retrieves a list of Transaction objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1929,16 +5173,46 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional() }).optional() }).parse), '$id': { +/** + * Retrieve a Transaction + * + * Retrieves the details of an existing Transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransaction.parse(await json())) } } }, 'webhook_endpoints': { +/** + * List all webhook endpoints + * + * Returns a list of your webhook endpoints. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a webhook endpoint + * + * A webhook endpoint must have a `url` and a list of `enabled_events`. You may optionally specify the Boolean `connect` parameter. If set to true, then a Connect webhook endpoint that notifies the specified `url` about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified `url` only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), '$webhook_endpoint': { +/** + * Delete a webhook endpoint + * + * You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedWebhookEndpoint.parse(await json())), +/** + * Retrieve a webhook endpoint + * + * Retrieves the webhook endpoint with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), +/** + * Update a webhook endpoint + * + * Updates the webhook endpoint. You may edit the `url`, the list of `enabled_events`, and the status of your endpoint. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/models.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/models.ts index 1131108..e059d2b 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/models.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/models.ts @@ -3,174 +3,575 @@ import { z } from 'zod'; // Helper types for schemas export type AccountAnnualRevenueModel = { + /** + * A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount'?: number | undefined; + /** + * 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 | undefined; + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + */ 'fiscal_year_end'?: string | undefined; }; export type AccountMonthlyEstimatedRevenueModel = { + /** + * A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount': number; + /** + * 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; }; export type AddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1'?: string | undefined; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * State, county, province, or region. + */ 'state'?: string | undefined; }; export type AccountBusinessProfileModel = { + /** + * The applicant's gross annual revenue for its preceding fiscal year. + */ 'annual_revenue'?: AccountAnnualRevenueModel | undefined; + /** + * An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + */ 'estimated_worker_count'?: number | undefined; + /** + * [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + */ 'mcc'?: string | undefined; + /** + * Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. + */ 'minority_owned_business_designation'?: Array<'lgbtqi_owned_business' | 'minority_owned_business' | 'none_of_these_apply' | 'prefer_not_to_answer' | 'women_owned_business'> | undefined; 'monthly_estimated_revenue'?: AccountMonthlyEstimatedRevenueModel | undefined; + /** + * The customer-facing business name. + */ 'name'?: string | undefined; + /** + * Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + */ 'product_description'?: string | undefined; + /** + * A publicly available mailing address for sending support issues to. + */ 'support_address'?: AddressModel | undefined; + /** + * A publicly available email address for sending support issues to. + */ 'support_email'?: string | undefined; + /** + * A publicly available phone number to call with support issues. + */ 'support_phone'?: string | undefined; + /** + * A publicly available website for handling support issues. + */ 'support_url'?: string | undefined; + /** + * The business's publicly available website. + */ 'url'?: string | undefined; }; export type AccountCapabilitiesModel = { + /** + * The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + */ 'acss_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + */ 'affirm_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + */ 'afterpay_clearpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Alma capability of the account, or whether the account can directly process Alma payments. + */ 'alma_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + */ 'amazon_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + */ 'au_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + */ 'bacs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + */ 'bancontact_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + */ 'bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Billie capability of the account, or whether the account can directly process Billie payments. + */ 'billie_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the blik payments capability of the account, or whether the account can directly process blik charges. + */ 'blik_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + */ 'boleto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + */ 'card_issuing'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + */ 'card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + */ 'cartes_bancaires_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + */ 'cashapp_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + */ 'crypto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + */ 'eps_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + */ 'fpx_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + */ 'gb_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + */ 'giropay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + */ 'grabpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + */ 'ideal_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + */ 'india_international_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + */ 'jcb_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + */ 'jp_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + */ 'kakao_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + */ 'klarna_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + */ 'konbini_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + */ 'kr_card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the legacy payments capability of the account. + */ 'legacy_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the link_payments capability of the account, or whether the account can directly process Link charges. + */ 'link_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. + */ 'mb_way_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + */ 'mobilepay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + */ 'multibanco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + */ 'mx_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + */ 'naver_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges. + */ 'nz_bank_account_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + */ 'oxxo_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + */ 'p24_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges. + */ 'pay_by_bank_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Payco capability of the account, or whether the account can directly process Payco payments. + */ 'payco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + */ 'paynow_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pix payments capability of the account, or whether the account can directly process pix charges. + */ 'pix_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + */ 'promptpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + */ 'revolut_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + */ 'samsung_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Satispay capability of the account, or whether the account can directly process Satispay payments. + */ 'satispay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + */ 'sepa_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + */ 'sepa_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + */ 'sofort_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Swish capability of the account, or whether the account can directly process Swish payments. + */ 'swish_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-K (US) capability of the account. + */ 'tax_reporting_us_1099_k'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-MISC (US) capability of the account. + */ 'tax_reporting_us_1099_misc'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + */ 'transfers'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the banking capability, or whether the account can have bank accounts. + */ 'treasury'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + */ 'twint_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + */ 'us_bank_account_ach_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + */ 'us_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Zip capability of the account, or whether the account can directly process Zip charges. + */ 'zip_payments'?: 'active' | 'inactive' | 'pending' | undefined; }; export type LegalEntityJapanAddressModel = { + /** + * City/Ward. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Block/Building number. + */ 'line1'?: string | undefined; + /** + * Building details. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * Prefecture. + */ 'state'?: string | undefined; + /** + * Town/cho-me. + */ 'town'?: string | undefined; }; export type LegalEntityDirectorshipDeclarationModel = { + /** + * The Unix timestamp marking when the directorship declaration attestation was made. + */ 'date'?: number | undefined; + /** + * The IP address from which the directorship declaration attestation was made. + */ 'ip'?: string | undefined; + /** + * The user-agent string from the browser where the directorship declaration attestation was made. + */ 'user_agent'?: string | undefined; }; export type LegalEntityUboDeclarationModel = { + /** + * The Unix timestamp marking when the beneficial owner attestation was made. + */ 'date'?: number | undefined; + /** + * The IP address from which the beneficial owner attestation was made. + */ 'ip'?: string | undefined; + /** + * The user-agent string from the browser where the beneficial owner attestation was made. + */ 'user_agent'?: string | undefined; }; export type LegalEntityRegistrationDateModel = { + /** + * The day of registration, between 1 and 31. + */ 'day'?: number | undefined; + /** + * The month of registration, between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year of registration. + */ 'year'?: number | undefined; }; export type LegalEntityRepresentativeDeclarationModel = { + /** + * The Unix timestamp marking when the representative declaration attestation was made. + */ 'date'?: number | undefined; + /** + * The IP address from which the representative declaration attestation was made. + */ 'ip'?: string | undefined; + /** + * The user-agent string from the browser where the representative declaration attestation was made. + */ 'user_agent'?: string | undefined; }; +/** + * To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that you can use to + * retrieve the contents of the file without authentication. + */ export type FileLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Returns if the link is already expired. + */ 'expired': boolean; + /** + * Time that the link expires. + */ 'expires_at'?: number | undefined; + /** + * The file object this link points to. + */ 'file': string | FileModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file_link'; + /** + * The publicly accessible URL to download the file. + */ 'url'?: string | undefined; }; +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export type FileModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The file expires and isn't available at this time in epoch seconds. + */ 'expires_at'?: number | undefined; + /** + * The suitable name for saving the file to a filesystem. + */ 'filename'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ 'links'?: { + /** + * Details about each object. + */ 'data': FileLinkModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file'; + /** + * The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + */ 'purpose': 'account_requirement' | 'additional_verification' | 'business_icon' | 'business_logo' | 'customer_signature' | 'dispute_evidence' | 'document_provider_identity_document' | 'finance_report_run' | 'financial_account_statement' | 'identity_document' | 'identity_document_downloadable' | 'issuing_regulatory_reporting' | 'pci_document' | 'platform_terms_of_service' | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' | 'terminal_android_apk' | 'terminal_reader_splashscreen'; + /** + * The size of the file object in bytes. + */ 'size': number; + /** + * A suitable title for the document. + */ 'title'?: string | undefined; + /** + * The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + */ 'type'?: string | undefined; + /** + * Use your live secret API key to download the file from this URL. + */ 'url'?: string | undefined; }; export type LegalEntityCompanyVerificationDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'back'?: string | FileModel | undefined; + /** + * A user-displayable string describing the verification state of this document. + */ 'details'?: string | undefined; + /** + * One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + */ 'details_code'?: string | undefined; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'front'?: string | FileModel | undefined; }; @@ -180,109 +581,319 @@ export type LegalEntityCompanyVerificationModel = { export type LegalEntityCompanyModel = { 'address'?: AddressModel | undefined; + /** + * The Kana variation of the company's primary address (Japan only). + */ 'address_kana'?: LegalEntityJapanAddressModel | undefined; + /** + * The Kanji variation of the company's primary address (Japan only). + */ 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + */ 'directors_provided'?: boolean | undefined; + /** + * This hash is used to attest that the director information provided to Stripe is both current and correct. + */ 'directorship_declaration'?: LegalEntityDirectorshipDeclarationModel | undefined; + /** + * Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + */ 'executives_provided'?: boolean | undefined; + /** + * The export license ID number of the company, also referred as Import Export Code (India only). + */ 'export_license_id'?: string | undefined; + /** + * The purpose code to use for export transactions (India only). + */ 'export_purpose_code'?: string | undefined; + /** + * The company's legal name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name'?: string | undefined; + /** + * The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kana'?: string | undefined; + /** + * The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kanji'?: string | undefined; + /** + * Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + */ 'owners_provided'?: boolean | undefined; + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + */ 'ownership_declaration'?: LegalEntityUboDeclarationModel | undefined; + /** + * This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + */ 'ownership_exemption_reason'?: 'qualified_entity_exceeds_ownership_threshold' | 'qualifies_as_financial_institution' | undefined; + /** + * The company's phone number (used for verification). + */ 'phone'?: string | undefined; 'registration_date'?: LegalEntityRegistrationDateModel | undefined; + /** + * This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + */ 'representative_declaration'?: LegalEntityRepresentativeDeclarationModel | undefined; + /** + * The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + */ 'structure'?: 'free_zone_establishment' | 'free_zone_llc' | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' | 'private_company' | 'private_corporation' | 'private_partnership' | 'public_company' | 'public_corporation' | 'public_partnership' | 'registered_charity' | 'single_member_llc' | 'sole_establishment' | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' | 'unincorporated_non_profit' | 'unincorporated_partnership' | undefined; + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided'?: boolean | undefined; + /** + * The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + */ 'tax_id_registrar'?: string | undefined; + /** + * Whether the company's business VAT number was provided. + */ 'vat_id_provided'?: boolean | undefined; + /** + * Information on the verification state of the company. + */ 'verification'?: LegalEntityCompanyVerificationModel | undefined; }; export type AccountUnificationAccountControllerFeesModel = { + /** + * A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + */ 'payer': 'account' | 'application' | 'application_custom' | 'application_express'; }; export type AccountUnificationAccountControllerLossesModel = { + /** + * A value indicating who is liable when this account can't pay back negative balances from payments. + */ 'payments': 'application' | 'stripe'; }; export type AccountUnificationAccountControllerStripeDashboardModel = { + /** + * A value indicating the Stripe dashboard this account has access to independent of the Connect application. + */ 'type': 'express' | 'full' | 'none'; }; export type AccountUnificationAccountControllerModel = { 'fees'?: AccountUnificationAccountControllerFeesModel | undefined; + /** + * `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + */ 'is_controller'?: boolean | undefined; 'losses'?: AccountUnificationAccountControllerLossesModel | undefined; + /** + * A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + */ 'requirement_collection'?: 'application' | 'stripe' | undefined; 'stripe_dashboard'?: AccountUnificationAccountControllerStripeDashboardModel | undefined; + /** + * The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + */ 'type': 'account' | 'application'; }; export type CustomerBalanceCustomerBalanceSettingsModel = { + /** + * The configuration for how funds that land in the customer cash balance are reconciled. + */ 'reconciliation_mode': 'automatic' | 'manual'; + /** + * A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + */ 'using_merchant_default': boolean; }; +/** + * A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ export type CashBalanceModel = { + /** + * A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'available'?: { [key: string]: number; } | undefined; + /** + * The ID of the customer whose cash balance this object represents. + */ 'customer': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'cash_balance'; 'settings': CustomerBalanceCustomerBalanceSettingsModel; }; export type DeletedCustomerModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; }; export type TokenCardNetworksModel = { + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred'?: string | undefined; }; +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export type CardModel = { 'account'?: string | AccountModel | undefined; + /** + * City/District/Suburb/Town/Village. + */ 'address_city'?: string | undefined; + /** + * Billing address country, if provided when creating card. + */ 'address_country'?: string | undefined; + /** + * Address line 1 (Street address/PO Box/Company name). + */ 'address_line1'?: string | undefined; + /** + * If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check'?: string | undefined; + /** + * Address line 2 (Apartment/Suite/Unit/Building). + */ 'address_line2'?: string | undefined; + /** + * State/County/Province/Region. + */ 'address_state'?: string | undefined; + /** + * ZIP or postal code. + */ 'address_zip'?: string | undefined; + /** + * If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_zip_check'?: string | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; + /** + * A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Card brand. Can be `American Express`, `Cartes Bancaires`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + */ 'brand': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'currency'?: string | undefined; + /** + * The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + */ 'cvc_check'?: string | undefined; + /** + * Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'default_for_currency'?: boolean | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Issuer identification number of the card. + */ 'iin'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Cardholder name. + */ 'name'?: string | undefined; 'networks'?: TokenCardNetworksModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; + /** + * Status of a card based on the card issuer. + */ 'regulated_status'?: 'regulated' | 'unregulated' | undefined; + /** + * For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. + */ 'status'?: string | undefined; + /** + * If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + */ 'tokenization_method'?: string | undefined; }; @@ -384,7 +995,13 @@ export type SourceTypeCardPresentModel = { }; export type SourceCodeVerificationFlowModel = { + /** + * The number of attempts remaining to authenticate the source object with a verification code. + */ 'attempts_remaining': number; + /** + * The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + */ 'status': string; }; @@ -450,13 +1067,37 @@ export type SourceTypeMultibancoModel = { }; export type SourceOwnerModel = { + /** + * Owner's address. + */ 'address'?: AddressModel | undefined; + /** + * Owner's email address. + */ 'email'?: string | undefined; + /** + * Owner's full name. + */ 'name'?: string | undefined; + /** + * Owner's phone number (including extension). + */ 'phone'?: string | undefined; + /** + * Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_address'?: AddressModel | undefined; + /** + * Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email'?: string | undefined; + /** + * Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; + /** + * Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_phone'?: string | undefined; }; @@ -465,18 +1106,48 @@ export type SourceTypeP24Model = { }; export type SourceReceiverFlowModel = { + /** + * The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + */ 'address'?: string | undefined; + /** + * The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + */ 'amount_charged': number; + /** + * The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + */ 'amount_received': number; + /** + * The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + */ 'amount_returned': number; + /** + * Type of refund attribute method, one of `email`, `manual`, or `none`. + */ 'refund_attributes_method': string; + /** + * Type of refund attribute status, one of `missing`, `requested`, or `available`. + */ 'refund_attributes_status': string; }; export type SourceRedirectFlowModel = { + /** + * The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + */ 'failure_reason'?: string | undefined; + /** + * The URL you provide to redirect the customer to after they authenticated their payment. + */ 'return_url': string; + /** + * The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (successful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + */ 'status': string; + /** + * The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + */ 'url': string; }; @@ -501,26 +1172,68 @@ export type SourceTypeSofortModel = { }; export type SourceOrderItemModel = { + /** + * The amount (price) for this order item. + */ 'amount'?: number | undefined; + /** + * This currency of this order item. Required when `amount` is present. + */ 'currency'?: string | undefined; + /** + * Human-readable description for this order item. + */ 'description'?: string | undefined; + /** + * The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + */ 'parent'?: string | undefined; + /** + * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + */ 'quantity'?: number | undefined; + /** + * The type of this order item. Must be `sku`, `tax`, or `shipping`. + */ 'type'?: string | undefined; }; export type ShippingModel = { 'address'?: AddressModel | undefined; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ 'carrier'?: string | undefined; + /** + * Recipient name. + */ 'name'?: string | undefined; + /** + * Recipient phone (including extension). + */ 'phone'?: string | undefined; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'tracking_number'?: string | undefined; }; export type SourceOrderModel = { + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + */ 'amount': number; + /** + * 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; + /** + * The email address of the customer placing the order. + */ 'email'?: string | undefined; + /** + * List of items constituting the order. + */ 'items'?: SourceOrderItemModel[] | undefined; 'shipping'?: ShippingModel | undefined; }; @@ -551,34 +1264,82 @@ export type SourceTypeWechatModel = { 'statement_descriptor'?: string | undefined; }; +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export type SourceModel = { 'ach_credit_transfer'?: SourceTypeAchCreditTransferModel | undefined; 'ach_debit'?: SourceTypeAchDebitModel | undefined; 'acss_debit'?: SourceTypeAcssDebitModel | undefined; 'alipay'?: SourceTypeAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'amount'?: number | undefined; 'au_becs_debit'?: SourceTypeAuBecsDebitModel | undefined; 'bancontact'?: SourceTypeBancontactModel | undefined; 'card'?: SourceTypeCardModel | undefined; 'card_present'?: SourceTypeCardPresentModel | undefined; + /** + * The client secret of the source. Used for client-side retrieval using a publishable key. + */ 'client_secret': string; 'code_verification'?: SourceCodeVerificationFlowModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'currency'?: string | undefined; + /** + * The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + */ 'customer'?: string | undefined; 'eps'?: SourceTypeEpsModel | undefined; + /** + * The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + */ 'flow': string; 'giropay'?: SourceTypeGiropayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: SourceTypeIdealModel | undefined; 'klarna'?: SourceTypeKlarnaModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; 'multibanco'?: SourceTypeMultibancoModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source'; + /** + * Information about the owner of the payment instrument that may be used or required by particular source types. + */ 'owner'?: SourceOwnerModel | undefined; 'p24'?: SourceTypeP24Model | undefined; 'receiver'?: SourceReceiverFlowModel | undefined; @@ -586,112 +1347,310 @@ export type SourceModel = { 'sepa_debit'?: SourceTypeSepaDebitModel | undefined; 'sofort'?: SourceTypeSofortModel | undefined; 'source_order'?: SourceOrderModel | undefined; + /** + * Extra information about a source. This will appear on your customer's statement every time you charge the source. + */ 'statement_descriptor'?: string | undefined; + /** + * The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + */ 'status': string; 'three_d_secure'?: SourceTypeThreeDSecureModel | undefined; + /** + * The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'alipay' | 'au_becs_debit' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; + /** + * Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + */ 'usage'?: string | undefined; 'wechat'?: SourceTypeWechatModel | undefined; }; export type CouponAppliesToModel = { + /** + * A list of product IDs this coupon applies to + */ 'products': string[]; }; export type CouponCurrencyOptionModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off': number; }; +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export type CouponModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off'?: number | undefined; 'applies_to'?: CouponAppliesToModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + */ 'currency'?: string | undefined; + /** + * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CouponCurrencyOptionModel; } | undefined; + /** + * One of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount. + */ 'duration': 'forever' | 'once' | 'repeating'; + /** + * If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + */ 'duration_in_months'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + */ 'max_redemptions'?: number | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Name of the coupon displayed to customers on for instance invoices or receipts. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; + /** + * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + */ 'percent_off'?: number | undefined; + /** + * Date after which the coupon can no longer be redeemed. + */ 'redeem_by'?: number | undefined; + /** + * Number of times this coupon has been applied to a customer. + */ 'times_redeemed': number; + /** + * Taking account of the above properties, whether this coupon can still be applied to a customer. + */ 'valid': boolean; }; export type PromotionCodesResourcePromotionModel = { + /** + * If promotion `type` is `coupon`, the coupon for this promotion. + */ 'coupon'?: string | CouponModel | undefined; + /** + * The type of promotion. + */ 'type': 'coupon'; }; export type PromotionCodeCurrencyOptionModel = { + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount': number; }; export type PromotionCodesResourceRestrictionsModel = { + /** + * Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: PromotionCodeCurrencyOptionModel; } | undefined; + /** + * A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + */ 'first_time_transaction': boolean; + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount'?: number | undefined; + /** + * Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + */ 'minimum_amount_currency'?: string | undefined; }; +/** + * A Promotion Code represents a customer-redeemable code for an underlying promotion. + * You can create multiple codes for a single promotion. + * + * If you enable promotion codes in your [customer portal configuration](https://stripe.com/docs/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal. + * Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal. + */ export type PromotionCodeModel = { + /** + * Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + */ 'active': boolean; + /** + * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + */ 'code': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The customer that this promotion code can be used by. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Date at which the promotion code can no longer be redeemed. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this promotion code can be redeemed. + */ 'max_redemptions'?: number | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'promotion_code'; 'promotion': PromotionCodesResourcePromotionModel; 'restrictions': PromotionCodesResourceRestrictionsModel; + /** + * Number of times this promotion code has been used. + */ 'times_redeemed': number; }; export type DiscountSourceModel = { + /** + * The coupon that was redeemed to create this discount. + */ 'coupon'?: string | CouponModel | undefined; + /** + * The source type of the discount. + */ 'type': 'coupon'; }; +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export type DiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session'?: string | undefined; + /** + * The ID of the customer associated with this discount. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + */ 'end'?: number | undefined; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice'?: string | undefined; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code'?: string | PromotionCodeModel | undefined; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription'?: string | undefined; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item'?: string | undefined; }; export type InvoiceSettingCustomFieldModel = { + /** + * The name of the custom field. + */ 'name': string; + /** + * The value of the custom field. + */ 'value': string; }; export type PaymentMethodAcssDebitModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Institution number of the bank account. + */ 'institution_number'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * Transit number of the bank account. + */ 'transit_number'?: string | undefined; }; @@ -716,14 +1675,32 @@ export type PaymentMethodAmazonPayModel = { }; export type PaymentMethodAuBecsDebitModel = { + /** + * Six-digit number identifying bank and branch associated with this bank account. + */ 'bsb_number'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; }; export type PaymentMethodBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code'?: string | undefined; }; @@ -736,10 +1713,25 @@ export type PaymentMethodBillieModel = { }; export type BillingDetailsModel = { + /** + * Billing address. + */ 'address'?: AddressModel | undefined; + /** + * Email address. + */ 'email'?: string | undefined; + /** + * Full name. + */ 'name'?: string | undefined; + /** + * Billing phone number (including extension). + */ 'phone'?: string | undefined; + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + */ 'tax_id'?: string | undefined; }; @@ -748,71 +1740,202 @@ export type PaymentMethodBlikModel = { }; export type PaymentMethodBoletoModel = { + /** + * Uniquely identifies the customer tax id (CNPJ or CPF) + */ 'tax_id': string; }; export type PaymentMethodCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check'?: string | undefined; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check'?: string | undefined; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check'?: string | undefined; }; export type PaymentMethodDetailsCardPresentOfflineModel = { + /** + * Time at which the payment was collected while offline + */ 'stored_at'?: number | undefined; + /** + * The method used to process this payment method offline. Only deferred is allowed. + */ 'type'?: 'deferred' | undefined; }; export type PaymentMethodDetailsCardPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'credit' | 'prepaid' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram'?: string | undefined; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name'?: string | undefined; + /** + * Identifier for this transaction. + */ 'authorization_code'?: string | undefined; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code'?: string | undefined; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method'?: string | undefined; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name'?: string | undefined; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results'?: string | undefined; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information'?: string | undefined; }; export type PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel = { + /** + * The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + */ 'type': 'apple_pay' | 'google_pay' | 'samsung_pay' | 'unknown'; }; export type PaymentMethodDetailsCardPresentModel = { + /** + * The authorized amount + */ 'amount_authorized'?: number | undefined; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand'?: string | undefined; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product'?: string | undefined; + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * A high-level description of the type of cards issued in this range. + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card'?: string | undefined; + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ 'incremental_authorization_supported': boolean; + /** + * The name of the card's issuing bank. + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network'?: string | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id'?: string | undefined; + /** + * Details about payments collected offline. + */ 'offline'?: PaymentMethodDetailsCardPresentOfflineModel | undefined; + /** + * Defines whether the authorized amount can be over-captured or not + */ 'overcapture_supported': boolean; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales'?: string[] | undefined; + /** + * How card details were read in this transaction. + */ 'read_method'?: 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2' | undefined; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt'?: PaymentMethodDetailsCardPresentReceiptModel | undefined; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type CardGeneratedFromPaymentMethodDetailsModel = { 'card_present'?: PaymentMethodDetailsCardPresentModel | undefined; + /** + * The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + */ 'type': string; }; export type ApplicationModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; @@ -837,14 +1960,26 @@ export type OfflineAcceptanceModel = { }; export type OnlineAcceptanceModel = { + /** + * The customer accepts the mandate from this IP address. + */ 'ip_address'?: string | undefined; + /** + * The customer accepts the mandate using the user agent of the browser. + */ 'user_agent'?: string | undefined; }; export type CustomerAcceptanceModel = { + /** + * The time that the customer accepts the mandate. + */ 'accepted_at'?: number | undefined; 'offline'?: OfflineAcceptanceModel | undefined; 'online'?: OnlineAcceptanceModel | undefined; + /** + * The mandate includes the type of customer acceptance information, such as: `online` or `offline`. + */ 'type': 'offline' | 'online'; }; @@ -853,9 +1988,21 @@ export type MandateMultiUseModel = { }; export type MandateAcssDebitModel = { + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description'?: string | undefined; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; @@ -864,13 +2011,28 @@ export type MandateAmazonPayModel = { }; export type MandateAuBecsDebitModel = { + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateBacsDebitModel = { + /** + * The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + */ 'network_status': 'accepted' | 'pending' | 'refused' | 'revoked'; + /** + * The unique reference identifying the mandate on the Bacs network. + */ 'reference': string; + /** + * When the mandate is revoked on the Bacs network this field displays the reason for the revocation. + */ 'revocation_reason'?: 'account_closed' | 'bank_account_restricted' | 'bank_ownership_changed' | 'could_not_process' | 'debit_not_authorized' | undefined; + /** + * The URL that will contain the mandate that the customer has signed. + */ 'url': string; }; @@ -907,7 +2069,13 @@ export type MandateNzBankAccountModel = { }; export type MandatePaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id'?: string | undefined; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id'?: string | undefined; }; @@ -916,11 +2084,20 @@ export type MandateRevolutPayModel = { }; export type MandateSepaDebitModel = { + /** + * The unique reference of the mandate. + */ 'reference': string; + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateUsBankAccountModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; @@ -940,37 +2117,96 @@ export type MandatePaymentMethodDetailsModel = { 'paypal'?: MandatePaypalModel | undefined; 'revolut_pay'?: MandateRevolutPayModel | undefined; 'sepa_debit'?: MandateSepaDebitModel | undefined; + /** + * This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. + */ 'type': string; 'us_bank_account'?: MandateUsBankAccountModel | undefined; }; export type MandateSingleUseModel = { + /** + * The amount of the payment on a single use mandate. + */ 'amount': number; + /** + * The currency of the payment on a single use mandate. + */ 'currency': string; }; +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export type MandateModel = { 'customer_acceptance': CustomerAcceptanceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'multi_use'?: MandateMultiUseModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'mandate'; + /** + * The account (if any) that the mandate is intended for. + */ 'on_behalf_of'?: string | undefined; + /** + * ID of the payment method associated with this mandate. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': MandatePaymentMethodDetailsModel; 'single_use'?: MandateSingleUseModel | undefined; + /** + * The mandate status indicates whether or not you can use it to initiate a payment. + */ 'status': 'active' | 'inactive' | 'pending'; + /** + * The type of the mandate. + */ 'type': 'multi_use' | 'single_use'; }; export type SetupAttemptPaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic'?: string | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language'?: 'de' | 'en' | 'fr' | 'nl' | undefined; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; @@ -979,17 +2215,48 @@ export type SetupAttemptPaymentMethodDetailsBoletoModel = { }; export type SetupAttemptPaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check'?: string | undefined; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check'?: string | undefined; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check'?: string | undefined; }; export type ThreeDSecureDetailsModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow'?: 'challenge' | 'frictionless' | undefined; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator'?: '01' | '02' | '05' | '06' | '07' | undefined; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result'?: 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error' | undefined; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason'?: 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected' | undefined; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id'?: string | undefined; + /** + * The version of 3D Secure that was used. + */ 'version'?: '1.0.2' | '2.1.0' | '2.2.0' | undefined; }; @@ -1004,25 +2271,69 @@ export type PaymentMethodDetailsCardWalletGooglePayModel = { export type SetupAttemptPaymentMethodDetailsCardWalletModel = { 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'apple_pay' | 'google_pay' | 'link'; }; export type SetupAttemptPaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand'?: string | undefined; + /** + * Check results by Card networks on Card address and CVC at the time of authorization + */ 'checks'?: SetupAttemptPaymentMethodDetailsCardChecksModel | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month'?: number | undefined; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year'?: number | undefined; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network'?: string | undefined; + /** + * Populated if this authorization used 3D Secure authentication. + */ 'three_d_secure'?: ThreeDSecureDetailsModel | undefined; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet'?: SetupAttemptPaymentMethodDetailsCardWalletModel | undefined; }; export type SetupAttemptPaymentMethodDetailsCardPresentModel = { + /** + * The ID of the Card PaymentMethod which was generated by this SetupAttempt. + */ 'generated_card'?: string | PaymentMethodModel | undefined; + /** + * Details about payments collected offline. + */ 'offline'?: PaymentMethodDetailsCardPresentOfflineModel | undefined; }; @@ -1031,11 +2342,30 @@ export type SetupAttemptPaymentMethodDetailsCashappModel = { }; export type SetupAttemptPaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank'?: 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe' | undefined; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic'?: 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U' | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; @@ -1056,6 +2386,9 @@ export type SetupAttemptPaymentMethodDetailsLinkModel = { }; export type SetupAttemptPaymentMethodDetailsNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id'?: string | undefined; }; @@ -1076,13 +2409,39 @@ export type SetupAttemptPaymentMethodDetailsSepaDebitModel = { }; export type SetupAttemptPaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic'?: string | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language'?: 'de' | 'en' | 'fr' | 'nl' | undefined; + /** + * Owner's verified full name. Values are verified or provided by Sofort directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; @@ -1111,6 +2470,9 @@ export type SetupAttemptPaymentMethodDetailsModel = { 'revolut_pay'?: SetupAttemptPaymentMethodDetailsRevolutPayModel | undefined; 'sepa_debit'?: SetupAttemptPaymentMethodDetailsSepaDebitModel | undefined; 'sofort'?: SetupAttemptPaymentMethodDetailsSofortModel | undefined; + /** + * The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + */ 'type': string; 'us_bank_account'?: SetupAttemptPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -1131,8 +2493,17 @@ export type PaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLin }; export type PaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptionsModel = { + /** + * Type of the line item. + */ 'category'?: 'digital_goods' | 'donation' | 'physical_goods' | undefined; + /** + * Description of the line item. + */ 'description'?: string | undefined; + /** + * The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + */ 'sold_by'?: string | undefined; }; @@ -1144,42 +2515,118 @@ export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResour }; export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount': number; }; export type PaymentIntentAmountDetailsLineItemModel = { + /** + * The discount applied on this line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[discount_amount]` field. + */ 'discount_amount'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent_amount_details_line_item'; + /** + * Payment method-specific information for line items. + */ 'payment_method_options'?: PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptionsModel | undefined; + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long. + */ 'product_code'?: string | undefined; + /** + * The product name of the line item. Required for L3 rates. At most 1024 characters long. + * + * For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters. + */ 'product_name': string; + /** + * The quantity of items. Required for L3 rates. An integer greater than 0. + */ 'quantity': number; + /** + * Contains information about the tax on the item. + */ 'tax'?: PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel | undefined; + /** + * The unit cost of the line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0. + */ 'unit_cost': number; + /** + * A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long. + */ 'unit_of_measure'?: string | undefined; }; export type PaymentFlowsAmountDetailsResourceShippingModel = { + /** + * If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than or equal to 0. + */ 'amount'?: number | undefined; + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'from_postal_code'?: string | undefined; + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'to_postal_code'?: string | undefined; }; export type PaymentFlowsAmountDetailsResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount'?: number | undefined; }; export type PaymentFlowsAmountDetailsClientResourceTipModel = { + /** + * Portion of the amount that corresponds to a tip. + */ 'amount'?: number | undefined; }; export type PaymentFlowsAmountDetailsModel = { + /** + * The total discount applied on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field. + */ 'discount_amount'?: number | undefined; + /** + * A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': PaymentIntentAmountDetailsLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'shipping'?: PaymentFlowsAmountDetailsResourceShippingModel | undefined; @@ -1192,11 +2639,22 @@ export type PaymentFlowsAmountDetailsClientModel = { }; export type PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel = { + /** + * Controls whether this PaymentIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled': boolean; }; export type PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTaxModel = { + /** + * The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + */ 'calculation': string; }; @@ -1209,51 +2667,126 @@ export type PaymentFlowsPaymentIntentAsyncWorkflowsModel = { }; export type FeeModel = { + /** + * Amount of the fee, in cents. + */ 'amount': number; + /** + * ID of the Connect application that earned the fee. + */ 'application'?: string | undefined; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + */ 'type': string; }; export type ConnectCollectionTransferModel = { + /** + * Amount transferred, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * ID of the account that funds are being collected for. + */ 'destination': string | AccountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'connect_collection_transfer'; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + */ 'linked_transaction': string | CustomerCashBalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. + */ 'payment_intent': string | PaymentIntentModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel = { + /** + * The BIC of the bank of the sender of the funding. + */ 'bic'?: string | undefined; + /** + * The last 4 digits of the IBAN of the sender of the funding. + */ 'iban_last4'?: string | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name'?: string | undefined; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel = { + /** + * The last 4 digits of the account number of the sender of the funding. + */ 'account_number_last4'?: string | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name'?: string | undefined; + /** + * The sort code of the bank of the sender of the funding + */ 'sort_code'?: string | undefined; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel = { + /** + * The name of the bank of the sender of the funding. + */ 'sender_bank'?: string | undefined; + /** + * The name of the bank branch of the sender of the funding. + */ 'sender_branch'?: string | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name'?: string | undefined; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel = { + /** + * The banking network used for this funding. + */ 'network'?: 'ach' | 'domestic_wire_us' | 'swift' | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name'?: string | undefined; }; @@ -1261,7 +2794,13 @@ export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransacti 'eu_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel | undefined; 'gb_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel | undefined; 'jp_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel | undefined; + /** + * The user-supplied reference field on the bank transfer. + */ 'reference'?: string | undefined; + /** + * The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; 'us_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel | undefined; }; @@ -1275,79 +2814,175 @@ export type DestinationDetailsUnimplementedModel = { }; export type RefundDestinationDetailsBlikModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code'?: string | undefined; + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsBrBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsCardModel = { + /** + * Value of the reference number assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; + /** + * Type of the reference number assigned to the refund. + */ 'reference_type'?: string | undefined; + /** + * The type of refund. This can be `refund`, `reversal`, or `pending`. + */ 'type': 'pending' | 'refund' | 'reversal'; }; export type RefundDestinationDetailsCryptoModel = { + /** + * The transaction hash of the refund. + */ 'reference'?: string | undefined; }; export type RefundDestinationDetailsEuBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsGbBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsJpBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsMbWayModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsMultibancoModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsMxBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsP24Model = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsPaypalModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code'?: string | undefined; }; export type RefundDestinationDetailsSwishModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code'?: string | undefined; + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsThBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; export type RefundDestinationDetailsUsBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; }; @@ -1384,6 +3019,9 @@ export type RefundDestinationDetailsModel = { 'swish'?: RefundDestinationDetailsSwishModel | undefined; 'th_bank_transfer'?: RefundDestinationDetailsThBankTransferModel | undefined; 'twint'?: DestinationDetailsUnimplementedModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. + */ 'type': string; 'us_bank_transfer'?: RefundDestinationDetailsUsBankTransferModel | undefined; 'wechat_pay'?: DestinationDetailsUnimplementedModel | undefined; @@ -1391,161 +3029,480 @@ export type RefundDestinationDetailsModel = { }; export type EmailSentModel = { + /** + * The timestamp when the email was sent. + */ 'email_sent_at': number; + /** + * The recipient's email address. + */ 'email_sent_to': string; }; export type RefundNextActionDisplayDetailsModel = { 'email_sent': EmailSentModel; + /** + * The expiry timestamp. + */ 'expires_at': number; }; export type RefundNextActionModel = { 'display_details'?: RefundNextActionDisplayDetailsModel | undefined; + /** + * Type of the next action to perform. + */ 'type': string; }; export type PaymentFlowsPaymentIntentPresentmentDetailsModel = { + /** + * Amount intended to be collected by this payment, denominated in `presentment_currency`. + */ 'presentment_amount': number; + /** + * Currency presented to the customer during payment. + */ 'presentment_currency': string; }; +/** + * A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) + */ export type TransferModel = { + /** + * Amount in cents (or local equivalent) to be transferred. + */ 'amount': number; + /** + * Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + */ 'amount_reversed': number; + /** + * Balance transaction that describes the impact of this transfer on your account balance. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Time that this record of the transfer was first created. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * ID of the Stripe account the transfer was sent to. + */ 'destination'?: string | AccountModel | undefined; + /** + * If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + */ 'destination_payment'?: string | ChargeModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer'; + /** + * A list of reversals that have been applied to the transfer. + */ 'reversals': { + /** + * Details about each object. + */ 'data': TransferReversalModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + */ 'reversed': boolean; + /** + * ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + */ 'source_transaction'?: string | ChargeModel | undefined; + /** + * The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + */ 'source_type'?: string | undefined; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group'?: string | undefined; }; +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export type TransferReversalModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Linked payment refund for the transfer reversal. + */ 'destination_payment_refund'?: string | RefundModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer_reversal'; + /** + * ID of the refund responsible for the transfer reversal. + */ 'source_refund'?: string | RefundModel | undefined; + /** + * ID of the transfer that was reversed. + */ 'transfer': string | TransferModel; }; +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export type RefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * ID of the charge that's refunded. + */ 'charge'?: string | ChargeModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + */ 'description'?: string | undefined; 'destination_details'?: RefundDestinationDetailsModel | undefined; + /** + * After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + */ 'failure_balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + */ 'failure_reason'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + */ 'instructions_email'?: string | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; 'next_action'?: RefundNextActionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'refund'; + /** + * ID of the PaymentIntent that's refunded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + */ 'pending_reason'?: 'charge_pending' | 'insufficient_funds' | 'processing' | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + */ 'reason'?: 'duplicate' | 'expired_uncaptured_charge' | 'fraudulent' | 'requested_by_customer' | undefined; + /** + * This is the transaction number that appears on email receipts sent for this refund. + */ 'receipt_number'?: string | undefined; + /** + * The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + */ 'source_transfer_reversal'?: string | TransferReversalModel | undefined; + /** + * Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + */ 'status'?: string | undefined; + /** + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + */ 'transfer_reversal'?: string | TransferReversalModel | undefined; }; export type CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel = { + /** + * The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. + */ 'refund': string | RefundModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export type CustomerCashBalanceTransactionModel = { 'adjusted_for_overdraft'?: CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel | undefined; 'applied_to_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer whose available cash balance changed as a result of this transaction. + */ 'customer': string | CustomerModel; + /** + * The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'ending_balance': number; 'funded'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + */ 'net_amount': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_cash_balance_transaction'; 'refunded_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel | undefined; 'transferred_to_balance'?: CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel | undefined; + /** + * The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + */ 'type': 'adjusted_for_overdraft' | 'applied_to_payment' | 'funded' | 'funding_reversed' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'transferred_to_balance' | 'unapplied_from_payment'; 'unapplied_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel | undefined; }; export type DisputeTransactionShippingAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1'?: string | undefined; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * State, county, province, or region. + */ 'state'?: string | undefined; }; export type DisputeVisaCompellingEvidence3DisputedTransactionModel = { + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id'?: string | undefined; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint'?: string | undefined; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id'?: string | undefined; + /** + * The email address of the customer. + */ 'customer_email_address'?: string | undefined; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip'?: string | undefined; + /** + * Categorization of disputed payment. + */ 'merchandise_or_services'?: 'merchandise' | 'services' | undefined; + /** + * A description of the product or service that was sold. + */ 'product_description'?: string | undefined; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address'?: DisputeTransactionShippingAddressModel | undefined; }; export type DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel = { + /** + * Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + */ 'charge': string; + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id'?: string | undefined; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint'?: string | undefined; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id'?: string | undefined; + /** + * The email address of the customer. + */ 'customer_email_address'?: string | undefined; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip'?: string | undefined; + /** + * A description of the product or service that was sold. + */ 'product_description'?: string | undefined; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address'?: DisputeTransactionShippingAddressModel | undefined; }; export type DisputeEnhancedEvidenceVisaCompellingEvidence3Model = { + /** + * Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + */ 'disputed_transaction'?: DisputeVisaCompellingEvidence3DisputedTransactionModel | undefined; + /** + * List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + */ 'prior_undisputed_transactions': DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel[]; }; export type DisputeEnhancedEvidenceVisaComplianceModel = { + /** + * A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + */ 'fee_acknowledged': boolean; }; @@ -1555,42 +3512,132 @@ export type DisputeEnhancedEvidenceModel = { }; export type DisputeEvidenceModel = { + /** + * Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + */ 'access_activity_log'?: string | undefined; + /** + * The billing address provided by the customer. + */ 'billing_address'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + */ 'cancellation_policy'?: string | FileModel | undefined; + /** + * An explanation of how and when the customer was shown your refund policy prior to purchase. + */ 'cancellation_policy_disclosure'?: string | undefined; + /** + * A justification for why the customer's subscription was not canceled. + */ 'cancellation_rebuttal'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + */ 'customer_communication'?: string | FileModel | undefined; + /** + * The email address of the customer. + */ 'customer_email_address'?: string | undefined; + /** + * The name of the customer. + */ 'customer_name'?: string | undefined; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + */ 'customer_signature'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + */ 'duplicate_charge_documentation'?: string | FileModel | undefined; + /** + * An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + */ 'duplicate_charge_explanation'?: string | undefined; + /** + * The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + */ 'duplicate_charge_id'?: string | undefined; 'enhanced_evidence': DisputeEnhancedEvidenceModel; + /** + * A description of the product or service that was sold. + */ 'product_description'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + */ 'receipt'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + */ 'refund_policy'?: string | FileModel | undefined; + /** + * Documentation demonstrating that the customer was shown your refund policy prior to purchase. + */ 'refund_policy_disclosure'?: string | undefined; + /** + * A justification for why the customer is not entitled to a refund. + */ 'refund_refusal_explanation'?: string | undefined; + /** + * The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + */ 'service_date'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + */ 'service_documentation'?: string | FileModel | undefined; + /** + * The address to which a physical product was shipped. You should try to include as complete address information as possible. + */ 'shipping_address'?: string | undefined; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + */ 'shipping_carrier'?: string | undefined; + /** + * The date on which a physical product began its route to the shipping address, in a clear human-readable format. + */ 'shipping_date'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + */ 'shipping_documentation'?: string | FileModel | undefined; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'shipping_tracking_number'?: string | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + */ 'uncategorized_file'?: string | FileModel | undefined; + /** + * Any additional evidence or statements. + */ 'uncategorized_text'?: string | undefined; }; export type DisputeEnhancedEligibilityVisaCompellingEvidence3Model = { + /** + * List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + */ 'required_actions': Array<'missing_customer_identifiers' | 'missing_disputed_transaction_description' | 'missing_merchandise_or_services' | 'missing_prior_undisputed_transaction_description' | 'missing_prior_undisputed_transactions'>; + /** + * Visa Compelling Evidence 3.0 eligibility status. + */ 'status': 'not_qualified' | 'qualified' | 'requires_action'; }; export type DisputeEnhancedEligibilityVisaComplianceModel = { + /** + * Visa compliance eligibility status. + */ 'status': 'fee_acknowledged' | 'requires_fee_acknowledgement'; }; @@ -1600,30 +3647,66 @@ export type DisputeEnhancedEligibilityModel = { }; export type DisputeEvidenceDetailsModel = { + /** + * Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. + */ 'due_by'?: number | undefined; 'enhanced_eligibility': DisputeEnhancedEligibilityModel; + /** + * Whether evidence has been staged for this dispute. + */ 'has_evidence': boolean; + /** + * Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + */ 'past_due': boolean; + /** + * The number of times evidence has been submitted. Typically, you may only submit evidence once. + */ 'submission_count': number; }; export type DisputePaymentMethodDetailsAmazonPayModel = { + /** + * The AmazonPay dispute type, chargeback or claim + */ 'dispute_type'?: 'chargeback' | 'claim' | undefined; }; export type DisputePaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The type of dispute opened. Different case types may have varying fees and financial impact. + */ 'case_type': 'block' | 'chargeback' | 'compliance' | 'inquiry' | 'resolution'; + /** + * The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + */ 'network_reason_code'?: string | undefined; }; export type DisputePaymentMethodDetailsKlarnaModel = { + /** + * Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason + */ 'chargeback_loss_reason_code'?: string | undefined; + /** + * The reason for the dispute as defined by Klarna + */ 'reason_code'?: string | undefined; }; export type DisputePaymentMethodDetailsPaypalModel = { + /** + * The ID of the dispute in PayPal. + */ 'case_id'?: string | undefined; + /** + * The reason for the dispute as defined by PayPal + */ 'reason_code'?: string | undefined; }; @@ -1632,46 +3715,135 @@ export type DisputePaymentMethodDetailsModel = { 'card'?: DisputePaymentMethodDetailsCardModel | undefined; 'klarna'?: DisputePaymentMethodDetailsKlarnaModel | undefined; 'paypal'?: DisputePaymentMethodDetailsPaypalModel | undefined; + /** + * Payment method type. + */ 'type': 'amazon_pay' | 'card' | 'klarna' | 'paypal'; }; +/** + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. + * + * Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) + */ export type DisputeModel = { + /** + * Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + */ 'amount': number; + /** + * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + */ 'balance_transactions': BalanceTransactionModel[]; + /** + * ID of the charge that's disputed. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * List of eligibility types that are included in `enhanced_evidence`. + */ 'enhanced_eligibility_types': Array<'visa_compelling_evidence_3' | 'visa_compliance'>; 'evidence': DisputeEvidenceModel; 'evidence_details': DisputeEvidenceDetailsModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + */ 'is_charge_refundable': boolean; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'dispute'; + /** + * ID of the PaymentIntent that's disputed. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; 'payment_method_details'?: DisputePaymentMethodDetailsModel | undefined; + /** + * Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + */ 'reason': string; + /** + * The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`. + */ 'status': 'lost' | 'needs_response' | 'prevented' | 'under_review' | 'warning_closed' | 'warning_needs_response' | 'warning_under_review' | 'won'; }; +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export type FeeRefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the application fee that was refunded. + */ 'fee': string | ApplicationFeeModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'fee_refund'; }; export type IssuingAuthorizationAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee'?: number | undefined; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount'?: number | undefined; }; @@ -1680,451 +3852,1255 @@ export type IssuingCardholderAddressModel = { }; export type IssuingCardholderCompanyModel = { + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided': boolean; }; export type IssuingCardholderUserTermsAcceptanceModel = { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. + */ 'date'?: number | undefined; + /** + * The IP address from which the cardholder accepted the Authorized User Terms. + */ 'ip'?: string | undefined; + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ 'user_agent'?: string | undefined; }; export type IssuingCardholderCardIssuingModel = { + /** + * Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + */ 'user_terms_acceptance'?: IssuingCardholderUserTermsAcceptanceModel | undefined; }; export type IssuingCardholderIndividualDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day'?: number | undefined; + /** + * The month of birth, between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year of birth. + */ 'year'?: number | undefined; }; export type IssuingCardholderIdDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back'?: string | FileModel | undefined; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front'?: string | FileModel | undefined; }; export type IssuingCardholderVerificationModel = { + /** + * An identifying document, either a passport or local ID card. + */ 'document'?: IssuingCardholderIdDocumentModel | undefined; }; export type IssuingCardholderIndividualModel = { + /** + * Information related to the card_issuing program for this cardholder. + */ 'card_issuing'?: IssuingCardholderCardIssuingModel | undefined; + /** + * The date of birth of this cardholder. + */ 'dob'?: IssuingCardholderIndividualDobModel | undefined; + /** + * The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'first_name'?: string | undefined; + /** + * The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'last_name'?: string | undefined; + /** + * Government-issued ID document for this cardholder. + */ 'verification'?: IssuingCardholderVerificationModel | undefined; }; export type IssuingCardholderRequirementsModel = { + /** + * If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + */ 'disabled_reason'?: 'listed' | 'rejected.listed' | 'requirements.past_due' | 'under_review' | undefined; + /** + * Array of fields that need to be collected in order to verify and re-enable the cardholder. + */ 'past_due'?: Array<'company.tax_id' | 'individual.card_issuing.user_terms_acceptance.date' | 'individual.card_issuing.user_terms_acceptance.ip' | 'individual.dob.day' | 'individual.dob.month' | 'individual.dob.year' | 'individual.first_name' | 'individual.last_name' | 'individual.verification.document'> | undefined; }; export type IssuingCardholderSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardholderAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries'?: string[] | undefined; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries'?: string[] | undefined; + /** + * Limit spending with amount-based rules that apply across this cardholder's cards. + */ 'spending_limits'?: IssuingCardholderSpendingLimitModel[] | undefined; + /** + * Currency of the amounts within `spending_limits`. + */ 'spending_limits_currency'?: string | undefined; }; +/** + * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + */ export type IssuingCardholderModel = { 'billing': IssuingCardholderAddressModel; + /** + * Additional information about a `company` cardholder. + */ 'company'?: IssuingCardholderCompanyModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The cardholder's email address. + */ 'email'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Additional information about an `individual` cardholder. + */ 'individual'?: IssuingCardholderIndividualModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The cardholder's name. This will be printed on cards issued to them. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.cardholder'; + /** + * The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + */ 'phone_number'?: string | undefined; + /** + * The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + * This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + */ 'preferred_locales'?: Array<'de' | 'en' | 'es' | 'fr' | 'it'> | undefined; 'requirements': IssuingCardholderRequirementsModel; + /** + * Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ 'spending_controls'?: IssuingCardholderAuthorizationControlsModel | undefined; + /** + * Specifies whether to permit authorizations on this cardholder's cards. + */ 'status': 'active' | 'blocked' | 'inactive'; + /** + * One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + */ 'type': 'company' | 'individual'; }; export type IssuingCardFraudWarningModel = { + /** + * Timestamp of the most recent fraud warning. + */ 'started_at'?: number | undefined; + /** + * The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card. + */ 'type'?: 'card_testing_exposure' | 'fraud_dispute_filed' | 'third_party_reported' | 'user_indicated_fraud' | undefined; }; export type IssuingPersonalizationDesignCarrierTextModel = { + /** + * The footer body text of the carrier letter. + */ 'footer_body'?: string | undefined; + /** + * The footer title text of the carrier letter. + */ 'footer_title'?: string | undefined; + /** + * The header body text of the carrier letter. + */ 'header_body'?: string | undefined; + /** + * The header title text of the carrier letter. + */ 'header_title'?: string | undefined; }; export type IssuingPhysicalBundleFeaturesModel = { + /** + * The policy for how to use card logo images in a card design with this physical bundle. + */ 'card_logo': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use carrier letter text in a card design with this physical bundle. + */ 'carrier_text': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use a second line on a card with this physical bundle. + */ 'second_line': 'optional' | 'required' | 'unsupported'; }; +/** + * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. + */ export type IssuingPhysicalBundleModel = { 'features': IssuingPhysicalBundleFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Friendly display name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.physical_bundle'; + /** + * Whether this physical bundle can be used to create cards. + */ 'status': 'active' | 'inactive' | 'review'; + /** + * Whether this physical bundle is a standard Stripe offering or custom-made for you. + */ 'type': 'custom' | 'standard'; }; export type IssuingPersonalizationDesignPreferencesModel = { + /** + * 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; + /** + * Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + */ 'is_platform_default'?: boolean | undefined; }; export type IssuingPersonalizationDesignRejectionReasonsModel = { + /** + * The reason(s) the card logo was rejected. + */ 'card_logo'?: Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_binary_image' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'> | undefined; + /** + * The reason(s) the carrier text was rejected. + */ 'carrier_text'?: Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'> | undefined; }; +/** + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. + */ export type IssuingPersonalizationDesignModel = { + /** + * 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 | FileModel | undefined; + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ 'carrier_text'?: IssuingPersonalizationDesignCarrierTextModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key'?: string | undefined; + /** + * 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': { [key: string]: string; }; + /** + * Friendly display name. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.personalization_design'; + /** + * The physical bundle object belonging to this personalization design. + */ 'physical_bundle': string | IssuingPhysicalBundleModel; 'preferences': IssuingPersonalizationDesignPreferencesModel; 'rejection_reasons': IssuingPersonalizationDesignRejectionReasonsModel; + /** + * Whether this personalization design can be used to create cards. + */ 'status': 'active' | 'inactive' | 'rejected' | 'review'; }; export type IssuingCardShippingAddressValidationModel = { + /** + * The address validation capabilities to use. + */ 'mode': 'disabled' | 'normalization_only' | 'validation_and_normalization'; + /** + * The normalized shipping address. + */ 'normalized_address'?: AddressModel | undefined; + /** + * The validation result for the shipping address. + */ 'result'?: 'indeterminate' | 'likely_deliverable' | 'likely_undeliverable' | undefined; }; export type IssuingCardShippingCustomsModel = { + /** + * A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. + */ 'eori_number'?: string | undefined; }; export type IssuingCardShippingModel = { 'address': AddressModel; + /** + * Address validation details for the shipment. + */ 'address_validation'?: IssuingCardShippingAddressValidationModel | undefined; + /** + * The delivery company that shipped a card. + */ 'carrier'?: 'dhl' | 'fedex' | 'royal_mail' | 'usps' | undefined; + /** + * Additional information that may be required for clearing customs. + */ 'customs'?: IssuingCardShippingCustomsModel | undefined; + /** + * A unix timestamp representing a best estimate of when the card will be delivered. + */ 'eta'?: number | undefined; + /** + * Recipient name. + */ 'name': string; + /** + * The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. + */ 'phone_number'?: string | undefined; + /** + * Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + */ 'require_signature'?: boolean | undefined; + /** + * Shipment service, such as `standard` or `express`. + */ 'service': 'express' | 'priority' | 'standard'; + /** + * The delivery status of the card. + */ 'status'?: 'canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped' | 'submitted' | undefined; + /** + * A tracking number for a card shipment. + */ 'tracking_number'?: string | undefined; + /** + * A link to the shipping carrier's site where you can view detailed information about a card shipment. + */ 'tracking_url'?: string | undefined; + /** + * Packaging options. + */ 'type': 'bulk' | 'individual'; }; export type IssuingCardSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries'?: string[] | undefined; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories'?: Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'> | undefined; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries'?: string[] | undefined; + /** + * Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + */ 'spending_limits'?: IssuingCardSpendingLimitModel[] | undefined; + /** + * Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + */ 'spending_limits_currency'?: string | undefined; }; export type IssuingCardApplePayModel = { + /** + * Apple Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Apple Pay + */ 'ineligible_reason'?: 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region' | undefined; }; export type IssuingCardGooglePayModel = { + /** + * Google Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Google Pay + */ 'ineligible_reason'?: 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region' | undefined; }; export type IssuingCardWalletsModel = { 'apple_pay': IssuingCardApplePayModel; 'google_pay': IssuingCardGooglePayModel; + /** + * Unique identifier for a card used with digital wallets + */ 'primary_account_identifier'?: string | undefined; }; +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export type IssuingCardModel = { + /** + * The brand of the card. + */ 'brand': string; + /** + * The reason why the card was canceled. + */ 'cancellation_reason'?: 'design_rejected' | 'lost' | 'stolen' | undefined; 'cardholder': IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + */ 'currency': string; + /** + * The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'cvc'?: string | undefined; + /** + * The expiration month of the card. + */ 'exp_month': number; + /** + * The expiration year of the card. + */ 'exp_year': number; + /** + * The financial account this card is attached to. + */ 'financial_account'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last 4 digits of the card number. + */ 'last4': string; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ 'latest_fraud_warning'?: IssuingCardFraudWarningModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'number'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.card'; + /** + * The personalization design object belonging to this card. + */ 'personalization_design'?: string | IssuingPersonalizationDesignModel | undefined; + /** + * The latest card that replaces this card, if any. + */ 'replaced_by'?: string | IssuingCardModel | undefined; + /** + * The card this card replaces, if any. + */ 'replacement_for'?: string | IssuingCardModel | undefined; + /** + * The reason why the previous card needed to be replaced. + */ 'replacement_reason'?: 'damaged' | 'expired' | 'lost' | 'stolen' | undefined; + /** + * Text separate from cardholder name, printed on the card. + */ 'second_line'?: string | undefined; + /** + * Where and how the card will be shipped. + */ 'shipping'?: IssuingCardShippingModel | undefined; 'spending_controls': IssuingCardAuthorizationControlsModel; + /** + * Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + */ 'status': 'active' | 'canceled' | 'inactive'; + /** + * The type of the card. + */ 'type': 'physical' | 'virtual'; + /** + * Information relating to digital wallets (like Apple Pay and Google Pay). + */ 'wallets'?: IssuingCardWalletsModel | undefined; }; export type IssuingAuthorizationFleetCardholderPromptDataModel = { + /** + * [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + */ 'alphanumeric_id'?: string | undefined; + /** + * Driver ID. + */ 'driver_id'?: string | undefined; + /** + * Odometer reading. + */ 'odometer'?: number | undefined; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id'?: string | undefined; + /** + * User ID. + */ 'user_id'?: string | undefined; + /** + * Vehicle number. + */ 'vehicle_number'?: string | undefined; }; export type IssuingAuthorizationFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal'?: string | undefined; }; export type IssuingAuthorizationFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal'?: string | undefined; }; export type IssuingAuthorizationFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'local_amount_decimal'?: string | undefined; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'national_amount_decimal'?: string | undefined; }; export type IssuingAuthorizationFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel'?: IssuingAuthorizationFleetFuelPriceDataModel | undefined; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel'?: IssuingAuthorizationFleetNonFuelPriceDataModel | undefined; + /** + * Information about tax included in this transaction. + */ 'tax'?: IssuingAuthorizationFleetTaxDataModel | undefined; }; export type IssuingAuthorizationFleetDataModel = { + /** + * Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + */ 'cardholder_prompt_data'?: IssuingAuthorizationFleetCardholderPromptDataModel | undefined; + /** + * The type of purchase. + */ 'purchase_type'?: 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase' | undefined; + /** + * More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown'?: IssuingAuthorizationFleetReportedBreakdownModel | undefined; + /** + * The type of fuel service. + */ 'service_type'?: 'full_service' | 'non_fuel_transaction' | 'self_service' | undefined; }; export type IssuingAuthorizationFraudChallengeModel = { + /** + * The method by which the fraud challenge was delivered to the cardholder. + */ 'channel': 'sms'; + /** + * The status of the fraud challenge. + */ 'status': 'expired' | 'pending' | 'rejected' | 'undeliverable' | 'verified'; + /** + * If the challenge is not deliverable, the reason why. + */ 'undeliverable_reason'?: 'no_phone_number' | 'unsupported_phone_number' | undefined; }; export type IssuingAuthorizationFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code'?: string | undefined; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal'?: string | undefined; + /** + * The type of fuel that was purchased. + */ 'type'?: 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super' | undefined; + /** + * The units for `quantity_decimal`. + */ 'unit'?: 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon' | undefined; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal'?: string | undefined; }; export type IssuingAuthorizationMerchantDataModel = { + /** + * A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + */ 'category': string; + /** + * The merchant category code for the seller’s business + */ 'category_code': string; + /** + * City where the seller is located + */ 'city'?: string | undefined; + /** + * Country where the seller is located + */ 'country'?: string | undefined; + /** + * Name of the seller + */ 'name'?: string | undefined; + /** + * Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + */ 'network_id': string; + /** + * Postal code where the seller is located + */ 'postal_code'?: string | undefined; + /** + * State where the seller is located + */ 'state'?: string | undefined; + /** + * The seller's tax identification number. Currently populated for French merchants only. + */ 'tax_id'?: string | undefined; + /** + * An ID assigned by the seller to the location of the sale. + */ 'terminal_id'?: string | undefined; + /** + * URL provided by the merchant on a 3DS request + */ 'url'?: string | undefined; }; export type IssuingAuthorizationNetworkDataModel = { + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + */ 'acquiring_institution_id'?: string | undefined; + /** + * The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. + */ 'system_trace_audit_number'?: string | undefined; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id'?: string | undefined; }; export type IssuingAuthorizationPendingRequestModel = { + /** + * The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details'?: IssuingAuthorizationAmountDetailsModel | undefined; + /** + * 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; + /** + * If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + */ 'is_amount_controllable': boolean; + /** + * The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The local currency the merchant is requesting to authorize. + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score'?: number | undefined; }; export type IssuingAuthorizationRequestModel = { + /** + * The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details'?: IssuingAuthorizationAmountDetailsModel | undefined; + /** + * Whether this request was approved. + */ 'approved': boolean; + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The currency that was collected by the merchant and presented to the cardholder for the authorization. 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). + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score'?: number | undefined; + /** + * When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + */ 'reason': 'account_disabled' | 'card_active' | 'card_canceled' | 'card_expired' | 'card_inactive' | 'cardholder_blocked' | 'cardholder_inactive' | 'cardholder_verification_required' | 'insecure_authorization_method' | 'insufficient_funds' | 'network_fallback' | 'not_allowed' | 'pin_blocked' | 'spending_controls' | 'suspected_fraud' | 'verification_failed' | 'webhook_approved' | 'webhook_declined' | 'webhook_error' | 'webhook_timeout'; + /** + * If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. + */ 'reason_message'?: string | undefined; + /** + * Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. + */ 'requested_at'?: number | undefined; }; export type IssuingNetworkTokenDeviceModel = { + /** + * An obfuscated ID derived from the device ID. + */ 'device_fingerprint'?: string | undefined; + /** + * The IP address of the device at provisioning time. + */ 'ip_address'?: string | undefined; + /** + * The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + */ 'location'?: string | undefined; + /** + * The name of the device used for tokenization. + */ 'name'?: string | undefined; + /** + * The phone number of the device used for tokenization. + */ 'phone_number'?: string | undefined; + /** + * The type of device used for tokenization. + */ 'type'?: 'other' | 'phone' | 'watch' | undefined; }; export type IssuingNetworkTokenMastercardModel = { + /** + * A unique reference ID from MasterCard to represent the card account number. + */ 'card_reference_id'?: string | undefined; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to MasterCard. + */ 'token_requestor_id': string; + /** + * The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + */ 'token_requestor_name'?: string | undefined; }; export type IssuingNetworkTokenVisaModel = { + /** + * A unique reference ID from Visa to represent the card account number. + */ 'card_reference_id': string; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to Visa. + */ 'token_requestor_id': string; + /** + * Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + */ 'token_risk_score'?: string | undefined; }; export type IssuingNetworkTokenAddressModel = { + /** + * The street address of the cardholder tokenizing the card. + */ 'line1': string; + /** + * The postal code of the cardholder tokenizing the card. + */ 'postal_code': string; }; export type IssuingNetworkTokenWalletProviderModel = { + /** + * The wallet provider-given account ID of the digital wallet the token belongs to. + */ 'account_id'?: string | undefined; + /** + * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + */ 'account_trust_score'?: number | undefined; + /** + * The method used for tokenizing a card. + */ 'card_number_source'?: 'app' | 'manual' | 'on_file' | 'other' | undefined; 'cardholder_address'?: IssuingNetworkTokenAddressModel | undefined; + /** + * The name of the cardholder tokenizing the card. + */ 'cardholder_name'?: string | undefined; + /** + * An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + */ 'device_trust_score'?: number | undefined; + /** + * The hashed email address of the cardholder's account with the wallet provider. + */ 'hashed_account_email_address'?: string | undefined; + /** + * The reasons for suggested tokenization given by the card network. + */ 'reason_codes'?: Array<'account_card_too_new' | 'account_recently_changed' | 'account_too_new' | 'account_too_new_since_launch' | 'additional_device' | 'data_expired' | 'defer_id_v_decision' | 'device_recently_lost' | 'good_activity_history' | 'has_suspended_tokens' | 'high_risk' | 'inactive_account' | 'long_account_tenure' | 'low_account_score' | 'low_device_score' | 'low_phone_number_score' | 'network_service_error' | 'outside_home_territory' | 'provisioning_cardholder_mismatch' | 'provisioning_device_and_cardholder_mismatch' | 'provisioning_device_mismatch' | 'same_device_no_prior_authentication' | 'same_device_successful_prior_authentication' | 'software_update' | 'suspicious_activity' | 'too_many_different_cardholders' | 'too_many_recent_attempts' | 'too_many_recent_tokens'> | undefined; + /** + * The recommendation on responding to the tokenization request. + */ 'suggested_decision'?: 'approve' | 'decline' | 'require_auth' | undefined; + /** + * The version of the standard for mapping reason codes followed by the wallet provider. + */ 'suggested_decision_version'?: string | undefined; }; export type IssuingNetworkTokenNetworkDataModel = { 'device'?: IssuingNetworkTokenDeviceModel | undefined; 'mastercard'?: IssuingNetworkTokenMastercardModel | undefined; + /** + * The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + */ 'type': 'mastercard' | 'visa'; 'visa'?: IssuingNetworkTokenVisaModel | undefined; 'wallet_provider'?: IssuingNetworkTokenWalletProviderModel | undefined; }; +/** + * An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. + */ export type IssuingTokenModel = { + /** + * Card associated with this token. + */ 'card': string | IssuingCardModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The hashed ID derived from the device ID from the card network associated with the token. + */ 'device_fingerprint'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the token. + */ 'last4'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The token service provider / card network associated with the token. + */ 'network': 'mastercard' | 'visa'; 'network_data'?: IssuingNetworkTokenNetworkDataModel | undefined; + /** + * Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + */ 'network_updated_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.token'; + /** + * The usage state of the token. + */ 'status': 'active' | 'deleted' | 'requested' | 'suspended'; + /** + * The digital wallet for this token, if one was used. + */ 'wallet_provider'?: 'apple_pay' | 'google_pay' | 'samsung_pay' | undefined; }; export type IssuingTransactionAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee'?: number | undefined; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount'?: number | undefined; }; export type IssuingDisputeCanceledEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Date when order was canceled. + */ 'canceled_at'?: number | undefined; + /** + * Whether the cardholder was provided with a cancellation policy. + */ 'cancellation_policy_provided'?: boolean | undefined; + /** + * Reason for canceling the order. + */ 'cancellation_reason'?: string | undefined; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at'?: number | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description'?: string | undefined; + /** + * Whether the product was a merchandise or service. + */ 'product_type'?: 'merchandise' | 'service' | undefined; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status'?: 'merchant_rejected' | 'successful' | undefined; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at'?: number | undefined; }; export type IssuingDisputeDuplicateEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + */ 'card_statement'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + */ 'cash_receipt'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + */ 'check_image'?: string | FileModel | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + */ 'original_transaction'?: string | undefined; }; export type IssuingDisputeFraudulentEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; }; export type IssuingDisputeMerchandiseNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Date when the product was received. + */ 'received_at'?: number | undefined; + /** + * Description of the cardholder's attempt to return the product. + */ 'return_description'?: string | undefined; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status'?: 'merchant_rejected' | 'successful' | undefined; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at'?: number | undefined; }; export type IssuingDisputeNoValidAuthorizationEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; }; export type IssuingDisputeNotReceivedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at'?: number | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description'?: string | undefined; + /** + * Whether the product was a merchandise or service. + */ 'product_type'?: 'merchandise' | 'service' | undefined; }; export type IssuingDisputeOtherEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description'?: string | undefined; + /** + * Whether the product was a merchandise or service. + */ 'product_type'?: 'merchandise' | 'service' | undefined; }; export type IssuingDisputeServiceNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation'?: string | FileModel | undefined; + /** + * Date when order was canceled. + */ 'canceled_at'?: number | undefined; + /** + * Reason for canceling the order. + */ 'cancellation_reason'?: string | undefined; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation'?: string | undefined; + /** + * Date when the product was received. + */ 'received_at'?: number | undefined; }; @@ -2136,522 +5112,1511 @@ export type IssuingDisputeEvidenceModel = { 'no_valid_authorization'?: IssuingDisputeNoValidAuthorizationEvidenceModel | undefined; 'not_received'?: IssuingDisputeNotReceivedEvidenceModel | undefined; 'other'?: IssuingDisputeOtherEvidenceModel | undefined; + /** + * The reason for filing the dispute. Its value will match the field containing the evidence. + */ 'reason': 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'no_valid_authorization' | 'not_received' | 'other' | 'service_not_as_described'; 'service_not_as_described'?: IssuingDisputeServiceNotAsDescribedEvidenceModel | undefined; }; export type IssuingDisputeTreasuryModel = { + /** + * The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + */ 'debit_reversal'?: string | undefined; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + */ 'received_debit': string; }; +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export type IssuingDisputeModel = { + /** + * Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + */ 'amount': number; + /** + * List of balance transactions associated with the dispute. + */ 'balance_transactions'?: BalanceTransactionModel[] | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency the `transaction` was made in. + */ 'currency': string; 'evidence': IssuingDisputeEvidenceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + */ 'loss_reason'?: 'cardholder_authentication_issuer_liability' | 'eci5_token_transaction_with_tavv' | 'excess_disputes_in_timeframe' | 'has_not_met_the_minimum_dispute_amount_requirements' | 'invalid_duplicate_dispute' | 'invalid_incorrect_amount_dispute' | 'invalid_no_authorization' | 'invalid_use_of_disputes' | 'merchandise_delivered_or_shipped' | 'merchandise_or_service_as_described' | 'not_cancelled' | 'other' | 'refund_issued' | 'submitted_beyond_allowable_time_limit' | 'transaction_3ds_required' | 'transaction_approved_after_prior_fraud_dispute' | 'transaction_authorized' | 'transaction_electronically_read' | 'transaction_qualifies_for_visa_easy_payment_service' | 'transaction_unattended' | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.dispute'; + /** + * Current status of the dispute. + */ 'status': 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won'; + /** + * The transaction being disputed. + */ 'transaction': string | IssuingTransactionModel; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingDisputeTreasuryModel | undefined; }; export type IssuingTransactionNetworkDataModel = { + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code'?: string | undefined; + /** + * The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + */ 'processing_date'?: string | undefined; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id'?: string | undefined; }; export type IssuingTransactionFleetCardholderPromptDataModel = { + /** + * Driver ID. + */ 'driver_id'?: string | undefined; + /** + * Odometer reading. + */ 'odometer'?: number | undefined; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id'?: string | undefined; + /** + * User ID. + */ 'user_id'?: string | undefined; + /** + * Vehicle number. + */ 'vehicle_number'?: string | undefined; }; export type IssuingTransactionFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal'?: string | undefined; }; export type IssuingTransactionFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal'?: string | undefined; }; export type IssuingTransactionFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'local_amount_decimal'?: string | undefined; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'national_amount_decimal'?: string | undefined; }; export type IssuingTransactionFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel'?: IssuingTransactionFleetFuelPriceDataModel | undefined; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel'?: IssuingTransactionFleetNonFuelPriceDataModel | undefined; + /** + * Information about tax included in this transaction. + */ 'tax'?: IssuingTransactionFleetTaxDataModel | undefined; }; export type IssuingTransactionFleetDataModel = { + /** + * Answers to prompts presented to cardholder at point of sale. + */ 'cardholder_prompt_data'?: IssuingTransactionFleetCardholderPromptDataModel | undefined; + /** + * The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + */ 'purchase_type'?: string | undefined; + /** + * More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown'?: IssuingTransactionFleetReportedBreakdownModel | undefined; + /** + * The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + */ 'service_type'?: string | undefined; }; export type IssuingTransactionFlightDataLegModel = { + /** + * The three-letter IATA airport code of the flight's destination. + */ 'arrival_airport_code'?: string | undefined; + /** + * The airline carrier code. + */ 'carrier'?: string | undefined; + /** + * The three-letter IATA airport code that the flight departed from. + */ 'departure_airport_code'?: string | undefined; + /** + * The flight number. + */ 'flight_number'?: string | undefined; + /** + * The flight's service class. + */ 'service_class'?: string | undefined; + /** + * Whether a stopover is allowed on this flight. + */ 'stopover_allowed'?: boolean | undefined; }; export type IssuingTransactionFlightDataModel = { + /** + * The time that the flight departed. + */ 'departure_at'?: number | undefined; + /** + * The name of the passenger. + */ 'passenger_name'?: string | undefined; + /** + * Whether the ticket is refundable. + */ 'refundable'?: boolean | undefined; + /** + * The legs of the trip. + */ 'segments'?: IssuingTransactionFlightDataLegModel[] | undefined; + /** + * The travel agency that issued the ticket. + */ 'travel_agency'?: string | undefined; }; export type IssuingTransactionFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code'?: string | undefined; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal'?: string | undefined; + /** + * The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + */ 'type': string; + /** + * The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + */ 'unit': string; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal': string; }; export type IssuingTransactionLodgingDataModel = { + /** + * The time of checking into the lodging. + */ 'check_in_at'?: number | undefined; + /** + * The number of nights stayed at the lodging. + */ 'nights'?: number | undefined; }; export type IssuingTransactionReceiptDataModel = { + /** + * The description of the item. The maximum length of this field is 26 characters. + */ 'description'?: string | undefined; + /** + * The quantity of the item. + */ 'quantity'?: number | undefined; + /** + * The total for this line item in cents. + */ 'total'?: number | undefined; + /** + * The unit cost of the item in cents. + */ 'unit_cost'?: number | undefined; }; export type IssuingTransactionPurchaseDetailsModel = { + /** + * Fleet-specific information for transactions using Fleet cards. + */ 'fleet'?: IssuingTransactionFleetDataModel | undefined; + /** + * Information about the flight that was purchased with this transaction. + */ 'flight'?: IssuingTransactionFlightDataModel | undefined; + /** + * Information about fuel that was purchased with this transaction. + */ 'fuel'?: IssuingTransactionFuelDataModel | undefined; + /** + * Information about lodging that was purchased with this transaction. + */ 'lodging'?: IssuingTransactionLodgingDataModel | undefined; + /** + * The line items in the purchase. + */ 'receipt'?: IssuingTransactionReceiptDataModel[] | undefined; + /** + * A merchant-specific order number. + */ 'reference'?: string | undefined; }; export type IssuingTransactionTreasuryModel = { + /** + * The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + */ 'received_credit'?: string | undefined; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + */ 'received_debit'?: string | undefined; }; +/** + * Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) + */ export type IssuingTransactionModel = { + /** + * The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details'?: IssuingTransactionAmountDetailsModel | undefined; + /** + * The `Authorization` object that led to this transaction. + */ 'authorization'?: string | IssuingAuthorizationModel | undefined; + /** + * ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * The card used to make this transaction. + */ 'card': string | IssuingCardModel; + /** + * The cardholder to whom this transaction belongs. + */ 'cardholder'?: string | IssuingCardholderModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * If you've disputed the transaction, the ID of the dispute. + */ 'dispute'?: string | IssuingDisputeModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + */ 'merchant_amount': number; + /** + * The currency with which the merchant is taking payment. + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the transaction, such as processing dates, set by the card network. + */ 'network_data'?: IssuingTransactionNetworkDataModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.transaction'; + /** + * Additional purchase information that is optionally provided by the merchant. + */ 'purchase_details'?: IssuingTransactionPurchaseDetailsModel | undefined; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingTransactionTreasuryModel | undefined; + /** + * The nature of the transaction. + */ 'type': 'capture' | 'refund'; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + */ 'wallet'?: 'apple_pay' | 'google_pay' | 'samsung_pay' | undefined; }; export type IssuingAuthorizationTreasuryModel = { + /** + * The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + */ 'received_credits': string[]; + /** + * The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + */ 'received_debits': string[]; + /** + * The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + */ 'transaction'?: string | undefined; }; export type IssuingAuthorizationAuthenticationExemptionModel = { + /** + * The entity that requested the exemption, either the acquiring merchant or the Issuing user. + */ 'claimed_by': 'acquirer' | 'issuer'; + /** + * The specific exemption claimed for this authorization. + */ 'type': 'low_value_transaction' | 'transaction_risk_analysis' | 'unknown'; }; export type IssuingAuthorizationThreeDSecureModel = { + /** + * The outcome of the 3D Secure authentication request. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'failed' | 'required'; }; export type IssuingAuthorizationVerificationDataModel = { + /** + * Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + */ 'address_line1_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + */ 'address_postal_code_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The exemption applied to this authorization. + */ 'authentication_exemption'?: IssuingAuthorizationAuthenticationExemptionModel | undefined; + /** + * Whether the cardholder provided a CVC and if it matched Stripe’s record. + */ 'cvc_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided an expiry date and if it matched Stripe’s record. + */ 'expiry_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The postal code submitted as part of the authorization used for postal code verification. + */ 'postal_code'?: string | undefined; + /** + * 3D Secure details. + */ 'three_d_secure'?: IssuingAuthorizationThreeDSecureModel | undefined; }; +/** + * When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + */ export type IssuingAuthorizationModel = { + /** + * The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details'?: IssuingAuthorizationAmountDetailsModel | undefined; + /** + * Whether the authorization has been approved. + */ 'approved': boolean; + /** + * How the card details were provided. + */ 'authorization_method': 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe'; + /** + * List of balance transactions associated with this authorization. + */ 'balance_transactions': BalanceTransactionModel[]; 'card': IssuingCardModel; + /** + * The cardholder to whom this authorization belongs. + */ 'cardholder'?: string | IssuingCardholderModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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; + /** + * Fleet-specific information for authorizations using Fleet cards. + */ 'fleet'?: IssuingAuthorizationFleetDataModel | undefined; + /** + * Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + */ 'fraud_challenges'?: IssuingAuthorizationFraudChallengeModel[] | undefined; + /** + * Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + */ 'fuel'?: IssuingAuthorizationFuelDataModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + */ 'merchant_amount': number; + /** + * The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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). + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the authorization, such as identifiers, set by the card network. + */ 'network_data'?: IssuingAuthorizationNetworkDataModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.authorization'; + /** + * The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + */ 'pending_request'?: IssuingAuthorizationPendingRequestModel | undefined; + /** + * History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + */ 'request_history': IssuingAuthorizationRequestModel[]; + /** + * The current status of the authorization in its lifecycle. + */ 'status': 'closed' | 'expired' | 'pending' | 'reversed'; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + */ 'transactions': IssuingTransactionModel[]; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + */ 'treasury'?: IssuingAuthorizationTreasuryModel | undefined; 'verification_data': IssuingAuthorizationVerificationDataModel; + /** + * Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + */ 'verified_by_fraud_challenge'?: boolean | undefined; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + */ 'wallet'?: string | undefined; }; export type DeletedBankAccountModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; }; export type DeletedCardModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; }; export type PayoutsTraceIdModel = { + /** + * Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + */ 'status': string; + /** + * The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + */ 'value'?: string | undefined; }; +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export type PayoutModel = { + /** + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + */ 'amount': number; + /** + * The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee'?: string | ApplicationFeeModel | undefined; + /** + * The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee_amount'?: number | undefined; + /** + * Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + */ 'arrival_date': number; + /** + * Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + */ 'automatic': boolean; + /** + * ID of the balance transaction that describes the impact of this payout on your account balance. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * ID of the bank account or card the payout is sent to. + */ 'destination'?: string | BankAccountModel | CardModel | DeletedBankAccountModel | DeletedCardModel | undefined; + /** + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + */ 'failure_balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + */ 'failure_code'?: string | undefined; + /** + * Message that provides the reason for a payout failure, if available. + */ 'failure_message'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + */ 'method': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payout'; + /** + * If the payout reverses another, this is the ID of the original payout. + */ 'original_payout'?: string | PayoutModel | undefined; + /** + * ID of the v2 FinancialAccount the funds are sent to. + */ 'payout_method'?: string | undefined; + /** + * If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + */ 'reconciliation_status': 'completed' | 'in_progress' | 'not_applicable'; + /** + * If the payout reverses, this is the ID of the payout that reverses this payout. + */ 'reversed_by'?: string | PayoutModel | undefined; + /** + * The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + */ 'source_type': string; + /** + * Extra information about a payout that displays on the user's bank statement. + */ 'statement_descriptor'?: string | undefined; + /** + * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + */ 'status': string; + /** + * A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + */ 'trace_id'?: PayoutsTraceIdModel | undefined; + /** + * Can be `bank_account` or `card`. + */ 'type': 'bank_account' | 'card'; }; export type ReserveTransactionModel = { 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reserve_transaction'; }; export type TaxDeductedAtSourceModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_deducted_at_source'; + /** + * The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_end': number; + /** + * The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_start': number; + /** + * The TAN that was supplied to Stripe when TDS was assessed + */ 'tax_deduction_account_number': string; }; +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export type TopupModel = { + /** + * Amount transferred. + */ 'amount': number; + /** + * ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + */ 'expected_availability_date'?: number | undefined; + /** + * Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + */ 'failure_code'?: string | undefined; + /** + * Message to user further explaining reason for top-up failure if available. + */ 'failure_message'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'topup'; + /** + * The source field is deprecated. It might not always be present in the API response. + */ 'source'?: SourceModel | undefined; + /** + * Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + */ 'statement_descriptor'?: string | undefined; + /** + * The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + */ 'status': 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded'; + /** + * A string that identifies this top-up as part of a group. + */ 'transfer_group'?: string | undefined; }; +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export type BalanceTransactionModel = { + /** + * Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + */ 'amount': number; + /** + * The date that the transaction's net funds become available in the Stripe balance. + */ 'available_on': number; + /** + * The balance that this transaction impacts. + */ 'balance_type'?: 'issuing' | 'payments' | 'refund_and_dispute_prefunding' | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + */ 'exchange_rate'?: number | undefined; + /** + * Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + */ 'fee': number; + /** + * Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + */ 'fee_details': FeeModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + */ 'net': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_transaction'; + /** + * Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + */ 'reporting_category': string; + /** + * This transaction relates to the Stripe object. + */ 'source'?: string | ApplicationFeeModel | ChargeModel | ConnectCollectionTransferModel | CustomerCashBalanceTransactionModel | DisputeModel | FeeRefundModel | IssuingAuthorizationModel | IssuingDisputeModel | IssuingTransactionModel | PayoutModel | RefundModel | ReserveTransactionModel | TaxDeductedAtSourceModel | TopupModel | TransferModel | TransferReversalModel | undefined; + /** + * The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + */ 'status': string; + /** + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + */ 'type': 'adjustment' | 'advance' | 'advance_funding' | 'anticipation_repayment' | 'application_fee' | 'application_fee_refund' | 'charge' | 'climate_order_purchase' | 'climate_order_refund' | 'connect_collection_transfer' | 'contribution' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'issuing_dispute' | 'issuing_transaction' | 'obligation_outbound' | 'obligation_reversal_inbound' | 'payment' | 'payment_failure_refund' | 'payment_network_reserve_hold' | 'payment_network_reserve_release' | 'payment_refund' | 'payment_reversal' | 'payment_unreconciled' | 'payout' | 'payout_cancel' | 'payout_failure' | 'payout_minimum_balance_hold' | 'payout_minimum_balance_release' | 'refund' | 'refund_failure' | 'reserve_transaction' | 'reserved_funds' | 'stripe_balance_payment_debit' | 'stripe_balance_payment_debit_reversal' | 'stripe_fee' | 'stripe_fx_fee' | 'tax_fee' | 'topup' | 'topup_reversal' | 'transfer' | 'transfer_cancel' | 'transfer_failure' | 'transfer_refund'; }; export type PlatformEarningFeeSourceModel = { + /** + * Charge ID that created this application fee. + */ 'charge'?: string | undefined; + /** + * Payout ID that created this application fee. + */ 'payout'?: string | undefined; + /** + * Type of object that created the application fee. + */ 'type': 'charge' | 'payout'; }; export type ApplicationFeeModel = { + /** + * ID of the Stripe account this fee was taken from. + */ 'account': string | AccountModel; + /** + * Amount earned, in cents (or local equivalent). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + */ 'amount_refunded': number; + /** + * ID of the Connect application that earned the fee. + */ 'application': string | ApplicationModel; + /** + * Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * ID of the charge that the application fee was taken from. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + */ 'fee_source'?: PlatformEarningFeeSourceModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application_fee'; + /** + * ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + */ 'originating_transaction'?: string | ChargeModel | undefined; + /** + * Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the fee. + */ 'refunds': { + /** + * Details about each object. + */ 'data': FeeRefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; export type ChargeFraudDetailsModel = { + /** + * Assessments from Stripe. If set, the value is `fraudulent`. + */ 'stripe_report'?: string | undefined; + /** + * Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + */ 'user_report'?: string | undefined; }; export type RuleModel = { + /** + * The action taken on the payment. + */ 'action': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The predicate to evaluate the payment against. + */ 'predicate': string; }; export type ChargeOutcomeModel = { + /** + * An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines). + */ 'advice_code'?: 'confirm_card_data' | 'do_not_try_again' | 'try_again_later' | undefined; + /** + * For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + */ 'network_advice_code'?: string | undefined; + /** + * For charges declined by the network, an alphanumeric code which indicates the reason the charge failed. + */ 'network_decline_code'?: string | undefined; + /** + * Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + */ 'network_status'?: string | undefined; + /** + * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + */ 'reason'?: string | undefined; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + */ 'risk_level'?: string | undefined; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + */ 'risk_score'?: number | undefined; + /** + * The ID of the Radar rule that matched the payment, if applicable. + */ 'rule'?: string | RuleModel | undefined; + /** + * A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + */ 'seller_message'?: string | undefined; + /** + * Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + */ 'type': string; }; export type PaymentMethodDetailsAchCreditTransferModel = { + /** + * Account number to transfer funds to. + */ 'account_number'?: string | undefined; + /** + * Name of the bank associated with the routing number. + */ 'bank_name'?: string | undefined; + /** + * Routing transit number for the bank account to transfer funds to. + */ 'routing_number'?: string | undefined; + /** + * SWIFT code of the bank associated with the routing number. + */ 'swift_code'?: string | undefined; }; export type PaymentMethodDetailsAchDebitModel = { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * Routing transit number of the bank account. + */ 'routing_number'?: string | undefined; }; export type PaymentMethodDetailsAcssDebitModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Institution number of the bank account + */ 'institution_number'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; + /** + * Transit number of the bank account. + */ 'transit_number'?: string | undefined; }; export type PaymentMethodDetailsAffirmModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * The Affirm transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsAfterpayClearpayModel = { + /** + * The Afterpay order ID associated with this payment intent. + */ 'order_id'?: string | undefined; + /** + * Order identifier shown to the merchant in Afterpay’s online portal. + */ 'reference'?: string | undefined; }; export type PaymentFlowsPrivatePaymentMethodsAlipayDetailsModel = { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'buyer_id'?: string | undefined; + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Transaction ID of this particular Alipay transaction. + */ 'transaction_id'?: string | undefined; }; export type AlmaInstallmentsModel = { + /** + * The number of installments. + */ 'count': number; }; export type PaymentMethodDetailsAlmaModel = { 'installments'?: AlmaInstallmentsModel | undefined; + /** + * The Alma transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsPassthroughCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month'?: number | undefined; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year'?: number | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; }; export type AmazonPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type'?: 'card' | undefined; }; export type PaymentMethodDetailsAmazonPayModel = { 'funding'?: AmazonPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Amazon Pay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsAuBecsDebitModel = { + /** + * Bank-State-Branch number of the bank account. + */ 'bsb_number'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; }; export type PaymentMethodDetailsBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code'?: string | undefined; }; export type PaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic'?: string | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language'?: 'de' | 'en' | 'fr' | 'nl' | undefined; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; export type PaymentMethodDetailsBillieModel = { + /** + * The Billie transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsBlikModel = { + /** + * A unique and immutable identifier assigned by BLIK to every buyer. + */ 'buyer_id'?: string | undefined; }; export type PaymentMethodDetailsBoletoModel = { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ 'tax_id': string; }; export type PaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check'?: string | undefined; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check'?: string | undefined; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check'?: string | undefined; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel = { + /** + * Indicates whether or not the capture window is extended beyond the standard authorization. + */ 'status': 'disabled' | 'enabled'; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel = { + /** + * Indicates whether or not the incremental authorization feature is supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardInstallmentsPlanModel = { + /** + * For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + */ 'count'?: number | undefined; + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ 'interval'?: 'month' | undefined; + /** + * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + */ 'type': 'bonus' | 'fixed_count' | 'revolving'; }; export type PaymentMethodDetailsCardInstallmentsModel = { + /** + * Installment plan selected for the payment. + */ 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel = { + /** + * Indicates whether or not multiple captures are supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel = { + /** + * The maximum amount that can be captured. + */ 'maximum_amount_capturable': number; + /** + * Indicates whether or not the authorized amount can be over-captured. + */ 'status': 'available' | 'unavailable'; }; export type ThreeDSecureDetailsChargeModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow'?: 'challenge' | 'frictionless' | undefined; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator'?: '01' | '02' | '05' | '06' | '07' | undefined; + /** + * The exemption requested via 3DS and accepted by the issuer at authentication time. + */ 'exemption_indicator'?: 'low_risk' | 'none' | undefined; + /** + * Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + * the outcome of Stripe's internal risk assessment. + */ 'exemption_indicator_applied'?: boolean | undefined; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result'?: 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error' | undefined; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason'?: 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected' | undefined; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id'?: string | undefined; + /** + * The version of 3D Secure that was used. + */ 'version'?: '1.0.2' | '2.1.0' | '2.2.0' | undefined; }; @@ -2664,9 +6629,21 @@ export type PaymentMethodDetailsCardWalletLinkModel = { }; export type PaymentMethodDetailsCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address'?: AddressModel | undefined; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name'?: string | undefined; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address'?: AddressModel | undefined; }; @@ -2675,60 +6652,160 @@ export type PaymentMethodDetailsCardWalletSamsungPayModel = { }; export type PaymentMethodDetailsCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address'?: AddressModel | undefined; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name'?: string | undefined; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address'?: AddressModel | undefined; }; export type PaymentMethodDetailsCardWalletModel = { 'amex_express_checkout'?: PaymentMethodDetailsCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodDetailsCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodDetailsCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodDetailsCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodDetailsCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodDetailsCardModel = { + /** + * The authorized amount. + */ 'amount_authorized'?: number | undefined; + /** + * Authorization code on the charge. + */ 'authorization_code'?: string | undefined; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand'?: string | undefined; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks'?: PaymentMethodDetailsCardChecksModel | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; 'extended_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel | undefined; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; 'incremental_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments'?: PaymentMethodDetailsCardInstallmentsModel | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment or created by it. + */ 'mandate'?: string | undefined; 'multicapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network'?: string | undefined; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentMethodDetailsCardNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id'?: string | undefined; 'overcapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel | undefined; + /** + * Status of a card based on the card issuer. + */ 'regulated_status'?: 'regulated' | 'unregulated' | undefined; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure'?: ThreeDSecureDetailsChargeModel | undefined; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet'?: PaymentMethodDetailsCardWalletModel | undefined; }; export type PaymentMethodDetailsCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id'?: string | undefined; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag'?: string | undefined; + /** + * A unique and immutable identifier of payments assigned by Cash App + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsCryptoModel = { + /** + * The wallet address of the customer. + */ 'buyer_address'?: string | undefined; + /** + * The blockchain network that the transaction was sent on. + */ 'network'?: 'base' | 'ethereum' | 'polygon' | 'solana' | undefined; + /** + * The token currency that the transaction was sent with. + */ 'token_currency'?: 'usdc' | 'usdg' | 'usdp' | undefined; + /** + * The blockchain transaction hash of the crypto payment. + */ 'transaction_hash'?: string | undefined; }; @@ -2737,103 +6814,281 @@ export type PaymentMethodDetailsCustomerBalanceModel = { }; export type PaymentMethodDetailsEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank'?: 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau' | undefined; + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ 'verified_name'?: string | undefined; }; export type PaymentMethodDetailsFpxModel = { + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; + /** + * Unique transaction id generated by FPX for every request from the merchant + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsGiropayModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ 'verified_name'?: string | undefined; }; export type PaymentMethodDetailsGrabpayModel = { + /** + * Unique transaction id generated by GrabPay + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank'?: 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe' | undefined; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic'?: 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U' | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Unique transaction ID generated by iDEAL. + */ 'transaction_id'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; export type PaymentMethodDetailsInteracPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'savings' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram'?: string | undefined; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name'?: string | undefined; + /** + * Identifier for this transaction. + */ 'authorization_code'?: string | undefined; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code'?: string | undefined; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method'?: string | undefined; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name'?: string | undefined; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results'?: string | undefined; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information'?: string | undefined; }; export type PaymentMethodDetailsInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand'?: string | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * A high-level description of the type of cards issued in this range. + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card'?: string | undefined; + /** + * The name of the card's issuing bank. + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network'?: string | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id'?: string | undefined; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales'?: string[] | undefined; + /** + * How card details were read in this transaction. + */ 'read_method'?: 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2' | undefined; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt'?: PaymentMethodDetailsInteracPresentReceiptModel | undefined; }; export type PaymentMethodDetailsKakaoPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id'?: string | undefined; + /** + * The Kakao Pay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type KlarnaAddressModel = { + /** + * The payer address country + */ 'country'?: string | undefined; }; export type KlarnaPayerDetailsModel = { + /** + * The payer's address + */ 'address'?: KlarnaAddressModel | undefined; }; export type PaymentMethodDetailsKlarnaModel = { + /** + * The payer details for this transaction. + */ 'payer_details'?: KlarnaPayerDetailsModel | undefined; + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ 'payment_method_category'?: string | undefined; + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ 'preferred_locale'?: string | undefined; }; export type PaymentMethodDetailsKonbiniStoreModel = { + /** + * The name of the convenience store chain where the payment was completed. + */ 'chain'?: 'familymart' | 'lawson' | 'ministop' | 'seicomart' | undefined; }; export type PaymentMethodDetailsKonbiniModel = { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ 'store'?: PaymentMethodDetailsKonbiniStoreModel | undefined; }; export type PaymentMethodDetailsKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand'?: 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori' | undefined; + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id'?: string | undefined; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4'?: string | undefined; + /** + * The Korean Card transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsLinkModel = { + /** + * 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 | undefined; }; @@ -2842,43 +7097,105 @@ export type PaymentMethodDetailsMbWayModel = { }; export type InternalCardModel = { + /** + * Brand of the card used in the transaction + */ 'brand'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card + */ 'country'?: string | undefined; + /** + * Two digit number representing the card's expiration month + */ 'exp_month'?: number | undefined; + /** + * Two digit number representing the card's expiration year + */ 'exp_year'?: number | undefined; + /** + * The last 4 digits of the card + */ 'last4'?: string | undefined; }; export type PaymentMethodDetailsMobilepayModel = { + /** + * Internal card details + */ 'card'?: InternalCardModel | undefined; }; export type PaymentMethodDetailsMultibancoModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity'?: string | undefined; + /** + * Reference number associated with this Multibanco payment. + */ 'reference'?: string | undefined; }; export type PaymentMethodDetailsNaverPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id'?: string | undefined; + /** + * The Naver Pay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name'?: string | undefined; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix'?: string | undefined; }; export type PaymentMethodDetailsOxxoModel = { + /** + * OXXO reference number + */ 'number'?: string | undefined; }; export type PaymentMethodDetailsP24Model = { + /** + * The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ 'bank'?: 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank' | undefined; + /** + * Unique reference for this Przelewy24 payment. + */ 'reference'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ 'verified_name'?: string | undefined; }; @@ -2887,75 +7204,184 @@ export type PaymentMethodDetailsPayByBankModel = { }; export type PaymentMethodDetailsPaycoModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id'?: string | undefined; + /** + * The Payco transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsPaynowModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Reference number associated with this PayNow payment + */ 'reference'?: string | undefined; }; export type PaypalSellerProtectionModel = { + /** + * An array of conditions that are covered for the transaction, if applicable. + */ 'dispute_categories'?: Array<'fraudulent' | 'product_not_received'> | undefined; + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + */ 'status': 'eligible' | 'not_eligible' | 'partially_eligible'; }; export type PaymentMethodDetailsPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country'?: string | undefined; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email'?: string | undefined; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id'?: string | undefined; + /** + * Owner's full name. Values provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_name'?: string | undefined; + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + */ 'seller_protection'?: PaypalSellerProtectionModel | undefined; + /** + * A unique ID generated by PayPal for this transaction. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsPixModel = { + /** + * Unique transaction id generated by BCB + */ 'bank_transaction_id'?: string | undefined; }; export type PaymentMethodDetailsPromptpayModel = { + /** + * Bill reference generated by PromptPay + */ 'reference'?: string | undefined; }; export type RevolutPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type'?: 'card' | undefined; }; export type PaymentMethodDetailsRevolutPayModel = { 'funding'?: RevolutPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Revolut Pay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsSamsungPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id'?: string | undefined; + /** + * The Samsung Pay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsSatispayModel = { + /** + * The Satispay transaction ID associated with this payment. + */ 'transaction_id'?: string | undefined; }; export type PaymentMethodDetailsSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code'?: string | undefined; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four characters of the IBAN. + */ 'last4'?: string | undefined; + /** + * Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + */ 'mandate'?: string | undefined; }; export type PaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic'?: string | undefined; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country'?: string | undefined; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit'?: string | PaymentMethodModel | undefined; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate'?: string | MandateModel | undefined; + /** + * Last four characters of the IBAN. + */ 'iban_last4'?: string | undefined; + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ 'preferred_language'?: 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' | undefined; + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; @@ -2964,8 +7390,17 @@ export type PaymentMethodDetailsStripeAccountModel = { }; export type PaymentMethodDetailsSwishModel = { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + */ 'fingerprint'?: string | undefined; + /** + * Payer bank reference number for the payment + */ 'payment_reference'?: string | undefined; + /** + * The last four digits of the Swish account phone number + */ 'verified_phone_last4'?: string | undefined; }; @@ -2974,13 +7409,37 @@ export type PaymentMethodDetailsTwintModel = { }; export type PaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * Reference number to locate ACH payments with customer's bank. + */ 'payment_reference'?: string | undefined; + /** + * Routing number of the bank account. + */ 'routing_number'?: string | undefined; }; @@ -2989,9 +7448,21 @@ export type PaymentMethodDetailsWechatModel = { }; export type PaymentMethodDetailsWechatPayModel = { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Transaction ID of this particular WeChat Pay transaction. + */ 'transaction_id'?: string | undefined; }; @@ -3051,6 +7522,11 @@ export type PaymentMethodDetailsModel = { 'stripe_account'?: PaymentMethodDetailsStripeAccountModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentMethodDetailsUsBankAccountModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -3058,320 +7534,894 @@ export type PaymentMethodDetailsModel = { 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export type RadarRadarOptionsModel = { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ 'session'?: string | undefined; }; export type RadarReviewResourceLocationModel = { + /** + * The city where the payment originated. + */ 'city'?: string | undefined; + /** + * Two-letter ISO code representing the country where the payment originated. + */ 'country'?: string | undefined; + /** + * The geographic latitude where the payment originated. + */ 'latitude'?: number | undefined; + /** + * The geographic longitude where the payment originated. + */ 'longitude'?: number | undefined; + /** + * The state/county/province/region where the payment originated. + */ 'region'?: string | undefined; }; export type RadarReviewResourceSessionModel = { + /** + * The browser used in this browser session (e.g., `Chrome`). + */ 'browser'?: string | undefined; + /** + * Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + */ 'device'?: string | undefined; + /** + * The platform for the browser session (e.g., `Macintosh`). + */ 'platform'?: string | undefined; + /** + * The version for the browser session (e.g., `61.0.3163.100`). + */ 'version'?: string | undefined; }; +/** + * Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ export type ReviewModel = { + /** + * The ZIP or postal code of the card used, if applicable. + */ 'billing_zip'?: string | undefined; + /** + * The charge associated with this review. + */ 'charge'?: string | ChargeModel | undefined; + /** + * The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'closed_reason'?: 'acknowledged' | 'approved' | 'canceled' | 'disputed' | 'payment_never_settled' | 'redacted' | 'refunded' | 'refunded_as_fraud' | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The IP address where the payment originated. + */ 'ip_address'?: string | undefined; + /** + * Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + */ 'ip_address_location'?: RadarReviewResourceLocationModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'review'; + /** + * If `true`, the review needs action. + */ 'open': boolean; + /** + * The reason the review was opened. One of `rule` or `manual`. + */ 'opened_reason': 'manual' | 'rule'; + /** + * The PaymentIntent ID associated with this review, if one exists. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'reason': string; + /** + * Information related to the browsing session of the user who initiated the payment. + */ 'session'?: RadarReviewResourceSessionModel | undefined; }; export type ChargeTransferDataModel = { + /** + * The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + */ 'amount'?: number | undefined; + /** + * ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + */ 'destination': string | AccountModel; }; +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export type ChargeModel = { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + */ 'amount_captured': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + */ 'amount_refunded': number; + /** + * ID of the Connect application that created the charge. + */ 'application'?: string | ApplicationModel | undefined; + /** + * The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee'?: string | ApplicationFeeModel | undefined; + /** + * The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee_amount'?: number | undefined; + /** + * ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + */ 'balance_transaction'?: string | BalanceTransactionModel | undefined; 'billing_details': BillingDetailsModel; + /** + * The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + */ 'calculated_statement_descriptor'?: string | undefined; + /** + * If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + */ 'captured': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer this charge is for if one exists. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Whether the charge has been disputed. + */ 'disputed': boolean; + /** + * ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + */ 'failure_balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + */ 'failure_code'?: string | undefined; + /** + * Message to user further explaining reason for charge failure if available. + */ 'failure_message'?: string | undefined; + /** + * Information on fraud assessments for the charge. + */ 'fraud_details'?: ChargeFraudDetailsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'charge'; + /** + * The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + */ 'outcome'?: ChargeOutcomeModel | undefined; + /** + * `true` if the charge succeeded, or was successfully authorized for later capture. + */ 'paid': boolean; + /** + * ID of the PaymentIntent associated with this charge, if one exists. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * ID of the payment method used in this charge. + */ 'payment_method'?: string | undefined; + /** + * Details about the payment method at the time of the transaction. + */ 'payment_method_details'?: PaymentMethodDetailsModel | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; 'radar_options'?: RadarRadarOptionsModel | undefined; + /** + * This is the email address that the receipt for this charge was sent to. + */ 'receipt_email'?: string | undefined; + /** + * This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + */ 'receipt_number'?: string | undefined; + /** + * This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + */ 'receipt_url'?: string | undefined; + /** + * Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the charge. + */ 'refunds'?: { + /** + * Details about each object. + */ 'data': RefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the review associated with this charge if one exists. + */ 'review'?: string | ReviewModel | undefined; + /** + * Shipping information for the charge. + */ 'shipping'?: ShippingModel | undefined; + /** + * The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + */ 'source_transfer'?: string | TransferModel | undefined; + /** + * For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + */ 'statement_descriptor'?: string | undefined; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + */ 'statement_descriptor_suffix'?: string | undefined; + /** + * The status of the payment is either `succeeded`, `pending`, or `failed`. + */ 'status': 'failed' | 'pending' | 'succeeded'; + /** + * ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + */ 'transfer'?: string | TransferModel | undefined; + /** + * An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ 'transfer_data'?: ChargeTransferDataModel | undefined; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group'?: string | undefined; }; export type PaymentIntentNextActionAlipayHandleRedirectModel = { + /** + * The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + */ 'native_data'?: string | undefined; + /** + * The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + */ 'native_url'?: string | undefined; + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url'?: string | undefined; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url'?: string | undefined; }; export type PaymentIntentNextActionBoletoModel = { + /** + * The timestamp after which the boleto expires. + */ 'expires_at'?: number | undefined; + /** + * The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + */ 'hosted_voucher_url'?: string | undefined; + /** + * The boleto number. + */ 'number'?: string | undefined; + /** + * The URL to the downloadable boleto voucher PDF. + */ 'pdf'?: string | undefined; }; export type PaymentIntentNextActionCardAwaitNotificationModel = { + /** + * The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ 'charge_attempt_at'?: number | undefined; + /** + * For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + */ 'customer_approval_required'?: boolean | undefined; }; export type PaymentIntentNextActionCashappQrCodeModel = { + /** + * The date (unix timestamp) when the QR code expires. + */ 'expires_at': number; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + */ 'hosted_instructions_url': string; + /** + * The url for mobile redirect based auth + */ 'mobile_auth_url': string; 'qr_code': PaymentIntentNextActionCashappQrCodeModel; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type FundingInstructionsBankTransferAbaRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The ABA account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The ABA routing number + */ 'routing_number': string; }; +/** + * Iban Records contain E.U. bank account details per the SEPA format. + */ export type FundingInstructionsBankTransferIbanRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The BIC/SWIFT code of the account. + */ 'bic': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * The IBAN of the account. + */ 'iban': string; }; +/** + * Sort Code Records contain U.K. bank account details per the sort code format. + */ export type FundingInstructionsBankTransferSortCodeRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; 'bank_address': AddressModel; + /** + * The six-digit sort code + */ 'sort_code': string; }; +/** + * SPEI Records contain Mexico bank account details per the SPEI format. + */ export type FundingInstructionsBankTransferSpeiRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The three-digit bank code + */ 'bank_code': string; + /** + * The short banking institution name + */ 'bank_name': string; + /** + * The CLABE number + */ 'clabe': string; }; +/** + * SWIFT Records contain U.S. bank account details per the SWIFT format. + */ export type FundingInstructionsBankTransferSwiftRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The SWIFT code + */ 'swift_code': string; }; +/** + * Zengin Records contain Japan bank account details per the Zengin format. + */ export type FundingInstructionsBankTransferZenginRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name'?: string | undefined; + /** + * The account number + */ 'account_number'?: string | undefined; + /** + * The bank account type. In Japan, this can only be `futsu` or `toza`. + */ 'account_type'?: string | undefined; 'bank_address': AddressModel; + /** + * The bank code of the account + */ 'bank_code'?: string | undefined; + /** + * The bank name of the account + */ 'bank_name'?: string | undefined; + /** + * The branch code of the account + */ 'branch_code'?: string | undefined; + /** + * The branch name of the account + */ 'branch_name'?: string | undefined; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type FundingInstructionsBankTransferFinancialAddressModel = { 'aba'?: FundingInstructionsBankTransferAbaRecordModel | undefined; 'iban'?: FundingInstructionsBankTransferIbanRecordModel | undefined; 'sort_code'?: FundingInstructionsBankTransferSortCodeRecordModel | undefined; 'spei'?: FundingInstructionsBankTransferSpeiRecordModel | undefined; + /** + * The payment networks supported by this FinancialAddress + */ 'supported_networks'?: Array<'ach' | 'bacs' | 'domestic_wire_us' | 'fps' | 'sepa' | 'spei' | 'swift' | 'zengin'> | undefined; 'swift'?: FundingInstructionsBankTransferSwiftRecordModel | undefined; + /** + * The type of financial address + */ 'type': 'aba' | 'iban' | 'sort_code' | 'spei' | 'swift' | 'zengin'; 'zengin'?: FundingInstructionsBankTransferZenginRecordModel | undefined; }; export type PaymentIntentNextActionDisplayBankTransferInstructionsModel = { + /** + * The remaining amount that needs to be transferred to complete the payment. + */ 'amount_remaining'?: number | undefined; + /** + * 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 | undefined; + /** + * A list of financial addresses that can be used to fund the customer balance + */ 'financial_addresses'?: FundingInstructionsBankTransferFinancialAddressModel[] | undefined; + /** + * A link to a hosted page that guides your customer through completing the transfer. + */ 'hosted_instructions_url'?: string | undefined; + /** + * A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + */ 'reference'?: string | undefined; + /** + * Type of bank transfer + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type PaymentIntentNextActionKonbiniFamilymartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniLawsonModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniMinistopModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniSeicomartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniStoresModel = { + /** + * FamilyMart instruction details. + */ 'familymart'?: PaymentIntentNextActionKonbiniFamilymartModel | undefined; + /** + * Lawson instruction details. + */ 'lawson'?: PaymentIntentNextActionKonbiniLawsonModel | undefined; + /** + * Ministop instruction details. + */ 'ministop'?: PaymentIntentNextActionKonbiniMinistopModel | undefined; + /** + * Seicomart instruction details. + */ 'seicomart'?: PaymentIntentNextActionKonbiniSeicomartModel | undefined; }; export type PaymentIntentNextActionKonbiniModel = { + /** + * The timestamp at which the pending Konbini payment expires. + */ 'expires_at': number; + /** + * The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + */ 'hosted_voucher_url'?: string | undefined; 'stores': PaymentIntentNextActionKonbiniStoresModel; }; export type PaymentIntentNextActionDisplayMultibancoDetailsModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity'?: string | undefined; + /** + * The timestamp at which the Multibanco voucher expires. + */ 'expires_at'?: number | undefined; + /** + * The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + */ 'hosted_voucher_url'?: string | undefined; + /** + * Reference number associated with this Multibanco payment. + */ 'reference'?: string | undefined; }; export type PaymentIntentNextActionDisplayOxxoDetailsModel = { + /** + * The timestamp after which the OXXO voucher expires. + */ 'expires_after'?: number | undefined; + /** + * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + */ 'hosted_voucher_url'?: string | undefined; + /** + * OXXO reference number. + */ 'number'?: string | undefined; }; export type PaymentIntentNextActionPaynowDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + */ 'hosted_instructions_url'?: string | undefined; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionPixDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data'?: string | undefined; + /** + * The date (unix timestamp) when the PIX expires. + */ 'expires_at'?: number | undefined; + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ 'hosted_instructions_url'?: string | undefined; + /** + * The image_url_png string used to render png QR code + */ 'image_url_png'?: string | undefined; + /** + * The image_url_svg string used to render svg QR code + */ 'image_url_svg'?: string | undefined; }; export type PaymentIntentNextActionPromptpayDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + */ 'hosted_instructions_url': string; + /** + * The PNG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_png': string; + /** + * The SVG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_svg': string; }; export type PaymentIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url'?: string | undefined; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url'?: string | undefined; }; export type PaymentIntentNextActionSwishQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Swish instructions page, which allows customers to view the QR code. + */ 'hosted_instructions_url': string; 'qr_code': PaymentIntentNextActionSwishQrCodeModel; }; export type PaymentIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type'?: 'amounts' | 'descriptor_code' | undefined; }; export type PaymentIntentNextActionWechatPayDisplayQrCodeModel = { + /** + * The data being used to generate QR code + */ 'data': string; + /** + * The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + */ 'hosted_instructions_url': string; + /** + * The base64 image data for a pre-generated QR code + */ 'image_data_url': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionWechatPayRedirectToAndroidAppModel = { + /** + * app_id is the APP ID registered on WeChat open platform + */ 'app_id': string; + /** + * nonce_str is a random string + */ 'nonce_str': string; + /** + * package is static value + */ 'package': string; + /** + * an unique merchant ID assigned by WeChat Pay + */ 'partner_id': string; + /** + * an unique trading ID assigned by WeChat Pay + */ 'prepay_id': string; + /** + * A signature + */ 'sign': string; + /** + * Specifies the current time in epoch format + */ 'timestamp': string; }; export type PaymentIntentNextActionWechatPayRedirectToIosAppModel = { + /** + * An universal link that redirect to WeChat Pay app + */ 'native_url': string; }; @@ -3389,7 +8439,13 @@ export type PaymentIntentNextActionModel = { 'promptpay_display_qr_code'?: PaymentIntentNextActionPromptpayDisplayQrCodeModel | undefined; 'redirect_to_url'?: PaymentIntentNextActionRedirectToUrlModel | undefined; 'swish_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: PaymentIntentNextActionVerifyWithMicrodepositsModel | undefined; 'wechat_pay_display_qr_code'?: PaymentIntentNextActionWechatPayDisplayQrCodeModel | undefined; @@ -3398,26 +8454,71 @@ export type PaymentIntentNextActionModel = { }; export type PaymentFlowsPaymentDetailsModel = { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + * This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. + */ 'customer_reference'?: string | undefined; + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. + * + * Required when the Payment Method Types array contains `card`, including when [automatic_payment_methods.enabled](/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled) is set to `true`. + * + * For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app. + */ 'order_reference'?: string | undefined; }; export type PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel = { + /** + * ID of the payment method configuration used. + */ 'id': string; + /** + * ID of the parent payment method configuration used. + */ 'parent'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description'?: string | undefined; + /** + * Payment schedule for the mandate. + */ 'payment_schedule'?: 'combined' | 'interval' | 'sporadic' | undefined; + /** + * Transaction type of the mandate. + */ 'transaction_type'?: 'business' | 'personal' | undefined; }; export type PaymentIntentPaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -3427,160 +8528,483 @@ export type PaymentFlowsInstallmentOptionsModel = { }; export type PaymentMethodOptionsCardPresentRoutingModel = { + /** + * Requested routing priority + */ 'requested_priority'?: 'domestic' | 'international' | undefined; }; export type PaymentIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; 'installments'?: PaymentFlowsInstallmentOptionsModel | undefined; + /** + * 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 | undefined; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsAffirmModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAfterpayClearpayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. + */ 'reference'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAlipayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsAlmaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsAmazonPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsAuBecsDebitModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsBacsDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsBillieModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsBlikModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsBoletoModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCardInstallmentsModel = { + /** + * Installment plans that may be selected for this PaymentIntent. + */ 'available_plans'?: PaymentMethodDetailsCardInstallmentsPlanModel[] | undefined; + /** + * Whether Installments are enabled for this PaymentIntent. + */ 'enabled': boolean; + /** + * Installment plan selected for this PaymentIntent. + */ 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; export type PaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description'?: string | undefined; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date'?: number | undefined; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count'?: number | undefined; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types'?: 'india'[] | undefined; }; export type PaymentIntentPaymentMethodOptionsCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments'?: PaymentMethodOptionsCardInstallmentsModel | undefined; + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options'?: PaymentMethodOptionsCardMandateOptionsModel | undefined; + /** + * Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + */ 'network'?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure'?: 'any' | 'automatic' | 'challenge' | undefined; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; }; export type PaymentMethodOptionsCardPresentModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; + /** + * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + */ 'request_extended_authorization'?: boolean | undefined; + /** + * 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 | undefined; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; }; export type PaymentMethodOptionsCashappModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCryptoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsCustomerBalanceEuBankAccountModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type PaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type'?: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer' | undefined; }; export type PaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: PaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type'?: 'bank_transfer' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsEpsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsFpxModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGiropayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGrabpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsIdealModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; @@ -3589,63 +9013,210 @@ export type PaymentMethodOptionsInteracPresentModel = { }; export type PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsKlarnaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsKonbiniModel = { + /** + * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + */ 'confirmation_number'?: string | undefined; + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days'?: number | undefined; + /** + * The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ 'expires_at'?: number | undefined; + /** + * A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + */ 'product_description'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsKrCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsLinkModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsMbWayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsMobilepayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsMultibancoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsNzBankAccountModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsOxxoModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsP24Model = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -3654,99 +9225,279 @@ export type PaymentMethodOptionsPayByBankModel = { }; export type PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsPaynowModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsPaypalModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsPixModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + */ 'expires_after_seconds'?: number | undefined; + /** + * The timestamp at which the Pix expires. + */ 'expires_at'?: number | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsPromptpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsRevolutPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsSatispayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsSepaDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsSofortModel = { + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + */ 'preferred_language'?: 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsSwishModel = { + /** + * A reference for this payment to be displayed in the Swish app. + */ 'reference'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsTwintModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; }; export type LinkedAccountOptionsCommonModel = { 'filters'?: PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch'?: Array<'balances' | 'ownership' | 'transactions'> | undefined; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; }; export type PaymentMethodOptionsUsBankAccountMandateOptionsModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; export type PaymentIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Preferred transaction settlement speed + */ 'preferred_settlement_speed'?: 'fastest' | 'standard' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsWechatPayModel = { + /** + * The app ID registered with WeChat Pay. Only required when client is ios or android. + */ 'app_id'?: string | undefined; + /** + * The client type that the end customer will pay from + */ 'client'?: 'android' | 'ios' | 'web' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsZipModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -3805,7 +9556,13 @@ export type PaymentIntentPaymentMethodOptionsModel = { }; export type PaymentIntentProcessingCustomerNotificationModel = { + /** + * Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + */ 'approval_requested'?: boolean | undefined; + /** + * If customer approval is required, they need to provide approval before this time. + */ 'completes_at'?: number | undefined; }; @@ -3815,100 +9572,304 @@ export type PaymentIntentCardProcessingModel = { export type PaymentIntentProcessingModel = { 'card'?: PaymentIntentCardProcessingModel | undefined; + /** + * Type of the payment method for which payment is in `processing` state, one of `card`. + */ 'type': 'card'; }; export type TransferDataModel = { + /** + * The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + * The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + * representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). + */ 'amount'?: number | undefined; + /** + * The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. + */ 'destination': string | AccountModel; }; +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export type PaymentIntentModel = { + /** + * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount'?: number | undefined; + /** + * Amount that can be captured from this PaymentIntent. + */ 'amount_capturable'?: number | undefined; 'amount_details'?: PaymentFlowsAmountDetailsModel | PaymentFlowsAmountDetailsClientModel | undefined; + /** + * Amount that this PaymentIntent collects. + */ 'amount_received'?: number | undefined; + /** + * ID of the Connect application that created the PaymentIntent. + */ 'application'?: string | ApplicationModel | undefined; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'application_fee_amount'?: number | undefined; + /** + * Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + */ 'automatic_payment_methods'?: PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel | undefined; + /** + * Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at'?: number | undefined; + /** + * Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). + */ 'cancellation_reason'?: 'abandoned' | 'automatic' | 'duplicate' | 'expired' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice' | undefined; + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'automatic' | 'automatic_async' | 'manual' | undefined; + /** + * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + */ 'client_secret'?: string | undefined; + /** + * Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + */ 'confirmation_method'?: 'automatic' | 'manual' | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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 | undefined; + /** + * ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * The list of payment method types to exclude from use with this payment. + */ 'excluded_payment_method_types'?: Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'> | undefined; 'hooks'?: PaymentFlowsPaymentIntentAsyncWorkflowsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + */ 'last_payment_error'?: ApiErrorsModel | undefined; + /** + * ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + */ 'latest_charge'?: string | ChargeModel | undefined; + /** + * 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + */ 'metadata'?: { [key: string]: string; } | undefined; 'next_action'?: PaymentIntentNextActionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent'; + /** + * The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; 'payment_details'?: PaymentFlowsPaymentDetailsModel | undefined; + /** + * ID of the payment method used in this PaymentIntent. + */ 'payment_method'?: string | PaymentMethodModel | undefined; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + */ 'payment_method_configuration_details'?: PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel | undefined; + /** + * Payment-method-specific configuration for this PaymentIntent. + */ 'payment_method_options'?: PaymentIntentPaymentMethodOptionsModel | undefined; + /** + * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types'?: string[] | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * If present, this property tells you about the processing state of the payment. + */ 'processing'?: PaymentIntentProcessingModel | undefined; + /** + * Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + */ 'receipt_email'?: string | undefined; + /** + * ID of the review associated with this PaymentIntent, if any. + */ 'review'?: string | ReviewModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'off_session' | 'on_session' | undefined; + /** + * Shipping information for this PaymentIntent. + */ 'shipping'?: ShippingModel | undefined; + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + */ 'statement_descriptor'?: string | undefined; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + */ 'statement_descriptor_suffix'?: string | undefined; + /** + * Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'transfer_data'?: TransferDataModel | undefined; + /** + * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + */ 'transfer_group'?: string | undefined; }; export type PaymentFlowsAutomaticPaymentMethodsSetupIntentModel = { + /** + * Controls whether this SetupIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled'?: boolean | undefined; }; export type SetupIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url'?: string | undefined; + /** + * The URL you must redirect your customer to in order to authenticate. + */ 'url'?: string | undefined; }; export type SetupIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type'?: 'amounts' | 'descriptor_code' | undefined; }; export type SetupIntentNextActionModel = { 'cashapp_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel | undefined; 'redirect_to_url'?: SetupIntentNextActionRedirectToUrlModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: SetupIntentNextActionVerifyWithMicrodepositsModel | undefined; }; export type SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description'?: string | undefined; + /** + * Payment schedule for the mandate. + */ 'payment_schedule'?: 'combined' | 'interval' | 'sporadic' | undefined; + /** + * Transaction type of the mandate. + */ 'transaction_type'?: 'business' | 'personal' | undefined; }; export type SetupIntentPaymentMethodOptionsAcssDebitModel = { + /** + * Currency supported by the bank account + */ 'currency'?: 'cad' | 'usd' | undefined; 'mandate_options'?: SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type SetupIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -3917,6 +9878,9 @@ export type SetupIntentPaymentMethodOptionsAmazonPayModel = { }; export type SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -3925,21 +9889,60 @@ export type SetupIntentPaymentMethodOptionsBacsDebitModel = { }; export type SetupIntentPaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * 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; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description'?: string | undefined; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date'?: number | undefined; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count'?: number | undefined; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types'?: 'india'[] | undefined; }; export type SetupIntentPaymentMethodOptionsCardModel = { + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options'?: SetupIntentPaymentMethodOptionsCardMandateOptionsModel | undefined; + /** + * Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + */ 'network'?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure'?: 'any' | 'automatic' | 'challenge' | undefined; }; @@ -3948,7 +9951,13 @@ export type SetupIntentPaymentMethodOptionsCardPresentModel = { }; export type SetupIntentPaymentMethodOptionsKlarnaModel = { + /** + * The currency of the setup intent. Three letter ISO currency code. + */ 'currency'?: string | undefined; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; }; @@ -3957,10 +9966,16 @@ export type SetupIntentPaymentMethodOptionsLinkModel = { }; export type SetupIntentPaymentMethodOptionsPaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id'?: string | undefined; }; export type SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -3971,6 +9986,9 @@ export type SetupIntentPaymentMethodOptionsSepaDebitModel = { export type SetupIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -3987,86 +10005,306 @@ export type SetupIntentPaymentMethodOptionsModel = { 'us_bank_account'?: SetupIntentPaymentMethodOptionsUsBankAccountModel | SetupIntentTypeSpecificPaymentMethodOptionsClientModel | undefined; }; +/** + * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + * + * Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + */ export type SetupIntentModel = { + /** + * ID of the Connect application that created the SetupIntent. + */ 'application'?: string | ApplicationModel | undefined; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Settings for dynamic payment methods compatible with this Setup Intent + */ 'automatic_payment_methods'?: PaymentFlowsAutomaticPaymentMethodsSetupIntentModel | undefined; + /** + * Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + */ 'cancellation_reason'?: 'abandoned' | 'duplicate' | 'requested_by_customer' | undefined; + /** + * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Payment method types that are excluded from this SetupIntent. + */ 'excluded_payment_method_types'?: Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'> | undefined; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions'?: Array<'inbound' | 'outbound'> | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The error encountered in the previous SetupIntent confirmation. + */ 'last_setup_error'?: ApiErrorsModel | undefined; + /** + * The most recent SetupAttempt for this SetupIntent. + */ 'latest_attempt'?: string | SetupAttemptModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * ID of the multi use Mandate generated by the SetupIntent. + */ 'mandate'?: string | MandateModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + */ 'next_action'?: SetupIntentNextActionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_intent'; + /** + * The account (if any) for which the setup is intended. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + */ 'payment_method'?: string | PaymentMethodModel | undefined; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + */ 'payment_method_configuration_details'?: PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel | undefined; + /** + * Payment method-specific configuration for this SetupIntent. + */ 'payment_method_options'?: SetupIntentPaymentMethodOptionsModel | undefined; + /** + * The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types': string[]; + /** + * ID of the single_use Mandate generated by the SetupIntent. + */ 'single_use_mandate'?: string | MandateModel | undefined; + /** + * [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ 'usage': string; }; export type ApiErrorsModel = { + /** + * For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one. + */ 'advice_code'?: string | undefined; + /** + * For card errors, the ID of the failed charge. + */ 'charge'?: string | undefined; + /** + * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + */ 'code'?: string | undefined; + /** + * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + */ 'decline_code'?: string | undefined; + /** + * A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + */ 'doc_url'?: string | undefined; + /** + * A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + */ 'message'?: string | undefined; + /** + * For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + */ 'network_advice_code'?: string | undefined; + /** + * For payments declined by the network, an alphanumeric code which indicates the reason the payment failed. + */ 'network_decline_code'?: string | undefined; + /** + * If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + */ 'param'?: string | undefined; 'payment_intent'?: PaymentIntentModel | undefined; 'payment_method'?: PaymentMethodModel | undefined; + /** + * If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + */ 'payment_method_type'?: string | undefined; + /** + * A URL to the request log entry in your dashboard. + */ 'request_log_url'?: string | undefined; 'setup_intent'?: SetupIntentModel | undefined; + /** + * The [source object](https://stripe.com/docs/api/sources/object) for errors returned on a request involving a source. + */ 'source'?: BankAccountModel | CardModel | SourceModel | undefined; + /** + * The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + */ 'type': 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error'; }; +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export type SetupAttemptModel = { + /** + * The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + */ 'application'?: string | ApplicationModel | undefined; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions'?: Array<'inbound' | 'outbound'> | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_attempt'; + /** + * The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * ID of the payment method used with this SetupAttempt. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': SetupAttemptPaymentMethodDetailsModel; + /** + * The error encountered during this attempt to confirm the SetupIntent, if any. + */ 'setup_error'?: ApiErrorsModel | undefined; + /** + * ID of the SetupIntent that this attempt belongs to. + */ 'setup_intent': string | SetupIntentModel; + /** + * Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + */ 'status': string; + /** + * The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + */ 'usage': string; }; export type PaymentMethodCardGeneratedCardModel = { + /** + * The charge that created this object. + */ 'charge'?: string | undefined; + /** + * Transaction-specific details of the payment method used in the payment. + */ 'payment_method_details'?: CardGeneratedFromPaymentMethodDetailsModel | undefined; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt'?: string | SetupAttemptModel | undefined; }; export type NetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred'?: string | undefined; }; export type ThreeDSecureUsageModel = { + /** + * Whether 3D Secure is supported on this card. + */ 'supported': boolean; }; @@ -4087,9 +10325,21 @@ export type PaymentMethodCardWalletLinkModel = { }; export type PaymentMethodCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address'?: AddressModel | undefined; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name'?: string | undefined; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address'?: AddressModel | undefined; }; @@ -4098,67 +10348,188 @@ export type PaymentMethodCardWalletSamsungPayModel = { }; export type PaymentMethodCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address'?: AddressModel | undefined; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name'?: string | undefined; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address'?: AddressModel | undefined; }; export type PaymentMethodCardWalletModel = { 'amex_express_checkout'?: PaymentMethodCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; 'google_pay'?: PaymentMethodCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Checks on Card address and CVC if provided. + */ 'checks'?: PaymentMethodCardChecksModel | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + */ 'display_brand'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Details of the original PaymentMethod that created this object. + */ 'generated_from'?: PaymentMethodCardGeneratedCardModel | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks'?: NetworksModel | undefined; + /** + * Status of a card based on the card issuer. + */ 'regulated_status'?: 'regulated' | 'unregulated' | undefined; + /** + * Contains details on how this Card may be used for 3D Secure authentication. + */ 'three_d_secure_usage'?: ThreeDSecureUsageModel | undefined; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet'?: PaymentMethodCardWalletModel | undefined; }; export type PaymentMethodCardPresentNetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for the card. + */ 'preferred'?: string | undefined; }; export type PaymentMethodCardPresentModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand'?: string | undefined; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product'?: string | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * A high-level description of the type of cards issued in this range. + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * The name of the card's issuing bank. + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks'?: PaymentMethodCardPresentNetworksModel | undefined; + /** + * Details about payment methods collected offline. + */ 'offline'?: PaymentMethodDetailsCardPresentOfflineModel | undefined; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales'?: string[] | undefined; + /** + * How card details were read in this transaction. + */ 'read_method'?: 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2' | undefined; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type PaymentMethodCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id'?: string | undefined; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag'?: string | undefined; }; @@ -4167,13 +10538,28 @@ export type PaymentMethodCryptoModel = { }; export type CustomLogoModel = { + /** + * Content type of the Dashboard-only CustomPaymentMethodType logo. + */ 'content_type'?: string | undefined; + /** + * URL of the Dashboard-only CustomPaymentMethodType logo. + */ 'url': string; }; export type PaymentMethodCustomModel = { + /** + * Display name of the Dashboard-only CustomPaymentMethodType. + */ 'display_name'?: string | undefined; + /** + * Contains information about the Dashboard-only CustomPaymentMethodType logo. + */ 'logo'?: CustomLogoModel | undefined; + /** + * ID of the Dashboard-only CustomPaymentMethodType. Not expandable. + */ 'type': string; }; @@ -4182,10 +10568,16 @@ export type PaymentMethodCustomerBalanceModel = { }; export type PaymentMethodEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank'?: 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau' | undefined; }; export type PaymentMethodFpxModel = { + /** + * The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; }; @@ -4198,23 +10590,70 @@ export type PaymentMethodGrabpayModel = { }; export type PaymentMethodIdealModel = { + /** + * The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank'?: 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe' | undefined; + /** + * The Bank Identifier Code of the customer's bank, if the bank was provided. + */ 'bic'?: 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U' | undefined; }; export type PaymentMethodInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand'?: string | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * A high-level description of the type of cards issued in this range. + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding'?: string | undefined; + /** + * The name of the card's issuing bank. + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4'?: string | undefined; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks'?: PaymentMethodCardPresentNetworksModel | undefined; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales'?: string[] | undefined; + /** + * How card details were read in this transaction. + */ 'read_method'?: 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2' | undefined; }; @@ -4223,12 +10662,24 @@ export type PaymentMethodKakaoPayModel = { }; export type PaymentFlowsPrivatePaymentMethodsKlarnaDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day'?: number | undefined; + /** + * The month of birth, between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year of birth. + */ 'year'?: number | undefined; }; export type PaymentMethodKlarnaModel = { + /** + * The customer's date of birth, if provided. + */ 'dob'?: PaymentFlowsPrivatePaymentMethodsKlarnaDobModel | undefined; }; @@ -4237,11 +10688,20 @@ export type PaymentMethodKonbiniModel = { }; export type PaymentMethodKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand'?: 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori' | undefined; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4'?: string | undefined; }; export type PaymentMethodLinkModel = { + /** + * Account owner's email address. + */ 'email'?: string | undefined; }; @@ -4258,16 +10718,40 @@ export type PaymentMethodMultibancoModel = { }; export type PaymentMethodNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id'?: string | undefined; + /** + * Whether to fund this transaction with Naver Pay points or a card. + */ 'funding': 'card' | 'points'; }; export type PaymentMethodNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name'?: string | undefined; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix'?: string | undefined; }; @@ -4276,6 +10760,9 @@ export type PaymentMethodOxxoModel = { }; export type PaymentMethodP24Model = { + /** + * The customer's bank, if provided. + */ 'bank'?: 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank' | undefined; }; @@ -4292,8 +10779,18 @@ export type PaymentMethodPaynowModel = { }; export type PaymentMethodPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country'?: string | undefined; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email'?: string | undefined; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id'?: string | undefined; }; @@ -4318,20 +10815,47 @@ export type PaymentMethodSatispayModel = { }; export type SepaDebitGeneratedFromModel = { + /** + * The ID of the Charge that generated this PaymentMethod, if any. + */ 'charge'?: string | ChargeModel | undefined; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt'?: string | SetupAttemptModel | undefined; }; export type PaymentMethodSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code'?: string | undefined; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code'?: string | undefined; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Information about the object that generated this PaymentMethod. + */ 'generated_from'?: SepaDebitGeneratedFromModel | undefined; + /** + * Last four characters of the IBAN. + */ 'last4'?: string | undefined; }; export type PaymentMethodSofortModel = { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country'?: string | undefined; }; @@ -4344,12 +10868,24 @@ export type PaymentMethodTwintModel = { }; export type UsBankAccountNetworksModel = { + /** + * The preferred network. + */ 'preferred'?: string | undefined; + /** + * All supported networks. + */ 'supported': Array<'ach' | 'us_domestic_wire'>; }; export type PaymentMethodUsBankAccountBlockedModel = { + /** + * The ACH network code that resulted in this block. + */ 'network_code'?: 'R02' | 'R03' | 'R04' | 'R05' | 'R07' | 'R08' | 'R10' | 'R11' | 'R16' | 'R20' | 'R29' | 'R31' | undefined; + /** + * The reason why this PaymentMethod's fingerprint has been blocked + */ 'reason'?: 'bank_account_closed' | 'bank_account_frozen' | 'bank_account_invalid_details' | 'bank_account_restricted' | 'bank_account_unusable' | 'debit_not_authorized' | 'tokenized_account_number_deactivated' | undefined; }; @@ -4358,14 +10894,41 @@ export type PaymentMethodUsBankAccountStatusDetailsModel = { }; export type PaymentMethodUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * The name of the bank. + */ 'bank_name'?: string | undefined; + /** + * The ID of the Financial Connections Account used to create the payment method. + */ 'financial_connections_account'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * Contains information about US bank account networks that can be used. + */ 'networks'?: UsBankAccountNetworksModel | undefined; + /** + * Routing number of the bank account. + */ 'routing_number'?: string | undefined; + /** + * Contains information about the future reusability of this PaymentMethod. + */ 'status_details'?: PaymentMethodUsBankAccountStatusDetailsModel | undefined; }; @@ -4377,11 +10940,21 @@ export type PaymentMethodZipModel = { }; +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export type PaymentMethodModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -4395,15 +10968,24 @@ export type PaymentMethodModel = { 'card'?: PaymentMethodCardModel | undefined; 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'crypto'?: PaymentMethodCryptoModel | undefined; 'custom'?: PaymentMethodCustomModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer'?: string | CustomerModel | undefined; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; 'eps'?: PaymentMethodEpsModel | undefined; 'fpx'?: PaymentMethodFpxModel | undefined; 'giropay'?: PaymentMethodGiropayModel | undefined; 'grabpay'?: PaymentMethodGrabpayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: PaymentMethodIdealModel | undefined; 'interac_present'?: PaymentMethodInteracPresentModel | undefined; @@ -4412,8 +10994,14 @@ export type PaymentMethodModel = { 'konbini'?: PaymentMethodKonbiniModel | undefined; 'kr_card'?: PaymentMethodKrCardModel | undefined; 'link'?: PaymentMethodLinkModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodMbWayModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; @@ -4421,6 +11009,9 @@ export type PaymentMethodModel = { 'multibanco'?: PaymentMethodMultibancoModel | undefined; 'naver_pay'?: PaymentMethodNaverPayModel | undefined; 'nz_bank_account'?: PaymentMethodNzBankAccountModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method'; 'oxxo'?: PaymentMethodOxxoModel | undefined; 'p24'?: PaymentMethodP24Model | undefined; @@ -4438,6 +11029,9 @@ export type PaymentMethodModel = { 'sofort'?: PaymentMethodSofortModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -4445,364 +11039,1020 @@ export type PaymentMethodModel = { }; export type InvoiceSettingCustomerRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display'?: string | undefined; + /** + * ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + */ 'template'?: string | undefined; }; export type InvoiceSettingCustomerSettingModel = { + /** + * Default custom fields to be displayed on invoices for this customer. + */ 'custom_fields'?: InvoiceSettingCustomFieldModel[] | undefined; + /** + * ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + */ 'default_payment_method'?: string | PaymentMethodModel | undefined; + /** + * Default footer to be displayed on invoices for this customer. + */ 'footer'?: string | undefined; + /** + * Default options for invoice PDF rendering for this customer. + */ 'rendering_options'?: InvoiceSettingCustomerRenderingOptionsModel | undefined; }; export type DeletedApplicationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; export type ConnectAccountReferenceModel = { + /** + * The connected account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * Type of the account referenced. + */ 'type': 'account' | 'self'; }; export type SubscriptionAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason'?: 'requires_location_inputs' | undefined; + /** + * Whether Stripe automatically computes tax on this 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'?: ConnectAccountReferenceModel | undefined; }; export type SubscriptionsResourceBillingCycleAnchorConfigModel = { + /** + * The day of the month of the billing_cycle_anchor. + */ 'day_of_month': number; + /** + * The hour of the day of the billing_cycle_anchor. + */ 'hour'?: number | undefined; + /** + * The minute of the hour of the billing_cycle_anchor. + */ 'minute'?: number | undefined; + /** + * The month to start full cycle billing periods. + */ 'month'?: number | undefined; + /** + * The second of the minute of the billing_cycle_anchor. + */ 'second'?: number | undefined; }; export type SubscriptionsResourceBillingModeFlexibleModel = { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ 'proration_discounts'?: 'included' | 'itemized' | undefined; }; +/** + * The billing mode of the subscription. + */ export type SubscriptionsResourceBillingModeModel = { + /** + * Configure behavior for flexible billing mode + */ 'flexible'?: SubscriptionsResourceBillingModeFlexibleModel | undefined; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; + /** + * Details on when the current billing_mode was adopted. + */ 'updated_at'?: number | undefined; }; export type SubscriptionBillingThresholdsModel = { + /** + * Monetary threshold that triggers the subscription to create an invoice + */ 'amount_gte'?: number | undefined; + /** + * Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + */ 'reset_billing_cycle_anchor'?: boolean | undefined; }; export type CancellationDetailsModel = { + /** + * Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + */ 'comment'?: string | undefined; + /** + * The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + */ 'feedback'?: 'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused' | undefined; + /** + * Why this subscription was canceled. + */ 'reason'?: 'cancellation_requested' | 'payment_disputed' | 'payment_failed' | undefined; }; +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export type TaxRateFlatAmountModel = { + /** + * Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Three-letter ISO currency code, in lowercase. + */ 'currency': string; }; +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export type TaxRateModel = { + /** + * Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + */ 'active': boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ 'description'?: string | undefined; + /** + * The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + */ 'display_name': string; + /** + * Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + * this percentage reflects the rate actually used to calculate tax based on the product's taxability + * and whether the user is registered to collect taxes in the corresponding jurisdiction. + */ 'effective_percentage'?: number | undefined; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount'?: TaxRateFlatAmountModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * This specifies if the tax rate is inclusive or exclusive. + */ 'inclusive': boolean; + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + */ 'jurisdiction'?: string | undefined; + /** + * The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + */ 'jurisdiction_level'?: 'city' | 'country' | 'county' | 'district' | 'multiple' | 'state' | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_rate'; + /** + * Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + */ 'percentage': number; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type'?: 'flat_amount' | 'percentage' | undefined; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state'?: string | undefined; + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ 'tax_type'?: 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat' | undefined; }; export type TaxIDsOwnerModel = { + /** + * The account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * The Connect Application being referenced when `type` is `application`. + */ 'application'?: string | ApplicationModel | undefined; + /** + * The customer being referenced when `type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; + /** + * Type of owner referenced. + */ 'type': 'account' | 'application' | 'customer' | 'self'; }; export type TaxIdVerificationModel = { + /** + * Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + */ 'status': 'pending' | 'unavailable' | 'unverified' | 'verified'; + /** + * Verified address. + */ 'verified_address'?: string | undefined; + /** + * Verified name. + */ 'verified_name'?: string | undefined; }; +/** + * 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 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) + */ export type TaxIdModel = { + /** + * Two-letter ISO code representing the country of the tax ID. + */ 'country'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer. + */ 'customer'?: string | CustomerModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; + /** + * The account or customer the tax ID belongs to. + */ 'owner'?: TaxIDsOwnerModel | undefined; + /** + * Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * Value of the tax ID. + */ 'value': string; + /** + * Tax ID verification information. + */ 'verification'?: TaxIdVerificationModel | undefined; }; export type DeletedTaxIdModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; }; export type SubscriptionsResourceSubscriptionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + */ 'account_tax_ids'?: Array | undefined; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionItemBillingThresholdsModel = { + /** + * Usage threshold that triggers the subscription to create an invoice + */ 'usage_gte'?: number | undefined; }; export type CustomUnitAmountModel = { + /** + * The maximum unit amount the customer can specify for this item. + */ 'maximum'?: number | undefined; + /** + * The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + */ 'minimum'?: number | undefined; + /** + * The starting unit amount which can be updated by the customer. + */ 'preset'?: number | undefined; }; export type PriceTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount'?: number | undefined; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal'?: string | undefined; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount'?: number | undefined; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal'?: string | undefined; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to'?: number | undefined; }; export type CurrencyOptionModel = { + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount'?: CustomUnitAmountModel | undefined; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior'?: 'exclusive' | 'inclusive' | 'unspecified' | undefined; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount'?: number | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal'?: string | undefined; }; export type ProductMarketingFeatureModel = { + /** + * The marketing feature name. Up to 80 characters long. + */ 'name'?: string | undefined; }; export type PackageDimensionsModel = { + /** + * Height, in inches. + */ 'height': number; + /** + * Length, in inches. + */ 'length': number; + /** + * Weight, in ounces. + */ 'weight': number; + /** + * Width, in inches. + */ 'width': number; }; +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export type TaxCodeModel = { + /** + * A detailed description of which types of products the tax code represents. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A short name for the tax code. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_code'; }; +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export type ProductModel = { + /** + * Whether the product is currently available for purchase. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + */ 'default_price'?: string | PriceModel | undefined; + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ 'description'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ 'images': string[]; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + */ 'marketing_features': ProductMarketingFeatureModel[]; + /** + * 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': { [key: string]: string; }; + /** + * The product's name, meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; + /** + * The dimensions of this product for shipping purposes. + */ 'package_dimensions'?: PackageDimensionsModel | undefined; + /** + * Whether this product is shipped (i.e., physical goods). + */ 'shippable'?: boolean | undefined; + /** + * Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + */ 'statement_descriptor'?: string | undefined; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ 'tax_code'?: string | TaxCodeModel | undefined; + /** + * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + */ 'unit_label'?: string | undefined; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * A URL of a publicly-accessible webpage for this product. + */ 'url'?: string | undefined; }; export type DeletedProductModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; }; export type RecurringModel = { + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; + /** + * The meter tracking the usage of a metered price + */ 'meter'?: string | undefined; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; export type TransformQuantityModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PriceModel = { + /** + * Whether the price can be used for new purchases. + */ 'active': boolean; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CurrencyOptionModel; } | undefined; + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount'?: CustomUnitAmountModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key'?: string | undefined; + /** + * 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': { [key: string]: string; }; + /** + * A brief description of the price, hidden from customers. + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; + /** + * The ID of the product this price is associated with. + */ 'product': string | ProductModel | DeletedProductModel; + /** + * The recurring components of a price such as `interval` and `usage_type`. + */ 'recurring'?: RecurringModel | undefined; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior'?: 'exclusive' | 'inclusive' | 'unspecified' | undefined; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode'?: 'graduated' | 'volume' | undefined; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_quantity'?: TransformQuantityModel | undefined; + /** + * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + */ 'type': 'one_time' | 'recurring'; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount'?: number | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal'?: string | undefined; }; +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ export type SubscriptionItemModel = { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds'?: SubscriptionItemBillingThresholdsModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The end time of this subscription item's current billing period. + */ 'current_period_end': number; + /** + * The start time of this subscription item's current billing period. + */ 'current_period_start': number; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; 'price': PriceModel; + /** + * The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The `subscription` this `subscription_item` belongs to. + */ 'subscription': string; + /** + * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; export type AutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason'?: 'finalization_requires_location_inputs' | 'finalization_system_error' | undefined; + /** + * 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'?: ConnectAccountReferenceModel | undefined; + /** + * The tax provider powering automatic tax. + */ 'provider'?: string | undefined; + /** + * The status of the most recent automated tax calculation for this invoice. + */ 'status'?: 'complete' | 'failed' | 'requires_location_inputs' | undefined; }; export type InvoicesResourceConfirmationSecretModel = { + /** + * The client_secret of the payment that Stripe creates for the invoice after finalization. + */ 'client_secret': string; + /** + * The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization + */ 'type': string; }; export type InvoicesResourceInvoiceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value'?: string | undefined; }; export type DeletedDiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session'?: string | undefined; + /** + * The ID of the customer associated with this discount. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice'?: string | undefined; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code'?: string | PromotionCodeModel | undefined; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription'?: string | undefined; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item'?: string | undefined; }; export type InvoicesResourceFromInvoiceModel = { + /** + * The relation between this invoice and the cloned invoice + */ 'action': string; + /** + * The invoice that was cloned. + */ 'invoice': string | InvoiceModel; }; export type DiscountsResourceDiscountAmountModel = { + /** + * The amount, in cents (or local equivalent), of the discount. + */ 'amount': number; + /** + * The discount that was applied to get this discount amount. + */ 'discount': string | DiscountModel | DeletedDiscountModel; }; export type BillingBillResourceInvoicingLinesCommonCreditedItemsModel = { + /** + * Invoice containing the credited invoice line items + */ 'invoice': string; + /** + * Credited invoice line items + */ 'invoice_line_items': string[]; }; export type BillingBillResourceInvoicingLinesCommonProrationDetailsModel = { + /** + * For a credit proration `line_item`, the original debit line_items to which the credit proration applies. + */ 'credited_items'?: BillingBillResourceInvoicingLinesCommonCreditedItemsModel | undefined; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item': string; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details'?: BillingBillResourceInvoicingLinesCommonProrationDetailsModel | undefined; + /** + * The subscription that the invoice item belongs to + */ 'subscription'?: string | undefined; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item'?: string | undefined; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details'?: BillingBillResourceInvoicingLinesCommonProrationDetailsModel | undefined; + /** + * The subscription that the subscription item belongs to + */ 'subscription'?: string | undefined; + /** + * The subscription item that generated this line item + */ 'subscription_item': string; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel = { + /** + * Details about the invoice item that generated this line item + */ 'invoice_item_details'?: BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel | undefined; + /** + * Details about the subscription item that generated this line item + */ 'subscription_item_details'?: BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel | undefined; + /** + * The type of parent that generated this line item + */ 'type': 'invoice_item_details' | 'subscription_item_details'; }; export type InvoiceLineItemPeriodModel = { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ 'end': number; + /** + * The start of the period. This value is inclusive. + */ 'start': number; }; export type BillingCreditGrantsResourceMonetaryAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount. + */ 'value': number; }; export type BillingCreditGrantsResourceAmountModel = { + /** + * The monetary amount. + */ 'monetary'?: BillingCreditGrantsResourceMonetaryAmountModel | undefined; + /** + * The type of this amount. We currently only support `monetary` billing credits. + */ 'type': 'monetary'; }; export type BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel = { + /** + * The invoice to which the reinstated billing credits were originally applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the reinstated billing credits were originally applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceCreditModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + */ 'credits_application_invoice_voided'?: BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel | undefined; + /** + * The type of credit transaction. + */ 'type': 'credits_application_invoice_voided' | 'credits_granted'; }; export type BillingCreditGrantsResourceApplicablePriceModel = { + /** + * Unique identifier for the object. + */ 'id'?: string | undefined; }; export type BillingCreditGrantsResourceScopeModel = { + /** + * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`. + */ 'price_type'?: 'metered' | undefined; + /** + * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. + */ 'prices'?: BillingCreditGrantsResourceApplicablePriceModel[] | undefined; }; @@ -4811,6 +12061,9 @@ export type BillingCreditGrantsResourceApplicabilityConfigModel = { }; export type BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel = { + /** + * The `frozen_time` that the Test Clock is advancing towards. + */ 'target_frozen_time': number; }; @@ -4818,78 +12071,223 @@ export type BillingClocksResourceStatusDetailsStatusDetailsModel = { 'advancing'?: BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel | undefined; }; +/** + * A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ export type TestHelpersTestClockModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this clock is scheduled to auto delete. + */ 'deletes_after': number; + /** + * Time at which all objects belonging to this clock are frozen. + */ 'frozen_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The custom name supplied at creation. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; + /** + * The status of the Test Clock. + */ 'status': 'advancing' | 'internal_failure' | 'ready'; 'status_details': BillingClocksResourceStatusDetailsStatusDetailsModel; }; +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export type BillingCreditGrantModel = { 'amount': BillingCreditGrantsResourceAmountModel; 'applicability_config': BillingCreditGrantsResourceApplicabilityConfigModel; + /** + * The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + */ 'category': 'paid' | 'promotional'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer receiving the billing credits. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The time when the billing credits become effective-when they're eligible for use. + */ 'effective_at'?: number | undefined; + /** + * The time when the billing credits expire. If not present, the billing credits don't expire. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * A descriptive name shown in dashboard. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_grant'; + /** + * The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + */ 'priority'?: number | undefined; + /** + * ID of the test clock this credit grant belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + */ 'voided_at'?: number | undefined; }; export type BillingCreditGrantsResourceBalanceCreditsAppliedModel = { + /** + * The invoice to which the billing credits were applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the billing credits were applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceDebitModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. + */ 'credits_applied'?: BillingCreditGrantsResourceBalanceCreditsAppliedModel | undefined; + /** + * The type of debit transaction. + */ 'type': 'credits_applied' | 'credits_expired' | 'credits_voided'; }; +/** + * A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + */ export type BillingCreditBalanceTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Credit details for this credit balance transaction. Only present if type is `credit`. + */ 'credit'?: BillingCreditGrantsResourceBalanceCreditModel | undefined; + /** + * The credit grant associated with this credit balance transaction. + */ 'credit_grant': string | BillingCreditGrantModel; + /** + * Debit details for this credit balance transaction. Only present if type is `debit`. + */ 'debit'?: BillingCreditGrantsResourceBalanceDebitModel | undefined; + /** + * The effective time of this credit balance transaction. + */ 'effective_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_transaction'; + /** + * ID of the test clock this credit balance transaction belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; + /** + * The type of credit balance transaction (credit or debit). + */ 'type'?: 'credit' | 'debit' | undefined; }; export type InvoicesResourcePretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount'; }; export type BillingBillResourceInvoicingPricingPricingPriceDetailsModel = { + /** + * The ID of the price this item is associated with. + */ 'price': string; + /** + * The ID of the product this item is associated with. + */ 'product': string; }; export type BillingBillResourceInvoicingPricingPricingModel = { 'price_details'?: BillingBillResourceInvoicingPricingPricingPriceDetailsModel | undefined; + /** + * The type of the pricing details. + */ 'type': 'price_details'; + /** + * The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal'?: string | undefined; }; @@ -4898,88 +12296,205 @@ export type BillingBillResourceInvoicingTaxesTaxRateDetailsModel = { }; export type BillingBillResourceInvoicingTaxesTaxModel = { + /** + * The amount of the tax, in cents (or local equivalent). + */ 'amount': number; + /** + * Whether this tax is inclusive or exclusive. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Additional details about the tax rate. Only present when `type` is `tax_rate_details`. + */ 'tax_rate_details'?: BillingBillResourceInvoicingTaxesTaxRateDetailsModel | undefined; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_available' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount'?: number | undefined; + /** + * The type of tax information. + */ 'type': 'tax_rate_details'; }; +/** + * Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. + * + * Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). + */ export type LineItemModel = { + /** + * The amount, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * The amount of discount calculated per discount for this line item. + */ 'discount_amounts'?: DiscountsResourceDiscountAmountModel[] | undefined; + /** + * If true, discounts will apply to this line item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice that contains this line item. + */ 'invoice'?: string | undefined; + /** + * 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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + */ 'metadata': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'line_item'; + /** + * The parent that generated this line item. + */ 'parent'?: BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel | undefined; 'period': InvoiceLineItemPeriodModel; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + */ 'pretax_credit_amounts'?: InvoicesResourcePretaxCreditAmountModel[] | undefined; + /** + * The pricing information of the line item. + */ 'pricing'?: BillingBillResourceInvoicingPricingPricingModel | undefined; + /** + * The quantity of the subscription, if the line item is a subscription or a proration. + */ 'quantity'?: number | undefined; 'subscription'?: string | SubscriptionModel | undefined; + /** + * The tax information of the line item. + */ 'taxes'?: BillingBillResourceInvoicingTaxesTaxModel[] | undefined; }; export type BillingBillResourceInvoicingParentsInvoiceQuoteParentModel = { + /** + * The quote that generated this invoice + */ 'quote': string; }; export type BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel = { + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + * *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + */ 'metadata'?: { [key: string]: string; } | undefined; + /** + * The subscription that generated this invoice + */ 'subscription': string | SubscriptionModel; + /** + * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + */ 'subscription_proration_date'?: number | undefined; }; export type BillingBillResourceInvoicingParentsInvoiceParentModel = { + /** + * Details about the quote that generated this invoice + */ 'quote_details'?: BillingBillResourceInvoicingParentsInvoiceQuoteParentModel | undefined; + /** + * Details about the subscription that generated this invoice + */ 'subscription_details'?: BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel | undefined; + /** + * The type of parent that generated this invoice + */ 'type': 'quote_details' | 'subscription_details'; }; export type InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel = { + /** + * Transaction type of the mandate. + */ 'transaction_type'?: 'business' | 'personal' | undefined; }; export type InvoicePaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicePaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; }; export type InvoiceInstallmentsCardModel = { + /** + * Whether Installments are enabled for this Invoice. + */ 'enabled'?: boolean | undefined; }; export type InvoicePaymentMethodOptionsCardModel = { 'installments'?: InvoiceInstallmentsCardModel | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure'?: 'any' | 'automatic' | 'challenge' | undefined; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel | undefined; + /** + * The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type'?: string | undefined; }; export type InvoicePaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type'?: 'bank_transfer' | undefined; }; @@ -4992,67 +12507,175 @@ export type InvoicePaymentMethodOptionsSepaDebitModel = { }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel = { 'filters'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch'?: Array<'balances' | 'ownership' | 'transactions'> | undefined; }; export type InvoicePaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicesPaymentMethodOptionsModel = { + /** + * If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + */ 'acss_debit'?: InvoicePaymentMethodOptionsAcssDebitModel | undefined; + /** + * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + */ 'bancontact'?: InvoicePaymentMethodOptionsBancontactModel | undefined; + /** + * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + */ 'card'?: InvoicePaymentMethodOptionsCardModel | undefined; + /** + * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ 'customer_balance'?: InvoicePaymentMethodOptionsCustomerBalanceModel | undefined; + /** + * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + */ 'konbini'?: InvoicePaymentMethodOptionsKonbiniModel | undefined; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + */ 'sepa_debit'?: InvoicePaymentMethodOptionsSepaDebitModel | undefined; + /** + * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + */ 'us_bank_account'?: InvoicePaymentMethodOptionsUsBankAccountModel | undefined; }; export type InvoicesPaymentSettingsModel = { + /** + * 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. + */ 'default_mandate'?: string | undefined; + /** + * Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + */ 'payment_method_options'?: InvoicesPaymentMethodOptionsModel | undefined; + /** + * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types'?: Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'us_bank_account' | 'wechat_pay'> | undefined; }; export type DeletedInvoiceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; }; +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export type PaymentsPrimitivesPaymentRecordsResourceAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. + */ 'value': number; }; +/** + * Information about the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel = { + /** + * ID of the Stripe Customer associated with this payment. + */ 'customer'?: string | undefined; + /** + * The customer's email address. + */ 'email'?: string | undefined; + /** + * The customer's name. + */ 'name'?: string | undefined; + /** + * The customer's phone number. + */ 'phone'?: string | undefined; }; +/** + * A representation of a physical address. + */ export type PaymentsPrimitivesPaymentRecordsResourceAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1'?: string | undefined; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * State, county, province, or region. + */ 'state'?: string | undefined; }; +/** + * Billing details used by the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The billing email associated with the method of payment. + */ 'email'?: string | undefined; + /** + * The billing name associated with the method of payment. + */ 'name'?: string | undefined; + /** + * The billing phone number associated with the method of payment. + */ 'phone'?: string | undefined; }; @@ -5063,6 +12686,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; @@ -5074,6 +12700,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel = { + /** + * Type of the apple_pay transaction, one of `apple_pay` or `apple_pay_later`. + */ 'type': string; }; @@ -5083,44 +12712,135 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel = { 'apple_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; 'google_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': string; }; +/** + * Details of the card used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceChecksModel | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': 'credit' | 'debit' | 'prepaid' | 'unknown'; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network'?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' | undefined; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id'?: string | undefined; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceThreeDSecureModel | undefined; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel | undefined; }; +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetailsModel = { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ 'display_name': string; + /** + * The custom payment method type associated with this payment. + */ 'type'?: string | undefined; }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel = { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The ACH payment reference for this transaction. + */ 'payment_reference'?: string | undefined; + /** + * The routing number for the bank account. + */ 'routing_number'?: string | undefined; }; +/** + * Details about the Payment Method used in this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = { 'ach_credit_transfer'?: PaymentMethodDetailsAchCreditTransferModel | undefined; 'ach_debit'?: PaymentMethodDetailsAchDebitModel | undefined; @@ -5134,6 +12854,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'bacs_debit'?: PaymentMethodDetailsBacsDebitModel | undefined; 'bancontact'?: PaymentMethodDetailsBancontactModel | undefined; 'billie'?: PaymentMethodDetailsBillieModel | undefined; + /** + * The billing details associated with the method of payment. + */ 'billing_details'?: PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel | undefined; 'blik'?: PaymentMethodDetailsBlikModel | undefined; 'boleto'?: PaymentMethodDetailsBoletoModel | undefined; @@ -5163,6 +12886,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'p24'?: PaymentMethodDetailsP24Model | undefined; 'pay_by_bank'?: PaymentMethodDetailsPayByBankModel | undefined; 'payco'?: PaymentMethodDetailsPaycoModel | undefined; + /** + * ID of the Stripe PaymentMethod used to make this payment. + */ 'payment_method'?: string | undefined; 'paynow'?: PaymentMethodDetailsPaynowModel | undefined; 'paypal'?: PaymentMethodDetailsPaypalModel | undefined; @@ -5176,6 +12902,11 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'stripe_account'?: PaymentMethodDetailsStripeAccountModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -5183,21 +12914,50 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel = { + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + */ 'payment_reference'?: string | undefined; }; +/** + * Processor information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel = { 'custom'?: PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel | undefined; + /** + * The processor used for this payment attempt. + */ 'type': 'custom'; }; +/** + * The customer's shipping information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The shipping recipient's name. + */ 'name'?: string | undefined; + /** + * The shipping recipient's phone number. + */ 'phone'?: string | undefined; }; +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export type PaymentRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -5206,318 +12966,970 @@ export type PaymentRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentRecord. + */ 'application'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details'?: PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel | undefined; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence'?: 'off_session' | 'on_session' | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the latest Payment Attempt Record attached to this Payment Record. + */ 'latest_payment_attempt_record'?: string | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel | undefined; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Shipping information for this payment. + */ 'shipping_details'?: PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel | undefined; }; export type InvoicesPaymentsInvoicePaymentAssociatedPaymentModel = { + /** + * ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead. + */ 'charge'?: string | ChargeModel | undefined; + /** + * ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * ID of the PaymentRecord associated with this payment when `type` is `payment_record`. + */ 'payment_record'?: string | PaymentRecordModel | undefined; + /** + * Type of payment object associated with this invoice payment. + */ 'type': 'charge' | 'payment_intent' | 'payment_record'; }; export type InvoicesPaymentsInvoicePaymentStatusTransitionsModel = { + /** + * The time that the payment was canceled. + */ 'canceled_at'?: number | undefined; + /** + * The time that the payment succeeded. + */ 'paid_at'?: number | undefined; }; +/** + * Invoice Payments represent payments made against invoices. Invoice Payments can + * be accessed in two ways: + * 1. By expanding the `payments` field on the [Invoice](https://stripe.com/docs/api#invoice) resource. + * 2. By using the Invoice Payment retrieve and list endpoints. + * + * Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices. + * This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and + * monitor the allocation details of the payments. + */ export type InvoicePaymentModel = { + /** + * Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + */ 'amount_paid'?: number | undefined; + /** + * Amount intended to be paid toward this invoice, in cents (or local equivalent) + */ 'amount_requested': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was paid. + */ 'invoice': string | InvoiceModel | DeletedInvoiceModel; + /** + * Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_payment'; 'payment': InvoicesPaymentsInvoicePaymentAssociatedPaymentModel; + /** + * The status of the payment, one of `open`, `paid`, or `canceled`. + */ 'status': string; 'status_transitions': InvoicesPaymentsInvoicePaymentStatusTransitionsModel; }; export type InvoiceRenderingPdfModel = { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. + */ 'page_size'?: 'a4' | 'auto' | 'letter' | undefined; }; export type InvoicesResourceInvoiceRenderingModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display'?: string | undefined; + /** + * Invoice pdf rendering options + */ 'pdf'?: InvoiceRenderingPdfModel | undefined; + /** + * ID of the rendering template that the invoice is formatted by. + */ 'template'?: string | undefined; + /** + * Version of the rendering template that the invoice is using. + */ 'template_version'?: number | undefined; }; export type ShippingRateDeliveryEstimateBoundModel = { + /** + * A unit of time. + */ 'unit': 'business_day' | 'day' | 'hour' | 'month' | 'week'; + /** + * Must be greater than 0. + */ 'value': number; }; export type ShippingRateDeliveryEstimateModel = { + /** + * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + */ 'maximum'?: ShippingRateDeliveryEstimateBoundModel | undefined; + /** + * The lower bound of the estimated range. If empty, represents no lower bound. + */ 'minimum'?: ShippingRateDeliveryEstimateBoundModel | undefined; }; export type ShippingRateCurrencyOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; }; export type ShippingRateFixedAmountModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * 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; + /** + * Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: ShippingRateCurrencyOptionModel; } | undefined; }; +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export type ShippingRateModel = { + /** + * Whether the shipping rate can be used for new purchases. Defaults to `true`. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'delivery_estimate'?: ShippingRateDeliveryEstimateModel | undefined; + /** + * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'display_name'?: string | undefined; 'fixed_amount'?: ShippingRateFixedAmountModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'shipping_rate'; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior'?: 'exclusive' | 'inclusive' | 'unspecified' | undefined; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + */ 'tax_code'?: string | TaxCodeModel | undefined; + /** + * The type of calculation to use on the shipping rate. + */ 'type': 'fixed_amount'; }; export type LineItemsTaxAmountModel = { + /** + * Amount of tax applied for this rate. + */ 'amount': number; 'rate': TaxRateModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason'?: 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated' | undefined; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount'?: number | undefined; }; export type InvoicesResourceShippingCostModel = { + /** + * Total shipping cost before any taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this invoice. + */ 'shipping_rate'?: string | ShippingRateModel | undefined; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type InvoicesResourceStatusTransitionsModel = { + /** + * The time that the invoice draft was finalized. + */ 'finalized_at'?: number | undefined; + /** + * The time that the invoice was marked uncollectible. + */ 'marked_uncollectible_at'?: number | undefined; + /** + * The time that the invoice was paid. + */ 'paid_at'?: number | undefined; + /** + * The time that the invoice was voided. + */ 'voided_at'?: number | undefined; }; export type InvoiceItemThresholdReasonModel = { + /** + * The IDs of the line items that triggered the threshold invoice. + */ 'line_item_ids': string[]; + /** + * The quantity threshold boundary that applied to the given line item. + */ 'usage_gte': number; }; export type InvoiceThresholdReasonModel = { + /** + * The total invoice amount threshold boundary if it triggered the threshold invoice. + */ 'amount_gte'?: number | undefined; + /** + * Indicates which line items triggered a threshold invoice. + */ 'item_reasons': InvoiceItemThresholdReasonModel[]; }; +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export type InvoiceModel = { + /** + * The country of the business associated with this invoice, most often the business creating the invoice. + */ 'account_country'?: string | undefined; + /** + * The public name of the business associated with this invoice, most often the business creating the invoice. + */ 'account_name'?: string | undefined; + /** + * The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + */ 'account_tax_ids'?: Array | undefined; + /** + * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + */ 'amount_due': number; + /** + * Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. + */ 'amount_overpaid': number; + /** + * The amount, in cents (or local equivalent), that was paid. + */ 'amount_paid': number; + /** + * The difference between amount_due and amount_paid, in cents (or local equivalent). + */ 'amount_remaining': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * ID of the Connect Application that created the invoice. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; + /** + * Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + */ 'attempt_count': number; + /** + * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + */ 'attempted': boolean; + /** + * Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + */ 'auto_advance': boolean; 'automatic_tax': AutomaticTaxModel; + /** + * The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + */ 'automatically_finalizes_at'?: number | undefined; + /** + * Indicates the reason why the invoice was created. + * + * * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * * `subscription_create`: A new subscription was created. + * * `subscription_cycle`: A subscription advanced into a new period. + * * `subscription_threshold`: A subscription reached a billing threshold. + * * `subscription_update`: A subscription was updated. + * * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. + */ 'billing_reason'?: 'automatic_pending_invoice_item_invoice' | 'manual' | 'quote_accept' | 'subscription' | 'subscription_create' | 'subscription_cycle' | 'subscription_threshold' | 'subscription_update' | 'upcoming' | undefined; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. + */ 'confirmation_secret'?: InvoicesResourceConfirmationSecretModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields'?: InvoiceSettingCustomFieldModel[] | undefined; + /** + * The ID of the customer who will be billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_address'?: AddressModel | undefined; + /** + * The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_email'?: string | undefined; + /** + * The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_name'?: string | undefined; + /** + * The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_phone'?: string | undefined; + /** + * The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_shipping'?: ShippingModel | undefined; + /** + * The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_exempt'?: 'exempt' | 'none' | 'reverse' | undefined; + /** + * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_ids'?: InvoicesResourceInvoiceTaxIdModel[] | undefined; + /** + * 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. + */ 'default_payment_method'?: string | PaymentMethodModel | undefined; + /** + * ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + */ 'default_source'?: string | BankAccountModel | CardModel | SourceModel | undefined; + /** + * The tax rates applied to this invoice, if any. + */ 'default_tax_rates': TaxRateModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + */ 'description'?: string | undefined; + /** + * The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ 'due_date'?: number | undefined; + /** + * The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + */ 'effective_at'?: number | undefined; + /** + * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'ending_balance'?: number | undefined; + /** + * Footer displayed on the invoice. + */ 'footer'?: string | undefined; + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ 'from_invoice'?: InvoicesResourceFromInvoiceModel | undefined; + /** + * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + */ 'hosted_invoice_url'?: string | undefined; + /** + * Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`. + */ 'id': string; + /** + * The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'invoice_pdf'?: string | undefined; 'issuer': ConnectAccountReferenceModel; + /** + * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + */ 'last_finalization_error'?: ApiErrorsModel | undefined; + /** + * The ID of the most recent non-draft revision of this invoice + */ 'latest_revision'?: string | InvoiceModel | undefined; + /** + * The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + */ 'lines': { + /** + * Details about each object. + */ 'data': LineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ 'next_payment_attempt'?: number | undefined; + /** + * A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + */ 'number'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; + /** + * 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'?: string | AccountModel | undefined; + /** + * The parent that generated this invoice + */ 'parent'?: BillingBillResourceInvoicingParentsInvoiceParentModel | undefined; 'payment_settings': InvoicesPaymentSettingsModel; + /** + * Payments for this invoice + */ 'payments'?: { + /** + * Details about each object. + */ 'data': InvoicePaymentModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_end': number; + /** + * Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_start': number; + /** + * Total amount of all post-payment credit notes issued for this invoice. + */ 'post_payment_credit_notes_amount': number; + /** + * Total amount of all pre-payment credit notes issued for this invoice. + */ 'pre_payment_credit_notes_amount': number; + /** + * This is the transaction number that appears on email receipts sent for this invoice. + */ 'receipt_number'?: string | undefined; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ 'rendering'?: InvoicesResourceInvoiceRenderingModel | undefined; + /** + * The details of the cost of shipping, including the ShippingRate applied on the invoice. + */ 'shipping_cost'?: InvoicesResourceShippingCostModel | undefined; + /** + * Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + */ 'shipping_details'?: ShippingModel | undefined; + /** + * Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + */ 'starting_balance': number; + /** + * Extra information about an invoice for the customer's credit card statement. + */ 'statement_descriptor'?: string | undefined; + /** + * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + */ 'status'?: 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' | undefined; 'status_transitions': InvoicesResourceStatusTransitionsModel; + /** + * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + */ 'subtotal_excluding_tax'?: number | undefined; + /** + * ID of the test clock this invoice belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; 'threshold_reason'?: InvoiceThresholdReasonModel | undefined; + /** + * Total after discounts and taxes. + */ 'total': number; + /** + * The aggregate amounts calculated per discount across all line items. + */ 'total_discount_amounts'?: DiscountsResourceDiscountAmountModel[] | undefined; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + */ 'total_excluding_tax'?: number | undefined; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + */ 'total_pretax_credit_amounts'?: InvoicesResourcePretaxCreditAmountModel[] | undefined; + /** + * The aggregate tax information of all line items. + */ 'total_taxes'?: BillingBillResourceInvoicingTaxesTaxModel[] | undefined; + /** + * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ 'webhooks_delivered_at'?: number | undefined; }; +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export type SubscriptionsResourcePauseCollectionModel = { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ 'behavior': 'keep_as_draft' | 'mark_uncollectible' | 'void'; + /** + * The time after which the subscription will resume collecting payments. + */ 'resumes_at'?: number | undefined; }; export type InvoiceMandateOptionsCardModel = { + /** + * Amount to be charged for future payments. + */ 'amount'?: number | undefined; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type'?: 'fixed' | 'maximum' | undefined; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description'?: string | undefined; }; export type SubscriptionPaymentMethodOptionsCardModel = { 'mandate_options'?: InvoiceMandateOptionsCardModel | undefined; + /** + * Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + */ 'network'?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure'?: 'any' | 'automatic' | 'challenge' | undefined; }; export type SubscriptionsResourcePaymentMethodOptionsModel = { + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + */ 'acss_debit'?: InvoicePaymentMethodOptionsAcssDebitModel | undefined; + /** + * This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + */ 'bancontact'?: InvoicePaymentMethodOptionsBancontactModel | undefined; + /** + * This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + */ 'card'?: SubscriptionPaymentMethodOptionsCardModel | undefined; + /** + * This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + */ 'customer_balance'?: InvoicePaymentMethodOptionsCustomerBalanceModel | undefined; + /** + * This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + */ 'konbini'?: InvoicePaymentMethodOptionsKonbiniModel | undefined; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + */ 'sepa_debit'?: InvoicePaymentMethodOptionsSepaDebitModel | undefined; + /** + * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + */ 'us_bank_account'?: InvoicePaymentMethodOptionsUsBankAccountModel | undefined; }; export type SubscriptionsResourcePaymentSettingsModel = { + /** + * Payment-method-specific configuration to provide to invoices created by the subscription. + */ 'payment_method_options'?: SubscriptionsResourcePaymentMethodOptionsModel | undefined; + /** + * The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types'?: Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'us_bank_account' | 'wechat_pay'> | undefined; + /** + * Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. + */ 'save_default_payment_method'?: 'off' | 'on_subscription' | undefined; }; export type SubscriptionPendingInvoiceItemIntervalModel = { + /** + * Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + */ 'interval_count': number; }; +/** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ export type SubscriptionsResourcePendingUpdateModel = { + /** + * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ 'billing_cycle_anchor'?: number | undefined; + /** + * The point after which the changes reflected by this update will be discarded and no longer applied. + */ 'expires_at': number; + /** + * List of subscription items, each with an attached plan, that will be set if the update is applied. + */ 'subscription_items'?: SubscriptionItemModel[] | undefined; + /** + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + */ 'trial_end'?: number | undefined; + /** + * Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + */ 'trial_from_plan'?: boolean | undefined; }; export type SubscriptionScheduleCurrentPhaseModel = { + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; }; export type SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason'?: 'requires_location_inputs' | undefined; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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'?: ConnectAccountReferenceModel | undefined; }; export type InvoiceSettingSubscriptionScheduleSettingModel = { + /** + * The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + */ 'account_tax_ids'?: Array | undefined; + /** + * 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 | undefined; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionTransferDataModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount_percent'?: number | undefined; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; export type SubscriptionSchedulesResourceDefaultSettingsModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent'?: number | undefined; 'automatic_tax'?: SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor': 'automatic' | 'phase_start'; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds'?: SubscriptionBillingThresholdsModel | undefined; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method'?: 'charge_automatically' | 'send_invoice' | undefined; + /** + * ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method'?: string | PaymentMethodModel | undefined; + /** + * 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 | undefined; 'invoice_settings': InvoiceSettingSubscriptionScheduleSettingModel; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data'?: SubscriptionTransferDataModel | undefined; }; export type DiscountsResourceStackableDiscountModel = { + /** + * ID of the coupon to create a new discount for. + */ 'coupon'?: string | CouponModel | undefined; + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ 'discount'?: string | DiscountModel | undefined; + /** + * ID of the promotion code to create a new discount for. + */ 'promotion_code'?: string | PromotionCodeModel | undefined; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEndModel = { + /** + * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the end of the invoice item period. + */ 'type': 'min_item_period_end' | 'phase_end' | 'timestamp'; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStartModel = { + /** + * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the start of the invoice item period. + */ 'type': 'max_item_period_start' | 'phase_start' | 'timestamp'; }; @@ -5527,417 +13939,1281 @@ export type SubscriptionScheduleAddInvoiceItemPeriodModel = { }; export type DeletedPriceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; }; +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export type SubscriptionScheduleAddInvoiceItemModel = { + /** + * The stackable discounts that will be applied to the item. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * 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'?: { [key: string]: string; } | undefined; 'period': SubscriptionScheduleAddInvoiceItemPeriodModel; + /** + * ID of the price used to generate the invoice item. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * The quantity of the invoice item. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; export type SchedulesPhaseAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason'?: 'requires_location_inputs' | undefined; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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'?: ConnectAccountReferenceModel | undefined; }; export type InvoiceSettingSubscriptionSchedulePhaseSettingModel = { + /** + * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + */ 'account_tax_ids'?: Array | undefined; + /** + * 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 | undefined; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer'?: ConnectAccountReferenceModel | undefined; }; +/** + * A phase item describes the price and quantity of a phase. + */ export type SubscriptionScheduleConfigurationItemModel = { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds'?: SubscriptionItemBillingThresholdsModel | undefined; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + */ 'metadata'?: { [key: string]: string; } | undefined; + /** + * ID of the price to which the customer should be subscribed. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * Quantity of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; +/** + * A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ export type SubscriptionSchedulePhaseConfigurationModel = { + /** + * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + */ 'add_invoice_items': SubscriptionScheduleAddInvoiceItemModel[]; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent'?: number | undefined; 'automatic_tax'?: SchedulesPhaseAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor'?: 'automatic' | 'phase_start' | undefined; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds'?: SubscriptionBillingThresholdsModel | undefined; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method'?: 'charge_automatically' | 'send_invoice' | undefined; + /** + * 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; + /** + * ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method'?: string | PaymentMethodModel | undefined; + /** + * The default tax rates to apply to the subscription during this phase of the subscription schedule. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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 | undefined; + /** + * The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The invoice settings applicable during this phase. + */ 'invoice_settings'?: InvoiceSettingSubscriptionSchedulePhaseSettingModel | undefined; + /** + * Subscription items to configure the subscription to during this phase of the subscription schedule. + */ 'items': SubscriptionScheduleConfigurationItemModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + */ 'metadata'?: { [key: string]: string; } | undefined; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data'?: SubscriptionTransferDataModel | undefined; + /** + * When the trial ends within the phase. + */ 'trial_end'?: number | undefined; }; +/** + * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) + */ export type SubscriptionScheduleModel = { + /** + * ID of the Connect Application that created the schedule. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at'?: number | undefined; + /** + * Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ 'completed_at'?: number | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + */ 'current_phase'?: SubscriptionScheduleCurrentPhaseModel | undefined; + /** + * ID of the customer who owns the subscription schedule. + */ 'customer': string | CustomerModel | DeletedCustomerModel; 'default_settings': SubscriptionSchedulesResourceDefaultSettingsModel; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + */ 'end_behavior': 'cancel' | 'none' | 'release' | 'renew'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_schedule'; + /** + * Configuration for the subscription schedule's phases. + */ 'phases': SubscriptionSchedulePhaseConfigurationModel[]; + /** + * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ 'released_at'?: number | undefined; + /** + * ID of the subscription once managed by the subscription schedule (if it is released). + */ 'released_subscription'?: string | undefined; + /** + * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ 'status': 'active' | 'canceled' | 'completed' | 'not_started' | 'released'; + /** + * ID of the subscription managed by the subscription schedule. + */ 'subscription'?: string | SubscriptionModel | undefined; + /** + * ID of the test clock this subscription schedule belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; }; +/** + * Defines how a subscription behaves when a free trial ends. + */ export type SubscriptionsTrialsResourceEndBehaviorModel = { + /** + * Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + */ 'missing_payment_method': 'cancel' | 'create_invoice' | 'pause'; }; +/** + * Configures how this subscription behaves during the trial period. + */ export type SubscriptionsTrialsResourceTrialSettingsModel = { 'end_behavior': SubscriptionsTrialsResourceEndBehaviorModel; }; +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export type SubscriptionModel = { + /** + * ID of the Connect Application that created the subscription. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent'?: number | undefined; 'automatic_tax': SubscriptionAutomaticTaxModel; + /** + * The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + */ 'billing_cycle_anchor': number; + /** + * The fixed values used to calculate the `billing_cycle_anchor`. + */ 'billing_cycle_anchor_config'?: SubscriptionsResourceBillingCycleAnchorConfigModel | undefined; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds'?: SubscriptionBillingThresholdsModel | undefined; + /** + * A date in the future at which the subscription will automatically get canceled + */ 'cancel_at'?: number | undefined; + /** + * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + */ 'cancel_at_period_end': boolean; + /** + * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + */ 'canceled_at'?: number | undefined; + /** + * Details about why this subscription was cancelled + */ 'cancellation_details'?: CancellationDetailsModel | undefined; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer who owns the subscription. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + */ 'days_until_due'?: number | undefined; + /** + * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_payment_method'?: string | PaymentMethodModel | undefined; + /** + * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_source'?: string | BankAccountModel | CardModel | SourceModel | undefined; + /** + * The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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 | undefined; + /** + * The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * If the subscription has ended, the date the subscription ended. + */ 'ended_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'invoice_settings': SubscriptionsResourceSubscriptionInvoiceSettingsModel; + /** + * List of subscription items, each with an attached price. + */ 'items': { + /** + * Details about each object. + */ 'data': SubscriptionItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * The most recent invoice this subscription has generated. + */ 'latest_invoice'?: string | InvoiceModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + */ 'next_pending_invoice_item_invoice'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription'; + /** + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'pause_collection'?: SubscriptionsResourcePauseCollectionModel | undefined; + /** + * Payment settings passed on to invoices created by the subscription. + */ 'payment_settings'?: SubscriptionsResourcePaymentSettingsModel | undefined; + /** + * Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + */ 'pending_invoice_item_interval'?: SubscriptionPendingInvoiceItemIntervalModel | undefined; + /** + * You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + */ 'pending_setup_intent'?: string | SetupIntentModel | undefined; + /** + * If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + */ 'pending_update'?: SubscriptionsResourcePendingUpdateModel | undefined; + /** + * The schedule attached to the subscription + */ 'schedule'?: string | SubscriptionScheduleModel | undefined; + /** + * Date when the subscription was first created. The date might differ from the `created` date due to backdating. + */ 'start_date': number; + /** + * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + * + * If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + */ 'status': 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'paused' | 'trialing' | 'unpaid'; + /** + * ID of the test clock this subscription belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data'?: SubscriptionTransferDataModel | undefined; + /** + * If the subscription has a trial, the end of that trial. + */ 'trial_end'?: number | undefined; + /** + * Settings related to subscription trials. + */ 'trial_settings'?: SubscriptionsTrialsResourceTrialSettingsModel | undefined; + /** + * If the subscription has a trial, the beginning of that trial. + */ 'trial_start'?: number | undefined; }; export type CustomerTaxLocationModel = { + /** + * The identified tax country of the customer. + */ 'country': string; + /** + * The data source used to infer the customer's location. + */ 'source': 'billing_address' | 'ip_address' | 'payment_method' | 'shipping_destination'; + /** + * The identified tax state, county, province, or region of the customer. + */ 'state'?: string | undefined; }; export type CustomerTaxModel = { + /** + * Surfaces if automatic tax computation is possible given the current customer location information. + */ 'automatic_tax': 'failed' | 'not_collecting' | 'supported' | 'unrecognized_location'; + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ 'ip_address'?: string | undefined; + /** + * The identified tax location of the customer. + */ 'location'?: CustomerTaxLocationModel | undefined; + /** + * The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; }; +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export type CustomerModel = { + /** + * The customer's address. + */ 'address'?: AddressModel | undefined; + /** + * The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance). + */ 'balance'?: number | undefined; + /** + * The customer's business name. + */ 'business_name'?: string | undefined; + /** + * The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + */ 'cash_balance'?: CashBalanceModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + */ 'currency'?: string | undefined; + /** + * ID of the default payment source for the customer. + * + * If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ 'default_source'?: string | BankAccountModel | CardModel | SourceModel | undefined; + /** + * Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + * + * If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + * + * If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + */ 'delinquent'?: boolean | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Describes the current discount active on the customer, if there is one. + */ 'discount'?: DiscountModel | undefined; + /** + * The customer's email address. + */ 'email'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The customer's individual name. + */ 'individual_name'?: string | undefined; + /** + * The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + */ 'invoice_credit_balance'?: { [key: string]: number; } | undefined; + /** + * The prefix for the customer used to generate unique invoice numbers. + */ 'invoice_prefix'?: string | undefined; 'invoice_settings'?: InvoiceSettingCustomerSettingModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The customer's full name or business name. + */ 'name'?: string | undefined; + /** + * The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + */ 'next_invoice_sequence'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; + /** + * The customer's phone number. + */ 'phone'?: string | undefined; + /** + * The customer's preferred locales (languages), ordered by preference. + */ 'preferred_locales'?: string[] | undefined; + /** + * Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + */ 'shipping'?: ShippingModel | undefined; + /** + * The customer's payment sources, if any. + */ 'sources'?: { + /** + * Details about each object. + */ 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The customer's current subscriptions, if any. + */ 'subscriptions'?: { + /** + * Details about each object. + */ 'data': SubscriptionModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'tax'?: CustomerTaxModel | undefined; + /** + * Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + */ 'tax_exempt'?: 'exempt' | 'none' | 'reverse' | undefined; + /** + * The customer's tax IDs. + */ 'tax_ids'?: { + /** + * Details about each object. + */ 'data': TaxIdModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the test clock that this customer belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; }; export type AccountRequirementsErrorModel = { + /** + * The code for the type of error. + */ 'code': 'external_request' | 'information_missing' | 'invalid_address_city_state_postal_code' | 'invalid_address_highway_contract_box' | 'invalid_address_private_mailbox' | 'invalid_business_profile_name' | 'invalid_business_profile_name_denylisted' | 'invalid_company_name_denylisted' | 'invalid_dob_age_over_maximum' | 'invalid_dob_age_under_18' | 'invalid_dob_age_under_minimum' | 'invalid_product_description_length' | 'invalid_product_description_url_match' | 'invalid_representative_country' | 'invalid_signator' | 'invalid_statement_descriptor_business_mismatch' | 'invalid_statement_descriptor_denylisted' | 'invalid_statement_descriptor_length' | 'invalid_statement_descriptor_prefix_denylisted' | 'invalid_statement_descriptor_prefix_mismatch' | 'invalid_street_address' | 'invalid_tax_id' | 'invalid_tax_id_format' | 'invalid_tos_acceptance' | 'invalid_url_denylisted' | 'invalid_url_format' | 'invalid_url_web_presence_detected' | 'invalid_url_website_business_information_mismatch' | 'invalid_url_website_empty' | 'invalid_url_website_inaccessible' | 'invalid_url_website_inaccessible_geoblocked' | 'invalid_url_website_inaccessible_password_protected' | 'invalid_url_website_incomplete' | 'invalid_url_website_incomplete_cancellation_policy' | 'invalid_url_website_incomplete_customer_service_details' | 'invalid_url_website_incomplete_legal_restrictions' | 'invalid_url_website_incomplete_refund_policy' | 'invalid_url_website_incomplete_return_policy' | 'invalid_url_website_incomplete_terms_and_conditions' | 'invalid_url_website_incomplete_under_construction' | 'invalid_url_website_other' | 'invalid_value_other' | 'unsupported_business_type' | 'verification_directors_mismatch' | 'verification_document_address_mismatch' | 'verification_document_address_missing' | 'verification_document_corrupt' | 'verification_document_country_not_supported' | 'verification_document_directors_mismatch' | '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_extraneous_directors' | 'verification_failed_address_match' | 'verification_failed_authorizer_authority' | '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_representative_authority' | 'verification_failed_residential_address' | 'verification_failed_tax_id_match' | 'verification_failed_tax_id_not_issued' | 'verification_legal_entity_structure_mismatch' | 'verification_missing_directors' | 'verification_missing_executives' | 'verification_missing_owners' | 'verification_rejected_ownership_exemption_reason' | 'verification_requires_additional_memorandum_of_associations' | 'verification_requires_additional_proof_of_registration' | 'verification_supportability'; + /** + * 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; }; export type ExternalAccountRequirementsModel = { + /** + * 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'?: string[] | undefined; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors'?: AccountRequirementsErrorModel[] | undefined; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + */ 'past_due'?: string[] | undefined; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification'?: string[] | undefined; }; +/** + * These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](/api#external_accounts) are transfer + * destinations on `Account` objects for connected accounts. + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + */ export type BankAccountModel = { + /** + * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'account'?: string | AccountModel | undefined; + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name'?: string | undefined; + /** + * The type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type'?: string | undefined; + /** + * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + */ 'account_type'?: string | undefined; + /** + * A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + */ 'bank_name'?: string | undefined; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency': string; + /** + * The ID of the customer that the bank account is associated with. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Whether this bank account is the default external account for its currency. + */ 'default_for_currency'?: boolean | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + */ 'future_requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the bank account number. + */ 'last4': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; + /** + * Information about the requirements for the bank account, including what information needs to be collected. + */ 'requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * The routing transit number for the bank account. + */ 'routing_number'?: string | undefined; + /** + * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + * + * For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + */ 'status': string; }; export type AccountRequirementsAlternativeModel = { + /** + * Fields that can be provided to satisfy all fields in `original_fields_due`. + */ 'alternative_fields_due': string[]; + /** + * Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + */ 'original_fields_due': string[]; }; export type AccountFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + */ 'current_deadline'?: number | undefined; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due'?: string[] | undefined; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`. + */ 'disabled_reason'?: 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review' | undefined; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors'?: AccountRequirementsErrorModel[] | undefined; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due'?: string[] | undefined; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due'?: string[] | undefined; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification'?: string[] | undefined; }; export type AccountGroupMembershipModel = { + /** + * The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + */ 'payments_pricing'?: string | undefined; }; export type PersonAdditionalTosAcceptanceModel = { + /** + * The Unix timestamp marking when the legal guardian accepted the service agreement. + */ 'date'?: number | undefined; + /** + * The IP address from which the legal guardian accepted the service agreement. + */ 'ip'?: string | undefined; + /** + * The user agent of the browser from which the legal guardian accepted the service agreement. + */ 'user_agent'?: string | undefined; }; export type PersonAdditionalTosAcceptancesModel = { + /** + * Details on the legal guardian's acceptance of the main Stripe service agreement. + */ 'account'?: PersonAdditionalTosAcceptanceModel | undefined; }; export type LegalEntityDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day'?: number | undefined; + /** + * The month of birth, between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year of birth. + */ 'year'?: number | undefined; }; export type PersonFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonRelationshipModel = { + /** + * Whether the person is the authorizer of the account's representative. + */ 'authorizer'?: boolean | undefined; + /** + * Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + */ 'director'?: boolean | undefined; + /** + * Whether the person has significant responsibility to control, manage, or direct the organization. + */ 'executive'?: boolean | undefined; + /** + * Whether the person is the legal guardian of the account's representative. + */ 'legal_guardian'?: boolean | undefined; + /** + * Whether the person is an owner of the account’s legal entity. + */ 'owner'?: boolean | undefined; + /** + * The percent owned by the person of the account's legal entity. + */ 'percent_ownership'?: number | undefined; + /** + * Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + */ 'representative'?: boolean | undefined; + /** + * The person's title (e.g., CEO, Support Engineer). + */ 'title'?: string | undefined; }; export type PersonRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonEthnicityDetailsModel = { + /** + * The persons ethnicity + */ 'ethnicity'?: Array<'cuban' | 'hispanic_or_latino' | 'mexican' | 'not_hispanic_or_latino' | 'other_hispanic_or_latino' | 'prefer_not_to_answer' | 'puerto_rican'> | undefined; + /** + * Please specify your origin, when other is selected. + */ 'ethnicity_other'?: string | undefined; }; export type PersonRaceDetailsModel = { + /** + * The persons race. + */ 'race'?: Array<'african_american' | 'american_indian_or_alaska_native' | 'asian' | 'asian_indian' | 'black_or_african_american' | 'chinese' | 'ethiopian' | 'filipino' | 'guamanian_or_chamorro' | 'haitian' | 'jamaican' | 'japanese' | 'korean' | 'native_hawaiian' | 'native_hawaiian_or_other_pacific_islander' | 'nigerian' | 'other_asian' | 'other_black_or_african_american' | 'other_pacific_islander' | 'prefer_not_to_answer' | 'samoan' | 'somali' | 'vietnamese' | 'white'> | undefined; + /** + * Please specify your race, when other is selected. + */ 'race_other'?: string | undefined; }; export type PersonUsCfpbDataModel = { + /** + * The persons ethnicity details + */ 'ethnicity_details'?: PersonEthnicityDetailsModel | undefined; + /** + * The persons race details + */ 'race_details'?: PersonRaceDetailsModel | undefined; + /** + * The persons self-identified gender + */ 'self_identified_gender'?: string | undefined; }; export type LegalEntityPersonVerificationDocumentModel = { + /** + * The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back'?: string | FileModel | undefined; + /** + * A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + */ 'details'?: string | undefined; + /** + * One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + */ 'details_code'?: string | undefined; + /** + * The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front'?: string | FileModel | undefined; }; export type LegalEntityPersonVerificationModel = { + /** + * A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + */ 'additional_document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + */ 'details'?: string | undefined; + /** + * One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + */ 'details_code'?: string | undefined; 'document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://stripe.com/docs/connect/handling-api-verification) to handle verification updates. + */ 'status': string; }; +/** + * This is an object representing a person associated with a Stripe account. + * + * A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + * + * See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + */ export type PersonModel = { + /** + * The account the person is associated with. + */ 'account': string; 'additional_tos_acceptances'?: PersonAdditionalTosAcceptancesModel | undefined; 'address'?: AddressModel | undefined; 'address_kana'?: LegalEntityJapanAddressModel | undefined; 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'dob'?: LegalEntityDobModel | undefined; + /** + * The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'email'?: string | undefined; + /** + * The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name'?: string | undefined; + /** + * The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kanji'?: string | undefined; + /** + * A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'full_name_aliases'?: string[] | undefined; 'future_requirements'?: PersonFutureRequirementsModel | undefined; + /** + * The person's gender. + */ 'gender'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + */ 'id_number_provided'?: boolean | undefined; + /** + * Whether the person's `id_number_secondary` was provided. + */ 'id_number_secondary_provided'?: boolean | undefined; + /** + * The person's last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name'?: string | undefined; + /** + * The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kanji'?: string | undefined; + /** + * The person's maiden name. + */ 'maiden_name'?: string | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The country where the person is a national. + */ 'nationality'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; + /** + * The person's phone number. + */ 'phone'?: string | undefined; + /** + * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + */ 'political_exposure'?: 'existing' | 'none' | undefined; 'registered_address'?: AddressModel | undefined; 'relationship'?: PersonRelationshipModel | undefined; 'requirements'?: PersonRequirementsModel | undefined; + /** + * Whether the last four digits of the person's Social Security number have been provided (U.S. only). + */ 'ssn_last_4_provided'?: boolean | undefined; + /** + * Demographic data related to the person. + */ 'us_cfpb_data'?: PersonUsCfpbDataModel | undefined; 'verification'?: LegalEntityPersonVerificationModel | undefined; }; export type AccountRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + */ 'current_deadline'?: number | undefined; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due'?: string[] | undefined; + /** + * If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason'?: 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review' | undefined; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors'?: AccountRequirementsErrorModel[] | undefined; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due'?: string[] | undefined; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + */ 'past_due'?: string[] | undefined; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification'?: string[] | undefined; }; export type AccountBacsDebitPaymentsSettingsModel = { + /** + * The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + */ 'display_name'?: string | undefined; + /** + * The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + */ 'service_user_number'?: string | undefined; }; export type AccountBrandingSettingsModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + */ 'icon'?: string | FileModel | undefined; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + */ 'logo'?: string | FileModel | undefined; + /** + * A CSS hex color value representing the primary branding color for this account + */ 'primary_color'?: string | undefined; + /** + * A CSS hex color value representing the secondary branding color for this account + */ 'secondary_color'?: string | undefined; }; export type CardIssuingAccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date'?: number | undefined; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip'?: string | undefined; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -5946,55 +15222,127 @@ export type AccountCardIssuingSettingsModel = { }; export type AccountDeclineChargeOnModel = { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + */ 'avs_failure': boolean; + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + */ 'cvc_failure': boolean; }; export type AccountCardPaymentsSettingsModel = { 'decline_on'?: AccountDeclineChargeOnModel | undefined; + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix'?: string | undefined; + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kana'?: string | undefined; + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kanji'?: string | undefined; }; export type AccountDashboardSettingsModel = { + /** + * The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + */ 'display_name'?: string | undefined; + /** + * The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + */ 'timezone'?: string | undefined; }; export type AccountInvoicesSettingsModel = { + /** + * The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + */ 'default_account_tax_ids'?: Array | undefined; + /** + * Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page. + */ 'hosted_payment_method_save'?: 'always' | 'never' | 'offer' | undefined; }; export type AccountPaymentsSettingsModel = { + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + */ 'statement_descriptor'?: string | undefined; + /** + * The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kana'?: string | undefined; + /** + * The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kanji'?: string | undefined; }; export type TransferScheduleModel = { + /** + * The number of days charges for the account will be held before being paid out. + */ 'delay_days': number; + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval': string; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_anchor'?: number | undefined; + /** + * The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + */ 'weekly_anchor'?: string | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type AccountPayoutSettingsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances': boolean; 'schedule': TransferScheduleModel; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor'?: string | undefined; }; export type AccountSepaDebitPaymentsSettingsModel = { + /** + * SEPA creditor identifier that identifies the company making the payment. + */ 'creditor_id'?: string | undefined; }; export type AccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date'?: number | undefined; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip'?: string | undefined; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -6016,105 +15364,299 @@ export type AccountSettingsModel = { }; export type AccountTosAcceptanceModel = { + /** + * The Unix timestamp marking when the account representative accepted their service agreement + */ 'date'?: number | undefined; + /** + * The IP address from which the account representative accepted their service agreement + */ 'ip'?: string | undefined; + /** + * The user's service agreement type + */ 'service_agreement'?: string | undefined; + /** + * The user agent of the browser from which the account representative accepted their service agreement + */ 'user_agent'?: string | undefined; }; +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export type AccountModel = { + /** + * Business information about the account. + */ 'business_profile'?: AccountBusinessProfileModel | undefined; + /** + * The business type. + */ 'business_type'?: 'company' | 'government_entity' | 'individual' | 'non_profit' | undefined; 'capabilities'?: AccountCapabilitiesModel | undefined; + /** + * Whether the account can process charges. + */ 'charges_enabled'?: boolean | undefined; 'company'?: LegalEntityCompanyModel | undefined; 'controller'?: AccountUnificationAccountControllerModel | undefined; + /** + * The account's country. + */ 'country'?: string | undefined; + /** + * Time at which the account was connected. Measured in seconds since the Unix epoch. + */ 'created'?: number | undefined; + /** + * Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + */ 'default_currency'?: string | undefined; + /** + * Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + */ 'details_submitted'?: boolean | undefined; + /** + * An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + */ 'email'?: string | undefined; + /** + * External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + */ 'external_accounts'?: { + /** + * The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. + */ 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'future_requirements'?: AccountFutureRequirementsModel | undefined; + /** + * The groups associated with the account. + */ 'groups'?: AccountGroupMembershipModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'individual'?: PersonModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; + /** + * Whether the funds in this account can be paid out. + */ 'payouts_enabled'?: boolean | undefined; 'requirements'?: AccountRequirementsModel | undefined; + /** + * Options for customizing how the account functions within Stripe. + */ 'settings'?: AccountSettingsModel | undefined; 'tos_acceptance'?: AccountTosAcceptanceModel | undefined; + /** + * The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + */ 'type'?: 'custom' | 'express' | 'none' | 'standard' | undefined; }; export type AccountCapabilityFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + */ 'current_deadline'?: number | undefined; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due': string[]; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + */ 'disabled_reason'?: 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed' | undefined; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountCapabilityRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives'?: AccountRequirementsAlternativeModel[] | undefined; + /** + * The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested. + */ 'current_deadline'?: number | undefined; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. + */ 'currently_due': string[]; + /** + * Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason'?: 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed' | undefined; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; +/** + * Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. + * + * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) + */ export type AccountLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The timestamp at which this account link will expire. + */ 'expires_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_link'; + /** + * The URL for the account link. + */ 'url': string; }; export type ConnectEmbeddedAccountFeaturesClaimModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; }; export type ConnectEmbeddedAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedAccountFeaturesClaimModel; }; export type ConnectEmbeddedPayoutsFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'edit_payout_schedule': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; + /** + * Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'standard_payouts': boolean; }; export type ConnectEmbeddedPayoutsConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPayoutsFeaturesModel; }; export type ConnectEmbeddedDisputesListFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedDisputesListConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedDisputesListFeaturesModel; }; @@ -6124,86 +15666,182 @@ export type ConnectEmbeddedBaseFeaturesModel = { }; export type ConnectEmbeddedBaseConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedBaseFeaturesModel; }; export type ConnectEmbeddedFinancialAccountFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow sending money. + */ 'send_money': boolean; + /** + * Whether to allow transferring balance. + */ 'transfer_balance': boolean; }; export type ConnectEmbeddedFinancialAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountFeaturesModel; }; export type ConnectEmbeddedFinancialAccountTransactionsFeaturesModel = { + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; }; export type ConnectEmbeddedFinancialAccountTransactionsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountTransactionsFeaturesModel; }; export type ConnectEmbeddedInstantPayoutsPromotionFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; }; export type ConnectEmbeddedInstantPayoutsPromotionConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedInstantPayoutsPromotionFeaturesModel; }; export type ConnectEmbeddedIssuingCardFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardFeaturesModel; }; export type ConnectEmbeddedIssuingCardsListFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardsListConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardsListFeaturesModel; }; export type ConnectEmbeddedPaymentsFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentsFeaturesModel; }; export type ConnectEmbeddedPaymentDisputesFeaturesModel = { + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentDisputesConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentDisputesFeaturesModel; }; @@ -6230,232 +15868,596 @@ export type ConnectEmbeddedAccountSessionCreateComponentsModel = { 'tax_settings': ConnectEmbeddedBaseConfigClaimModel; }; +/** + * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. + * + * We recommend that you create an AccountSession each time you need to display an embedded component + * to your user. Do not save AccountSessions to your database as they expire relatively + * quickly, and cannot be used more than once. + * + * Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + */ export type AccountSessionModel = { + /** + * The ID of the account the AccountSession was created for + */ 'account': string; + /** + * The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + * + * The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + */ 'client_secret': string; 'components': ConnectEmbeddedAccountSessionCreateComponentsModel; + /** + * The timestamp at which this AccountSession will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_session'; }; export type ApplePayDomainModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'domain_name': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; export type SecretServiceResourceScopeModel = { + /** + * The secret scope type. + */ 'type': 'account' | 'user'; + /** + * The user ID, if type is set to "user" + */ 'user'?: string | undefined; }; +/** + * Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) + */ export type AppsSecretModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If true, indicates that this secret has been deleted + */ 'deleted'?: boolean | undefined; + /** + * The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A name for the secret that's unique within the scope. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apps.secret'; + /** + * The plaintext secret value to be stored. + */ 'payload'?: string | undefined; 'scope': SecretServiceResourceScopeModel; }; export type BalanceAmountBySourceTypeModel = { + /** + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). + */ 'bank_account'?: number | undefined; + /** + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). + */ 'card'?: number | undefined; + /** + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. + */ 'fpx'?: number | undefined; }; export type BalanceAmountModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceNetAvailableModel = { + /** + * Net balance amount, subtracting fees from platform-set pricing. + */ 'amount': number; + /** + * ID of the external account for this net balance (not expandable). + */ 'destination': string; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceAmountNetModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; + /** + * Breakdown of balance by destination. + */ 'net_available'?: BalanceNetAvailableModel[] | undefined; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceDetailModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; }; export type BalanceDetailUngatedModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; + /** + * Funds that are pending + */ 'pending': BalanceAmountModel[]; }; +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export type BalanceModel = { + /** + * Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + */ 'available': BalanceAmountModel[]; + /** + * Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + */ 'connect_reserved'?: BalanceAmountModel[] | undefined; + /** + * Funds that you can pay out using Instant Payouts. + */ 'instant_available'?: BalanceAmountNetModel[] | undefined; 'issuing'?: BalanceDetailModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance'; + /** + * Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + */ 'pending': BalanceAmountModel[]; 'refund_and_dispute_prefunding'?: BalanceDetailUngatedModel | undefined; }; export type BalanceSettingsResourcePayoutScheduleModel = { + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval'?: 'daily' | 'manual' | 'monthly' | 'weekly' | undefined; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type BalanceSettingsResourcePayoutsModel = { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](/payouts/minimum-balances-for-automatic-payouts). + */ 'minimum_balance_by_currency'?: { [key: string]: number; } | undefined; + /** + * Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details. + */ 'schedule'?: BalanceSettingsResourcePayoutScheduleModel | undefined; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor'?: string | undefined; + /** + * Whether the funds in this account can be paid out. + */ 'status': 'disabled' | 'enabled'; }; export type BalanceSettingsResourceSettlementTimingModel = { + /** + * The number of days charge funds are held before becoming available. + */ 'delay_days': number; + /** + * The number of days charge funds are held before becoming available. If present, overrides the default, or minimum available, for the account. + */ 'delay_days_override'?: number | undefined; }; export type BalanceSettingsResourcePaymentsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances'?: boolean | undefined; + /** + * Settings specific to the account's payouts. + */ 'payouts'?: BalanceSettingsResourcePayoutsModel | undefined; 'settlement_timing': BalanceSettingsResourceSettlementTimingModel; }; +/** + * Options for customizing account balances and payout settings for a Stripe platform’s connected accounts. + */ export type BalanceSettingsModel = { + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_settings'; 'payments': BalanceSettingsResourcePaymentsModel; }; export type BankConnectionsResourceAccountNumberDetailsModel = { + /** + * When the account number is expected to expire, if applicable. + */ 'expected_expiry_date'?: number | undefined; + /** + * The type of account number associated with the account. + */ 'identifier_type': 'account_number' | 'tokenized_account_number'; + /** + * Whether the account number is currently active and usable for transactions. + */ 'status': 'deactivated' | 'transactable'; + /** + * The payment networks that the account number can be used for. + */ 'supported_networks': 'ach'[]; }; export type BankConnectionsResourceAccountholderModel = { + /** + * The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; + /** + * Type of account holder that this account belongs to. + */ 'type': 'account' | 'customer'; }; export type BankConnectionsResourceBalanceApiResourceCashBalanceModel = { + /** + * The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'available'?: { [key: string]: number; } | undefined; }; export type BankConnectionsResourceBalanceApiResourceCreditBalanceModel = { + /** + * The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'used'?: { [key: string]: number; } | undefined; }; export type BankConnectionsResourceBalanceModel = { + /** + * The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ 'as_of': number; 'cash'?: BankConnectionsResourceBalanceApiResourceCashBalanceModel | undefined; 'credit'?: BankConnectionsResourceBalanceApiResourceCreditBalanceModel | undefined; + /** + * The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'current': { [key: string]: number; }; + /** + * The `type` of the balance. An additional hash is included on the balance with a name matching this value. + */ 'type': 'cash' | 'credit'; }; export type BankConnectionsResourceBalanceRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at'?: number | undefined; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceLinkAccountSessionFiltersModel = { + /** + * Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + */ 'account_subcategories'?: Array<'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'savings'> | undefined; + /** + * List of countries from which to filter accounts. + */ 'countries'?: string[] | undefined; }; export type BankConnectionsResourceOwnershipRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at'?: number | undefined; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionRefreshModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at'?: number | undefined; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionResourceStatusTransitionsModel = { + /** + * Time at which this transaction posted. Measured in seconds since the Unix epoch. + */ 'posted_at'?: number | undefined; + /** + * Time at which this transaction was voided. Measured in seconds since the Unix epoch. + */ 'void_at'?: number | undefined; }; export type ThresholdsResourceUsageAlertFilterModel = { + /** + * Limit the scope of the alert to this customer ID + */ 'customer'?: string | CustomerModel | undefined; 'type': 'customer'; }; export type BillingMeterResourceCustomerMappingSettingsModel = { + /** + * The key in the meter event payload to use for mapping the event to a customer. + */ 'event_payload_key': string; + /** + * The method for mapping a meter event to a customer. + */ 'type': 'by_id'; }; export type BillingMeterResourceAggregationSettingsModel = { + /** + * Specifies how events are aggregated. + */ 'formula': 'count' | 'last' | 'sum'; }; export type BillingMeterResourceBillingMeterStatusTransitionsModel = { + /** + * The time the meter was deactivated, if any. Measured in seconds since Unix epoch. + */ 'deactivated_at'?: number | undefined; }; export type BillingMeterResourceBillingMeterValueModel = { + /** + * The key in the meter event payload to use as the value for this meter. + */ 'event_payload_key': string; }; +/** + * Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. + * + * Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) + */ export type BillingMeterModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'customer_mapping': BillingMeterResourceCustomerMappingSettingsModel; 'default_aggregation': BillingMeterResourceAggregationSettingsModel; + /** + * The meter's name. + */ 'display_name': string; + /** + * The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + */ 'event_name': string; + /** + * The time window which meter events have been pre-aggregated for, if any. + */ 'event_time_window'?: 'day' | 'hour' | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter'; + /** + * The meter's status. + */ 'status': 'active' | 'inactive'; 'status_transitions': BillingMeterResourceBillingMeterStatusTransitionsModel; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; 'value_settings': BillingMeterResourceBillingMeterValueModel; }; +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export type ThresholdsResourceUsageThresholdConfigModel = { + /** + * The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. + */ 'filters'?: ThresholdsResourceUsageAlertFilterModel[] | undefined; + /** + * The value at which this alert will trigger. + */ 'gte': number; + /** + * The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + */ 'meter': string | BillingMeterModel; + /** + * Defines how the alert will behave. + */ 'recurrence': 'one_time'; }; +/** + * A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + */ export type BillingAlertModel = { + /** + * Defines the type of the alert. + */ 'alert_type': 'usage_threshold'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.alert'; + /** + * Status of the alert. This can be active, inactive or archived. + */ 'status'?: 'active' | 'archived' | 'inactive' | undefined; + /** + * Title of the alert. + */ 'title': string; + /** + * Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + */ 'usage_threshold'?: ThresholdsResourceUsageThresholdConfigModel | undefined; }; @@ -6464,116 +16466,293 @@ export type CreditBalanceModel = { 'ledger_balance': BillingCreditGrantsResourceAmountModel; }; +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export type BillingCreditBalanceSummaryModel = { + /** + * The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + */ 'balances': CreditBalanceModel[]; + /** + * The customer the balance is for. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_summary'; }; +/** + * Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. + */ export type BillingMeterEventModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * A unique identifier for the event. + */ 'identifier': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event'; + /** + * The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + */ 'payload': { [key: string]: string; }; + /** + * The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + */ 'timestamp': number; }; export type BillingMeterResourceBillingMeterEventAdjustmentCancelModel = { + /** + * Unique identifier for the event. + */ 'identifier'?: string | undefined; }; +/** + * A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. + */ export type BillingMeterEventAdjustmentModel = { + /** + * Specifies which event to cancel. + */ 'cancel'?: BillingMeterResourceBillingMeterEventAdjustmentCancelModel | undefined; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_adjustment'; + /** + * The meter event adjustment's status. + */ 'status': 'complete' | 'pending'; + /** + * Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + */ 'type': 'cancel'; }; +/** + * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much + * usage was accrued by a customer for that period. + * + * Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. + */ export type BillingMeterEventSummaryModel = { + /** + * Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + */ 'aggregated_value': number; + /** + * End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + */ 'end_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The meter associated with this event summary. + */ 'meter': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_summary'; + /** + * Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + */ 'start_time': number; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel = { + /** + * The subscription that generated this invoice item + */ 'subscription': string; + /** + * The subscription item that generated this invoice item + */ 'subscription_item'?: string | undefined; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemParentModel = { + /** + * Details about the subscription that generated this invoice item + */ 'subscription_details'?: BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel | undefined; + /** + * The type of parent that generated this invoice item + */ 'type': 'subscription_details'; }; export type PortalBusinessProfileModel = { + /** + * The messaging shown to customers in the portal. + */ 'headline'?: string | undefined; + /** + * A link to the business’s publicly available privacy policy. + */ 'privacy_policy_url'?: string | undefined; + /** + * A link to the business’s publicly available terms of service. + */ 'terms_of_service_url'?: string | undefined; }; export type PortalCustomerUpdateModel = { + /** + * The types of customer updates that are supported. When empty, customers are not updateable. + */ 'allowed_updates': Array<'address' | 'email' | 'name' | 'phone' | 'shipping' | 'tax_id'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalInvoiceListModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalPaymentMethodUpdateModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The [Payment Method Configuration](/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set, the default payment method configuration is used. + */ 'payment_method_configuration'?: string | undefined; }; export type PortalSubscriptionCancellationReasonModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Which cancellation reasons will be given as options to the customer. + */ 'options': Array<'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused'>; }; export type PortalSubscriptionCancelModel = { 'cancellation_reason': PortalSubscriptionCancellationReasonModel; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Whether to cancel subscriptions immediately or at the end of the billing period. + */ 'mode': 'at_period_end' | 'immediately'; + /** + * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; }; export type PortalSubscriptionUpdateProductAdjustableQuantityModel = { + /** + * If true, the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity that can be set for the product. + */ 'maximum'?: number | undefined; + /** + * The minimum quantity that can be set for the product. + */ 'minimum': number; }; export type PortalSubscriptionUpdateProductModel = { 'adjustable_quantity': PortalSubscriptionUpdateProductAdjustableQuantityModel; + /** + * The list of price IDs which, when subscribed to, a subscription can be updated. + */ 'prices': string[]; + /** + * The product ID. + */ 'product': string; }; export type PortalResourceScheduleUpdateAtPeriodEndConditionModel = { + /** + * The type of condition. + */ 'type': 'decreasing_item_amount' | 'shortening_interval'; }; export type PortalResourceScheduleUpdateAtPeriodEndModel = { + /** + * List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + */ 'conditions': PortalResourceScheduleUpdateAtPeriodEndConditionModel[]; }; export type PortalSubscriptionUpdateModel = { + /** + * The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. + */ 'default_allowed_updates': Array<'price' | 'promotion_code' | 'quantity'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The list of up to 10 products that support subscription updates. + */ 'products'?: PortalSubscriptionUpdateProductModel[] | undefined; + /** + * Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; 'schedule_at_period_end': PortalResourceScheduleUpdateAtPeriodEndModel; + /** + * Determines how handle updates to trialing subscriptions. Valid values are `end_trial` and `continue_trial`. Defaults to a value of `end_trial` if you don't set it during creation. + */ 'trial_update_behavior': 'continue_trial' | 'end_trial'; }; @@ -6586,309 +16765,802 @@ export type PortalFeaturesModel = { }; export type PortalLoginPageModel = { + /** + * If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ 'enabled': boolean; + /** + * A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. + */ 'url'?: string | undefined; }; +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export type BillingPortalConfigurationModel = { + /** + * Whether the configuration is active and can be used to create portal sessions. + */ 'active': boolean; + /** + * ID of the Connect Application that created the configuration. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; 'business_profile': PortalBusinessProfileModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + */ 'default_return_url'?: string | undefined; 'features': PortalFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'login_page': PortalLoginPageModel; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The name of the configuration. + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.configuration'; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; export type PortalFlowsAfterCompletionHostedConfirmationModel = { + /** + * A custom message to display to the customer after the flow is completed. + */ 'custom_message'?: string | undefined; }; export type PortalFlowsAfterCompletionRedirectModel = { + /** + * The URL the customer will be redirected to after the flow is completed. + */ 'return_url': string; }; export type PortalFlowsFlowAfterCompletionModel = { + /** + * Configuration when `after_completion.type=hosted_confirmation`. + */ 'hosted_confirmation'?: PortalFlowsAfterCompletionHostedConfirmationModel | undefined; + /** + * Configuration when `after_completion.type=redirect`. + */ 'redirect'?: PortalFlowsAfterCompletionRedirectModel | undefined; + /** + * The specified type of behavior after the flow is completed. + */ 'type': 'hosted_confirmation' | 'portal_homepage' | 'redirect'; }; export type PortalFlowsCouponOfferModel = { + /** + * The ID of the coupon to be offered. + */ 'coupon': string; }; export type PortalFlowsRetentionModel = { + /** + * Configuration when `retention.type=coupon_offer`. + */ 'coupon_offer'?: PortalFlowsCouponOfferModel | undefined; + /** + * Type of retention strategy that will be used. + */ 'type': 'coupon_offer'; }; export type PortalFlowsFlowSubscriptionCancelModel = { + /** + * Specify a retention strategy to be used in the cancellation flow. + */ 'retention'?: PortalFlowsRetentionModel | undefined; + /** + * The ID of the subscription to be canceled. + */ 'subscription': string; }; export type PortalFlowsFlowSubscriptionUpdateModel = { + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsSubscriptionUpdateConfirmDiscountModel = { + /** + * The ID of the coupon to apply to this subscription update. + */ 'coupon'?: string | undefined; + /** + * The ID of a promotion code to apply to this subscription update. + */ 'promotion_code'?: string | undefined; }; export type PortalFlowsSubscriptionUpdateConfirmItemModel = { + /** + * The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + */ 'id'?: string | undefined; + /** + * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + */ 'price'?: string | undefined; + /** + * [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + */ 'quantity'?: number | undefined; }; export type PortalFlowsFlowSubscriptionUpdateConfirmModel = { + /** + * The coupon or promotion code to apply to this subscription update. + */ 'discounts'?: PortalFlowsSubscriptionUpdateConfirmDiscountModel[] | undefined; + /** + * The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + */ 'items': PortalFlowsSubscriptionUpdateConfirmItemModel[]; + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsFlowModel = { 'after_completion': PortalFlowsFlowAfterCompletionModel; + /** + * Configuration when `flow.type=subscription_cancel`. + */ 'subscription_cancel'?: PortalFlowsFlowSubscriptionCancelModel | undefined; + /** + * Configuration when `flow.type=subscription_update`. + */ 'subscription_update'?: PortalFlowsFlowSubscriptionUpdateModel | undefined; + /** + * Configuration when `flow.type=subscription_update_confirm`. + */ 'subscription_update_confirm'?: PortalFlowsFlowSubscriptionUpdateConfirmModel | undefined; + /** + * Type of flow that the customer will go through. + */ 'type': 'payment_method_update' | 'subscription_cancel' | 'subscription_update' | 'subscription_update_confirm'; }; +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export type BillingPortalSessionModel = { + /** + * The configuration used by this session, describing the features available. + */ 'configuration': string | BillingPortalConfigurationModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the customer for this session. + */ 'customer': string; + /** + * Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + */ 'flow'?: PortalFlowsFlowModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + */ 'locale'?: 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-SG' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW' | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.session'; + /** + * The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + */ 'on_behalf_of'?: string | undefined; + /** + * The URL to redirect customers to when they click on the portal's link to return to your website. + */ 'return_url'?: string | undefined; + /** + * The short-lived URL of the session that gives customers access to the customer portal. + */ 'url': string; }; +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export type CapabilityModel = { + /** + * The account for which the capability enables functionality. + */ 'account': string | AccountModel; 'future_requirements'?: AccountCapabilityFutureRequirementsModel | undefined; + /** + * The identifier for the capability. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'capability'; + /** + * Whether the capability has been requested. + */ 'requested': boolean; + /** + * Time at which the capability was requested. Measured in seconds since the Unix epoch. + */ 'requested_at'?: number | undefined; 'requirements'?: AccountCapabilityRequirementsModel | undefined; + /** + * The status of the capability. + */ 'status': 'active' | 'inactive' | 'pending' | 'unrequested'; }; export type PaymentPagesCheckoutSessionAdaptivePricingModel = { + /** + * If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionAfterExpirationRecoveryModel = { + /** + * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + */ 'allow_promotion_codes': boolean; + /** + * If `true`, a recovery url will be generated to recover this Checkout Session if it + * expires before a transaction is completed. It will be attached to the + * Checkout Session object upon expiration. + */ 'enabled': boolean; + /** + * The timestamp at which the recovery URL will expire. + */ 'expires_at'?: number | undefined; + /** + * URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionAfterExpirationModel = { + /** + * When set, configuration used to recover the Checkout Session on expiry. + */ 'recovery'?: PaymentPagesCheckoutSessionAfterExpirationRecoveryModel | undefined; }; export type PaymentPagesCheckoutSessionAutomaticTaxModel = { + /** + * Indicates whether automatic tax is enabled for the session + */ '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'?: ConnectAccountReferenceModel | undefined; + /** + * The tax provider powering automatic tax. + */ 'provider'?: string | undefined; + /** + * The status of the most recent automated tax calculation for this session. + */ 'status'?: 'complete' | 'failed' | 'requires_location_inputs' | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsIconModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the icon. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsLogoModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the logo. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsModel = { + /** + * A hex color value starting with `#` representing the background color for the Checkout Session. + */ 'background_color': string; + /** + * The border style for the Checkout Session. Must be one of `rounded`, `rectangular`, or `pill`. + */ 'border_style': 'pill' | 'rectangular' | 'rounded'; + /** + * A hex color value starting with `#` representing the button color for the Checkout Session. + */ 'button_color': string; + /** + * The display name shown on the Checkout Session. + */ 'display_name': string; + /** + * The font family for the Checkout Session. Must be one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). + */ 'font_family': string; + /** + * The icon for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'icon'?: PaymentPagesCheckoutSessionBrandingSettingsIconModel | undefined; + /** + * The logo for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'logo'?: PaymentPagesCheckoutSessionBrandingSettingsLogoModel | undefined; }; export type PaymentPagesCheckoutSessionCheckoutAddressDetailsModel = { 'address': AddressModel; + /** + * Customer name. + */ 'name': string; }; export type PaymentPagesCheckoutSessionCollectedInformationModel = { + /** + * Customer’s business name for this Checkout Session + */ 'business_name'?: string | undefined; + /** + * Customer’s individual name for this Checkout Session + */ 'individual_name'?: string | undefined; + /** + * Shipping information for this Checkout Session. + */ 'shipping_details'?: PaymentPagesCheckoutSessionCheckoutAddressDetailsModel | undefined; }; export type PaymentPagesCheckoutSessionConsentModel = { + /** + * If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + */ 'promotions'?: 'opt_in' | 'opt_out' | undefined; + /** + * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + */ 'terms_of_service'?: 'accepted' | undefined; }; export type PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentPagesCheckoutSessionConsentCollectionModel = { + /** + * If set to `hidden`, it will hide legal text related to the reuse of a payment method. + */ 'payment_method_reuse_agreement'?: PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel | undefined; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + * Session will determine whether to display an option to opt into promotional communication + * from the merchant depending on the customer's locale. Only available to US merchants. + */ 'promotions'?: 'auto' | 'none' | undefined; + /** + * If set to `required`, it requires customers to accept the terms of service before being able to pay. + */ 'terms_of_service'?: 'none' | 'required' | undefined; }; export type PaymentPagesCheckoutSessionCurrencyConversionModel = { + /** + * Total of all items in source currency before discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total of all items in source currency after discounts and taxes are applied. + */ 'amount_total': number; + /** + * Exchange rate used to convert source currency amounts to customer currency amounts + */ 'fx_rate': string; + /** + * Creation currency of the CheckoutSession before localization + */ 'source_currency': string; }; export type PaymentPagesCheckoutSessionCustomFieldsOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value'?: string | undefined; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentPagesCheckoutSessionCustomFieldsOptionModel[]; + /** + * The option selected by the customer. This will be the `value` for the option. + */ 'value'?: string | undefined; }; export type PaymentPagesCheckoutSessionCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom'?: string | undefined; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentPagesCheckoutSessionCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value'?: string | undefined; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length'?: number | undefined; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length'?: number | undefined; + /** + * The value entered by the customer, containing only digits. + */ 'value'?: string | undefined; }; export type PaymentPagesCheckoutSessionCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value'?: string | undefined; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length'?: number | undefined; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length'?: number | undefined; + /** + * The value entered by the customer. + */ 'value'?: string | undefined; }; export type PaymentPagesCheckoutSessionCustomFieldsModel = { 'dropdown'?: PaymentPagesCheckoutSessionCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentPagesCheckoutSessionCustomFieldsLabelModel; 'numeric'?: PaymentPagesCheckoutSessionCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentPagesCheckoutSessionCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentPagesCheckoutSessionCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentPagesCheckoutSessionCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit'?: PaymentPagesCheckoutSessionCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address'?: PaymentPagesCheckoutSessionCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit'?: PaymentPagesCheckoutSessionCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance'?: PaymentPagesCheckoutSessionCustomTextPositionModel | undefined; }; export type PaymentPagesCheckoutSessionTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value'?: string | undefined; }; export type PaymentPagesCheckoutSessionCustomerDetailsModel = { + /** + * The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'address'?: AddressModel | undefined; + /** + * The customer's business name after a completed Checkout Session. + */ 'business_name'?: string | undefined; + /** + * The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + */ 'email'?: string | undefined; + /** + * The customer's individual name after a completed Checkout Session. + */ 'individual_name'?: string | undefined; + /** + * The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'name'?: string | undefined; + /** + * The customer's phone number after a completed Checkout Session. + */ 'phone'?: string | undefined; + /** + * The customer’s tax exempt status after a completed Checkout Session. + */ 'tax_exempt'?: 'exempt' | 'none' | 'reverse' | undefined; + /** + * The customer’s tax IDs after a completed Checkout Session. + */ 'tax_ids'?: PaymentPagesCheckoutSessionTaxIdModel[] | undefined; }; export type PaymentPagesCheckoutSessionDiscountModel = { + /** + * Coupon attached to the Checkout Session. + */ 'coupon'?: string | CouponModel | undefined; + /** + * Promotion code attached to the Checkout Session. + */ 'promotion_code'?: string | PromotionCodeModel | undefined; }; export type InvoiceSettingCheckoutRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display'?: string | undefined; + /** + * ID of the invoice rendering template to be used for the generated invoice. + */ 'template'?: string | undefined; }; export type PaymentPagesCheckoutSessionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids'?: Array | undefined; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields'?: InvoiceSettingCustomFieldModel[] | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Footer displayed on the invoice. + */ 'footer'?: string | undefined; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer'?: ConnectAccountReferenceModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Options for invoice PDF rendering. + */ 'rendering_options'?: InvoiceSettingCheckoutRenderingOptionsModel | undefined; }; export type PaymentPagesCheckoutSessionInvoiceCreationModel = { + /** + * Indicates whether invoice creation is enabled for the Checkout Session. + */ 'enabled': boolean; 'invoice_data': PaymentPagesCheckoutSessionInvoiceSettingsModel; }; export type LineItemsDiscountAmountModel = { + /** + * The amount discounted. + */ 'amount': number; 'discount': DiscountModel; }; +/** + * A line item. + */ export type ItemModel = { + /** + * Total discount amount applied. If no discounts were applied, defaults to 0. + */ 'amount_discount': number; + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total after discounts and taxes. + */ 'amount_total': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + */ 'description'?: string | undefined; + /** + * The discounts applied to the line item. + */ 'discounts'?: LineItemsDiscountAmountModel[] | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'item'; + /** + * The price used to generate the line item. + */ 'price'?: PriceModel | undefined; + /** + * The quantity of products being purchased. + */ 'quantity'?: number | undefined; + /** + * The taxes applied to the line item. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentPagesCheckoutSessionIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; @@ -6898,8 +17570,17 @@ export type PaymentPagesCheckoutSessionNameCollectionModel = { }; export type PaymentPagesCheckoutSessionOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. + */ 'maximum'?: number | undefined; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum'?: number | undefined; }; @@ -6910,106 +17591,234 @@ export type PaymentPagesCheckoutSessionOptionalItemModel = { }; export type PaymentLinksResourceCompletionBehaviorConfirmationPageModel = { + /** + * The custom message that is displayed to the customer after the purchase is complete. + */ 'custom_message'?: string | undefined; }; export type PaymentLinksResourceCompletionBehaviorRedirectModel = { + /** + * The URL the customer will be redirected to after the purchase is complete. + */ 'url': string; }; export type PaymentLinksResourceAfterCompletionModel = { 'hosted_confirmation'?: PaymentLinksResourceCompletionBehaviorConfirmationPageModel | undefined; 'redirect'?: PaymentLinksResourceCompletionBehaviorRedirectModel | undefined; + /** + * The specified behavior after the purchase is complete. + */ 'type': 'hosted_confirmation' | 'redirect'; }; export type PaymentLinksResourceAutomaticTaxModel = { + /** + * 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'?: ConnectAccountReferenceModel | undefined; }; export type PaymentLinksResourcePaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentLinksResourceConsentCollectionModel = { + /** + * Settings related to the payment method reuse text shown in the Checkout UI. + */ 'payment_method_reuse_agreement'?: PaymentLinksResourcePaymentMethodReuseAgreementModel | undefined; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. + */ 'promotions'?: 'auto' | 'none' | undefined; + /** + * If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + */ 'terms_of_service'?: 'none' | 'required' | undefined; }; export type PaymentLinksResourceCustomFieldsDropdownOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentLinksResourceCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value'?: string | undefined; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentLinksResourceCustomFieldsDropdownOptionModel[]; }; export type PaymentLinksResourceCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom'?: string | undefined; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentLinksResourceCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value'?: string | undefined; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length'?: number | undefined; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length'?: number | undefined; }; export type PaymentLinksResourceCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value'?: string | undefined; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length'?: number | undefined; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length'?: number | undefined; }; export type PaymentLinksResourceCustomFieldsModel = { 'dropdown'?: PaymentLinksResourceCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentLinksResourceCustomFieldsLabelModel; 'numeric'?: PaymentLinksResourceCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentLinksResourceCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentLinksResourceCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentLinksResourceCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit'?: PaymentLinksResourceCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address'?: PaymentLinksResourceCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit'?: PaymentLinksResourceCustomTextPositionModel | undefined; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance'?: PaymentLinksResourceCustomTextPositionModel | undefined; }; export type PaymentLinksResourceInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids'?: Array | undefined; + /** + * A list of up to 4 custom fields to be displayed on the invoice. + */ 'custom_fields'?: InvoiceSettingCustomFieldModel[] | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Footer to be displayed on the invoice. + */ 'footer'?: string | undefined; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer'?: ConnectAccountReferenceModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Options for invoice PDF rendering. + */ 'rendering_options'?: InvoiceSettingCheckoutRenderingOptionsModel | undefined; }; export type PaymentLinksResourceInvoiceCreationModel = { + /** + * Enable creating an invoice on successful payment. + */ 'enabled': boolean; + /** + * Configuration for the invoice. Default invoice values will be used if unspecified. + */ 'invoice_data'?: PaymentLinksResourceInvoiceSettingsModel | undefined; }; export type PaymentLinksResourceBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentLinksResourceIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; @@ -7019,8 +17828,17 @@ export type PaymentLinksResourceNameCollectionModel = { }; export type PaymentLinksResourceOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. + */ 'maximum'?: number | undefined; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum'?: number | undefined; }; @@ -7031,23 +17849,53 @@ export type PaymentLinksResourceOptionalItemModel = { }; export type PaymentLinksResourcePaymentIntentDataModel = { + /** + * Indicates when the funds will be captured from the customer's account. + */ 'capture_method'?: 'automatic' | 'automatic_async' | 'manual' | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + */ 'metadata': { [key: string]: string; }; + /** + * Indicates that you intend to make future payments with the payment method collected during checkout. + */ 'setup_future_usage'?: 'off_session' | 'on_session' | undefined; + /** + * For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. + */ 'statement_descriptor'?: string | undefined; + /** + * For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. + */ 'statement_descriptor_suffix'?: string | undefined; + /** + * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'transfer_group'?: string | undefined; }; export type PaymentLinksResourcePhoneNumberCollectionModel = { + /** + * If `true`, a phone number will be collected during checkout. + */ 'enabled': boolean; }; export type PaymentLinksResourceCompletedSessionsModel = { + /** + * The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. + */ 'count': number; + /** + * The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + */ 'limit': number; }; @@ -7056,11 +17904,20 @@ export type PaymentLinksResourceRestrictionsModel = { }; export type PaymentLinksResourceShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentLinksResourceShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The ID of the Shipping Rate to use for this shipping option. + */ 'shipping_rate': string | ShippingRateModel; }; @@ -7069,304 +17926,907 @@ export type PaymentLinksResourceSubscriptionDataInvoiceSettingsModel = { }; export type PaymentLinksResourceSubscriptionDataModel = { + /** + * 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 | undefined; 'invoice_settings': PaymentLinksResourceSubscriptionDataInvoiceSettingsModel; + /** + * 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. + */ 'metadata': { [key: string]: string; }; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days'?: number | undefined; + /** + * Settings related to subscription trials. + */ 'trial_settings'?: SubscriptionsTrialsResourceTrialSettingsModel | undefined; }; export type PaymentLinksResourceTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session. + */ 'enabled': boolean; 'required': 'if_supported' | 'never'; }; export type PaymentLinksResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount'?: number | undefined; + /** + * The connected account receiving the transfer. + */ 'destination': string | AccountModel; }; +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export type PaymentLinkModel = { + /** + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + */ 'active': boolean; 'after_completion': PaymentLinksResourceAfterCompletionModel; + /** + * Whether user redeemable promotion codes are enabled. + */ 'allow_promotion_codes': boolean; + /** + * The ID of the Connect application that created the Payment Link. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + */ 'application_fee_amount'?: number | undefined; + /** + * This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent'?: number | undefined; 'automatic_tax': PaymentLinksResourceAutomaticTaxModel; + /** + * Configuration for collecting the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection': 'auto' | 'required'; + /** + * When set, provides configuration to gather active consent from customers. + */ 'consent_collection'?: PaymentLinksResourceConsentCollectionModel | undefined; + /** + * 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; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentLinksResourceCustomFieldsModel[]; 'custom_text': PaymentLinksResourceCustomTextModel; + /** + * Configuration for Customer creation during checkout. + */ 'customer_creation': 'always' | 'if_required'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The custom message to be displayed to a customer when a payment link is no longer active. + */ 'inactive_message'?: string | undefined; + /** + * Configuration for creating invoice for payment mode payment links. + */ 'invoice_creation'?: PaymentLinksResourceInvoiceCreationModel | undefined; + /** + * The line items representing what is being sold. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; 'name_collection'?: PaymentLinksResourceNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_link'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentLinksResourceOptionalItemModel[] | undefined; + /** + * Indicates the parameters to be passed to PaymentIntent creation during checkout. + */ 'payment_intent_data'?: PaymentLinksResourcePaymentIntentDataModel | undefined; + /** + * Configuration for collecting a payment method during checkout. Defaults to `always`. + */ 'payment_method_collection': 'always' | 'if_required'; + /** + * The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + */ 'payment_method_types'?: Array<'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' | 'konbini' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'oxxo' | 'p24' | 'pay_by_bank' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'> | undefined; 'phone_number_collection': PaymentLinksResourcePhoneNumberCollectionModel; + /** + * Settings that restrict the usage of a payment link. + */ 'restrictions'?: PaymentLinksResourceRestrictionsModel | undefined; + /** + * Configuration for collecting the customer's shipping address. + */ 'shipping_address_collection'?: PaymentLinksResourceShippingAddressCollectionModel | undefined; + /** + * The shipping rate options applied to the session. + */ 'shipping_options': PaymentLinksResourceShippingOptionModel[]; + /** + * Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + */ 'submit_type': 'auto' | 'book' | 'donate' | 'pay' | 'subscribe'; + /** + * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ 'subscription_data'?: PaymentLinksResourceSubscriptionDataModel | undefined; 'tax_id_collection': PaymentLinksResourceTaxIdCollectionModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ 'transfer_data'?: PaymentLinksResourceTransferDataModel | undefined; + /** + * The public URL that can be shared with customers. + */ 'url': string; }; export type CheckoutAcssDebitMandateOptionsModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description'?: string | undefined; + /** + * Payment schedule for the mandate. + */ 'payment_schedule'?: 'combined' | 'interval' | 'sporadic' | undefined; + /** + * Transaction type of the mandate. + */ 'transaction_type'?: 'business' | 'personal' | undefined; }; export type CheckoutAcssDebitPaymentMethodOptionsModel = { + /** + * Currency supported by the bank account. Returned when the Session is in `setup` mode. + */ 'currency'?: 'cad' | 'usd' | undefined; 'mandate_options'?: CheckoutAcssDebitMandateOptionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type CheckoutAffirmPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAfterpayClearpayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlipayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlmaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutAmazonPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutAuBecsDebitPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutBacsDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutBancontactPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutBilliePaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutBoletoPaymentMethodOptionsModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutCardInstallmentsOptionsModel = { + /** + * Indicates if installments are enabled + */ 'enabled'?: boolean | undefined; }; export type PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel = { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + */ 'brands_blocked'?: Array<'american_express' | 'discover_global_network' | 'mastercard' | 'visa'> | undefined; }; export type CheckoutCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; 'installments'?: CheckoutCardInstallmentsOptionsModel | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; 'restrictions'?: PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; }; export type CheckoutCashappPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type'?: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer' | undefined; }; export type CheckoutCustomerBalancePaymentMethodOptionsModel = { 'bank_transfer'?: CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type'?: 'bank_transfer' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutEpsPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutFpxPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGiropayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGrabPayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutIdealPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutKlarnaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutKonbiniPaymentMethodOptionsModel = { + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days'?: number | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKrCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutLinkPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutMobilepayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutMultibancoPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutOxxoPaymentMethodOptionsModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutP24PaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaynowPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaypalPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutPixPaymentMethodOptionsModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds after which Pix payment will expire. + */ 'expires_after_seconds'?: number | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutRevolutPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutSatispayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutSepaDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutSofortPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutSwishPaymentMethodOptionsModel = { + /** + * The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + */ 'reference'?: string | undefined; }; export type CheckoutTwintPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutUsBankAccountPaymentMethodOptionsModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | undefined; }; @@ -7415,54 +18875,122 @@ export type CheckoutSessionPaymentMethodOptionsModel = { }; export type PaymentPagesCheckoutSessionPermissionsModel = { + /** + * Determines which entity is allowed to update the shipping details. + * + * Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + * + * When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + */ 'update_shipping_details'?: 'client_only' | 'server_only' | undefined; }; export type PaymentPagesCheckoutSessionPhoneNumberCollectionModel = { + /** + * Indicates whether phone number collection is enabled for the session + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel = { + /** + * Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + */ 'allow_redisplay_filters'?: Array<'always' | 'limited' | 'unspecified'> | undefined; + /** + * Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + */ 'payment_method_remove'?: 'disabled' | 'enabled' | undefined; + /** + * Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + */ 'payment_method_save'?: 'disabled' | 'enabled' | undefined; }; export type PaymentPagesCheckoutSessionShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentPagesCheckoutSessionShippingCostModel = { + /** + * Total shipping cost before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this order. + */ 'shipping_rate'?: string | ShippingRateModel | undefined; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The shipping rate. + */ 'shipping_rate': string | ShippingRateModel; }; export type PaymentPagesCheckoutSessionTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session + */ 'enabled': boolean; + /** + * Indicates whether a tax ID is required on the payment page + */ 'required': 'if_supported' | 'never'; }; export type PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type PaymentPagesCheckoutSessionTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping'?: number | undefined; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel | undefined; }; export type CheckoutLinkWalletOptionsModel = { + /** + * Describes whether Checkout should display Link. Defaults to `auto`. + */ 'display'?: 'auto' | 'never' | undefined; }; @@ -7470,190 +18998,619 @@ export type CheckoutSessionWalletOptionsModel = { 'link'?: CheckoutLinkWalletOptionsModel | undefined; }; +/** + * A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + * new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and redirect to its URL + * to begin Checkout. + * + * Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) + */ export type CheckoutSessionModel = { + /** + * Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + */ 'adaptive_pricing'?: PaymentPagesCheckoutSessionAdaptivePricingModel | undefined; + /** + * When set, provides configuration for actions to take if this Checkout Session expires. + */ 'after_expiration'?: PaymentPagesCheckoutSessionAfterExpirationModel | undefined; + /** + * Enables user redeemable promotion codes. + */ 'allow_promotion_codes'?: boolean | undefined; + /** + * Total of all items before discounts or taxes are applied. + */ 'amount_subtotal'?: number | undefined; + /** + * Total of all items after discounts and taxes are applied. + */ 'amount_total'?: number | undefined; 'automatic_tax': PaymentPagesCheckoutSessionAutomaticTaxModel; + /** + * Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection'?: 'auto' | 'required' | undefined; 'branding_settings'?: PaymentPagesCheckoutSessionBrandingSettingsModel | undefined; + /** + * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + */ 'cancel_url'?: string | undefined; + /** + * A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * Session with your internal systems. + */ 'client_reference_id'?: string | undefined; + /** + * The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout. + * For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + */ 'client_secret'?: string | undefined; + /** + * Information about the customer collected within the Checkout Session. + */ 'collected_information'?: PaymentPagesCheckoutSessionCollectedInformationModel | undefined; + /** + * Results of `consent_collection` for this session. + */ 'consent'?: PaymentPagesCheckoutSessionConsentModel | undefined; + /** + * When set, provides configuration for the Checkout Session to gather active consent from customers. + */ 'consent_collection'?: PaymentPagesCheckoutSessionConsentCollectionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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 | undefined; + /** + * Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. + */ 'currency_conversion'?: PaymentPagesCheckoutSessionCurrencyConversionModel | undefined; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentPagesCheckoutSessionCustomFieldsModel[]; 'custom_text': PaymentPagesCheckoutSessionCustomTextModel; + /** + * The ID of the customer for this Session. + * For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + * will create a new customer object based on information provided + * during the payment flow unless an existing customer was provided when + * the Session was created. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + */ 'customer_creation'?: 'always' | 'if_required' | undefined; + /** + * The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + */ 'customer_details'?: PaymentPagesCheckoutSessionCustomerDetailsModel | undefined; + /** + * If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once the payment flow is + * complete, use the `customer` attribute. + */ 'customer_email'?: string | undefined; + /** + * List of coupons and promotion codes attached to the Checkout Session. + */ 'discounts'?: PaymentPagesCheckoutSessionDiscountModel[] | undefined; + /** + * A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + */ 'excluded_payment_method_types'?: string[] | undefined; + /** + * The timestamp at which the Checkout Session will expire. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice created by the Checkout Session, if it exists. + */ 'invoice'?: string | InvoiceModel | undefined; + /** + * Details on the state of invoice creation for the Checkout Session. + */ 'invoice_creation'?: PaymentPagesCheckoutSessionInvoiceCreationModel | undefined; + /** + * The line items purchased by the customer. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + */ 'locale'?: 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-GB' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW' | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The mode of the Checkout Session. + */ 'mode': 'payment' | 'setup' | 'subscription'; 'name_collection'?: PaymentPagesCheckoutSessionNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'checkout.session'; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentPagesCheckoutSessionOptionalItemModel[] | undefined; + /** + * Where the user is coming from. This informs the optimizations that are applied to the session. + */ 'origin_context'?: 'mobile_app' | 'web' | undefined; + /** + * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The ID of the Payment Link that created this Session. + */ 'payment_link'?: string | PaymentLinkModel | undefined; + /** + * Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + */ 'payment_method_collection'?: 'always' | 'if_required' | undefined; + /** + * Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + */ 'payment_method_configuration_details'?: PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel | undefined; + /** + * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + */ 'payment_method_options'?: CheckoutSessionPaymentMethodOptionsModel | undefined; + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ 'payment_method_types': string[]; + /** + * The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + * You can use this value to decide when to fulfill your customer's order. + */ 'payment_status': 'no_payment_required' | 'paid' | 'unpaid'; + /** + * This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + * + * For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. + */ 'permissions'?: PaymentPagesCheckoutSessionPermissionsModel | undefined; 'phone_number_collection'?: PaymentPagesCheckoutSessionPhoneNumberCollectionModel | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * The ID of the original expired Checkout Session that triggered the recovery flow. + */ 'recovered_from'?: string | undefined; + /** + * This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + */ 'redirect_on_completion'?: 'always' | 'if_required' | 'never' | undefined; + /** + * Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + */ 'return_url'?: string | undefined; + /** + * Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + */ 'saved_payment_method_options'?: PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel | undefined; + /** + * The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'setup_intent'?: string | SetupIntentModel | undefined; + /** + * When set, provides configuration for Checkout to collect a shipping address from a customer. + */ 'shipping_address_collection'?: PaymentPagesCheckoutSessionShippingAddressCollectionModel | undefined; + /** + * The details of the customer cost of shipping, including the customer chosen ShippingRate. + */ 'shipping_cost'?: PaymentPagesCheckoutSessionShippingCostModel | undefined; + /** + * The shipping rate options applied to this Session. + */ 'shipping_options': PaymentPagesCheckoutSessionShippingOptionModel[]; + /** + * The status of the Checkout Session, one of `open`, `complete`, or `expired`. + */ 'status'?: 'complete' | 'expired' | 'open' | undefined; + /** + * Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + */ 'submit_type'?: 'auto' | 'book' | 'donate' | 'pay' | 'subscribe' | undefined; + /** + * The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode. + */ 'subscription'?: string | SubscriptionModel | undefined; + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ 'success_url'?: string | undefined; 'tax_id_collection'?: PaymentPagesCheckoutSessionTaxIdCollectionModel | undefined; + /** + * Tax and discount details for the computed total amount. + */ 'total_details'?: PaymentPagesCheckoutSessionTotalDetailsModel | undefined; + /** + * The UI mode of the Session. Defaults to `hosted`. + */ 'ui_mode'?: 'custom' | 'embedded' | 'hosted' | undefined; + /** + * The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ 'url'?: string | undefined; + /** + * Wallet-specific configuration for this Checkout Session. + */ 'wallet_options'?: CheckoutSessionWalletOptionsModel | undefined; }; export type ClimateRemovalsBeneficiaryModel = { + /** + * Publicly displayable name for the end beneficiary of carbon removal. + */ 'public_name': string; }; export type ClimateRemovalsLocationModel = { + /** + * The city where the supplier is located. + */ 'city'?: string | undefined; + /** + * Two-letter ISO code representing the country where the supplier is located. + */ 'country': string; + /** + * The geographic latitude where the supplier is located. + */ 'latitude'?: number | undefined; + /** + * The geographic longitude where the supplier is located. + */ 'longitude'?: number | undefined; + /** + * The state/county/province/region where the supplier is located. + */ 'region'?: string | undefined; }; +/** + * A supplier of carbon removal. + */ export type ClimateSupplierModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Link to a webpage to learn more about the supplier. + */ 'info_url': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The locations in which this supplier operates. + */ 'locations': ClimateRemovalsLocationModel[]; + /** + * Name of this carbon removal supplier. + */ 'name': string; + /** + * String representing the object’s type. Objects of the same type share the same value. + */ 'object': 'climate.supplier'; + /** + * The scientific pathway used for carbon removal. + */ 'removal_pathway': 'biomass_carbon_removal_and_storage' | 'direct_air_capture' | 'enhanced_weathering'; }; +/** + * The delivery of a specified quantity of carbon for an order. + */ export type ClimateRemovalsOrderDeliveriesModel = { + /** + * Time at which the delivery occurred. Measured in seconds since the Unix epoch. + */ 'delivered_at': number; + /** + * Specific location of this delivery. + */ 'location'?: ClimateRemovalsLocationModel | undefined; + /** + * Quantity of carbon removal supplied by this delivery. + */ 'metric_tons': string; + /** + * Once retired, a URL to the registry entry for the tons from this delivery. + */ 'registry_url'?: string | undefined; 'supplier': ClimateSupplierModel; }; export type ClimateRemovalsProductsPriceModel = { + /** + * Fees for one metric ton of carbon removal in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + */ 'amount_total': number; }; +/** + * A Climate product represents a type of carbon removal unit available for reservation. + * You can retrieve it to see the current price and availability. + */ export type ClimateProductModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Current prices for a metric ton of carbon removal in a currency's smallest unit. + */ 'current_prices_per_metric_ton': { [key: string]: ClimateRemovalsProductsPriceModel; }; + /** + * The year in which the carbon removal is expected to be delivered. + */ 'delivery_year'?: number | undefined; + /** + * Unique identifier for the object. For convenience, Climate product IDs are human-readable strings + * that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + * for a list of available carbon removal products. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The quantity of metric tons available for reservation. + */ 'metric_tons_available': string; + /** + * The Climate product's name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.product'; + /** + * The carbon removal suppliers that fulfill orders for this Climate product. + */ 'suppliers': ClimateSupplierModel[]; }; +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export type ClimateOrderModel = { + /** + * Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Total amount of the carbon removal in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total amount of the order including fees in the currency's smallest unit. + */ 'amount_total': number; 'beneficiary'?: ClimateRemovalsBeneficiaryModel | undefined; + /** + * Time at which the order was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at'?: number | undefined; + /** + * Reason for the cancellation of this order. + */ 'cancellation_reason'?: 'expired' | 'product_unavailable' | 'requested' | undefined; + /** + * For delivered orders, a URL to a delivery certificate for the order. + */ 'certificate'?: string | undefined; + /** + * Time at which the order was confirmed. Measured in seconds since the Unix epoch. + */ 'confirmed_at'?: number | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + */ 'currency': string; + /** + * Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. + */ 'delayed_at'?: number | undefined; + /** + * Time at which the order was delivered. Measured in seconds since the Unix epoch. + */ 'delivered_at'?: number | undefined; + /** + * Details about the delivery of carbon removal for this order. + */ 'delivery_details': ClimateRemovalsOrderDeliveriesModel[]; + /** + * The year this order is expected to be delivered. + */ 'expected_delivery_year': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * Quantity of carbon removal that is included in this order. + */ 'metric_tons': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.order'; + /** + * Unique ID for the Climate `Product` this order is purchasing. + */ 'product': string | ClimateProductModel; + /** + * Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + */ 'product_substituted_at'?: number | undefined; + /** + * The current status of this order. + */ 'status': 'awaiting_funds' | 'canceled' | 'confirmed' | 'delivered' | 'open'; }; +/** + * This hash contains details about the online acceptance. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel = { + /** + * The IP address from which the Mandate was accepted by the customer. + */ 'ip_address'?: string | undefined; + /** + * The user agent of the browser from which the Mandate was accepted by the customer. + */ 'user_agent'?: string | undefined; }; +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel = { + /** + * If this is a Mandate accepted online, this hash contains details about the online acceptance. + */ 'online'?: ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel | undefined; + /** + * The type of customer acceptance information included with the Mandate. + */ 'type': string; }; +/** + * Data used for generating a Mandate. + */ export type ConfirmationTokensResourceMandateDataModel = { 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel; }; +/** + * Installment configuration for payments. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel = { 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; +/** + * This hash contains the card payment method options. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel = { + /** + * The `cvc_update` Token collected from the Payment Element. + */ 'cvc_token'?: string | undefined; 'installments'?: ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel | undefined; }; +/** + * Payment-method-specific configuration + */ export type ConfirmationTokensResourcePaymentMethodOptionsModel = { + /** + * This hash contains the card payment method options. + */ 'card'?: ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel | undefined; }; +/** + * Details of the PaymentMethod collected by Payment Element + */ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -7668,6 +19625,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; 'crypto'?: PaymentMethodCryptoModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer'?: string | CustomerModel | undefined; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; 'eps'?: PaymentMethodEpsModel | undefined; @@ -7701,6 +19661,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'sofort'?: PaymentMethodSofortModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -7709,29 +19672,94 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { export type ConfirmationTokensResourceShippingModel = { 'address': AddressModel; + /** + * Recipient name. + */ 'name': string; + /** + * Recipient phone (including extension). + */ 'phone'?: string | undefined; }; +/** + * ConfirmationTokens help transport client side data collected by Stripe JS over + * to your server for confirming a PaymentIntent or SetupIntent. If the confirmation + * is successful, values present on the ConfirmationToken are written onto the Intent. + * + * To learn more about how to use ConfirmationToken, visit the related guides: + * - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) + * - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). + */ export type ConfirmationTokenModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Data used for generating a Mandate. + */ 'mandate_data'?: ConfirmationTokensResourceMandateDataModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'confirmation_token'; + /** + * ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'payment_intent'?: string | undefined; + /** + * Payment-method-specific configuration for this ConfirmationToken. + */ 'payment_method_options'?: ConfirmationTokensResourcePaymentMethodOptionsModel | undefined; + /** + * Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + */ 'payment_method_preview'?: ConfirmationTokensResourcePaymentMethodPreviewModel | undefined; + /** + * Return URL used to confirm the Intent. + */ 'return_url'?: string | undefined; + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ 'setup_future_usage'?: 'off_session' | 'on_session' | undefined; + /** + * ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'setup_intent'?: string | undefined; + /** + * Shipping information collected on this ConfirmationToken. + */ 'shipping'?: ConfirmationTokensResourceShippingModel | undefined; + /** + * Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + */ 'use_stripe_sdk': boolean; }; export type CountrySpecVerificationFieldDetailsModel = { + /** + * Additional fields which are only required for some users. + */ 'additional': string[]; + /** + * Fields which every account must eventually provide. + */ 'minimum': string[]; }; @@ -7740,163 +19768,546 @@ export type CountrySpecVerificationFieldsModel = { 'individual': CountrySpecVerificationFieldDetailsModel; }; +/** + * Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. + * + * You can also view the information from this API call as [an online + * guide](/docs/connect/required-verification-information). + */ export type CountrySpecModel = { + /** + * The default currency for this country. This applies to both payment methods and bank accounts. + */ 'default_currency': string; + /** + * Unique identifier for the object. Represented as the ISO country code for this country. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'country_spec'; + /** + * Currencies that can be accepted in the specific country (for transfers). + */ 'supported_bank_account_currencies': { [key: string]: string[]; }; + /** + * Currencies that can be accepted in the specified country (for payments). + */ 'supported_payment_currencies': string[]; + /** + * Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + */ 'supported_payment_methods': string[]; + /** + * Countries that can accept transfers from the specified country. + */ 'supported_transfer_countries': string[]; 'verification_fields': CountrySpecVerificationFieldsModel; }; +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export type CustomerBalanceTransactionModel = { + /** + * The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + */ 'amount': number; + /** + * The ID of the checkout session (if any) that created the transaction. + */ 'checkout_session'?: string | CheckoutSessionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the credit note (if any) related to the transaction. + */ 'credit_note'?: string | CreditNoteModel | undefined; + /** + * 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; + /** + * The ID of the customer the transaction belongs to. + */ 'customer': string | CustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + */ 'ending_balance': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice (if any) related to the transaction. + */ 'invoice'?: string | InvoiceModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_balance_transaction'; + /** + * Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + */ 'type': 'adjustment' | 'applied_to_invoice' | 'checkout_session_subscription_payment' | 'checkout_session_subscription_payment_canceled' | 'credit_note' | 'initial' | 'invoice_overpaid' | 'invoice_too_large' | 'invoice_too_small' | 'migration' | 'unapplied_from_invoice' | 'unspent_receiver_credit'; }; export type CreditNotesPretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount'; }; +/** + * The credit note line item object + */ export type CreditNoteLineItemModel = { + /** + * The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + */ 'amount': number; + /** + * Description of the item being credited. + */ 'description'?: string | undefined; + /** + * The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + */ 'discount_amount': number; + /** + * The amount of discount calculated per discount for this line item + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice line item being credited + */ 'invoice_line_item'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note_line_item'; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * The number of units of product being credited. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to the line item. + */ 'tax_rates': TaxRateModel[]; + /** + * The tax information of the line item. + */ 'taxes'?: BillingBillResourceInvoicingTaxesTaxModel[] | undefined; + /** + * The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + */ 'type': 'custom_line_item' | 'invoice_line_item'; + /** + * The cost of each unit of product being credited. + */ 'unit_amount'?: number | undefined; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal'?: string | undefined; }; export type CreditNotesPaymentRecordRefundModel = { + /** + * ID of the payment record. + */ 'payment_record': string; + /** + * ID of the refund group. + */ 'refund_group': string; }; export type CreditNoteRefundModel = { + /** + * Amount of the refund that applies to this credit note, in cents (or local equivalent). + */ 'amount_refunded': number; + /** + * The PaymentRecord refund details associated with this credit note refund. + */ 'payment_record_refund'?: CreditNotesPaymentRecordRefundModel | undefined; + /** + * ID of the refund. + */ 'refund': string | RefundModel; + /** + * Type of the refund, one of `refund` or `payment_record_refund`. + */ 'type'?: 'payment_record_refund' | 'refund' | undefined; }; +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export type CreditNoteModel = { + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + */ 'amount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Customer balance transaction related to this credit note. + */ 'customer_balance_transaction'?: string | CustomerBalanceTransactionModel | undefined; + /** + * The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + */ 'discount_amount': number; + /** + * The aggregate amounts calculated per discount for all line items. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + */ 'effective_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice. + */ 'invoice': string | InvoiceModel; + /** + * Line items that make up the credit note + */ 'lines': { + /** + * Details about each object. + */ 'data': CreditNoteLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Customer-facing text that appears on the credit note PDF. + */ 'memo'?: string | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note'; + /** + * Amount that was credited outside of Stripe. + */ 'out_of_band_amount'?: number | undefined; + /** + * The link to download the PDF of the credit note. + */ 'pdf': string; + /** + * The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. + */ 'post_payment_amount': number; + /** + * The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. + */ 'pre_payment_amount': number; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + */ 'reason'?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' | undefined; + /** + * Refunds related to this credit note. + */ 'refunds': CreditNoteRefundModel[]; + /** + * The details of the cost of shipping, including the ShippingRate applied to the invoice. + */ 'shipping_cost'?: InvoicesResourceShippingCostModel | undefined; + /** + * Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + */ 'status': 'issued' | 'void'; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + */ 'subtotal_excluding_tax'?: number | undefined; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + */ 'total': number; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + */ 'total_excluding_tax'?: number | undefined; + /** + * The aggregate tax information for all line items. + */ 'total_taxes'?: BillingBillResourceInvoicingTaxesTaxModel[] | undefined; + /** + * Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + */ 'type': 'mixed' | 'post_payment' | 'pre_payment'; + /** + * The time that the credit note was voided. + */ 'voided_at'?: number | undefined; }; +/** + * This hash contains whether the buy button is enabled. + */ export type CustomerSessionResourceComponentsResourceBuyButtonModel = { + /** + * Whether the buy button is enabled. + */ 'enabled': boolean; }; +/** + * This hash contains the features the customer sheet supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters'?: Array<'always' | 'limited' | 'unspecified'> | undefined; + /** + * Controls whether the customer sheet displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove'?: 'disabled' | 'enabled' | undefined; }; +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetModel = { + /** + * Whether the customer sheet is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the customer sheet supports certain features. + */ 'features'?: CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel | undefined; }; +/** + * This hash contains the features the mobile payment element supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters'?: Array<'always' | 'limited' | 'unspecified'> | undefined; + /** + * Controls whether or not the mobile payment element shows saved payment methods. + */ 'payment_method_redisplay'?: 'disabled' | 'enabled' | undefined; + /** + * Controls whether the mobile payment element displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove'?: 'disabled' | 'enabled' | undefined; + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new payment method. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save'?: 'disabled' | 'enabled' | undefined; + /** + * Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". + * + * If not specified, defaults to `nil` (no override value). + */ 'payment_method_save_allow_redisplay_override'?: 'always' | 'limited' | 'unspecified' | undefined; }; +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementModel = { + /** + * Whether the mobile payment element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the mobile payment element supports certain features. + */ 'features'?: CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel | undefined; }; +/** + * This hash contains the features the Payment Element supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + */ 'payment_method_redisplay': 'disabled' | 'enabled'; + /** + * Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. + */ 'payment_method_redisplay_limit'?: number | undefined; + /** + * Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save': 'disabled' | 'enabled'; + /** + * When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + * + * When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + */ 'payment_method_save_usage'?: 'off_session' | 'on_session' | undefined; }; +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementModel = { + /** + * Whether the Payment Element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the Payment Element supports certain features. + */ 'features'?: CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel | undefined; }; +/** + * This hash contains whether the pricing table is enabled. + */ export type CustomerSessionResourceComponentsResourcePricingTableModel = { + /** + * Whether the pricing table is enabled. + */ 'enabled': boolean; }; +/** + * Configuration for the components supported by this Customer Session. + */ export type CustomerSessionResourceComponentsModel = { 'buy_button': CustomerSessionResourceComponentsResourceBuyButtonModel; 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheetModel; @@ -7905,170 +20316,498 @@ export type CustomerSessionResourceComponentsModel = { 'pricing_table': CustomerSessionResourceComponentsResourcePricingTableModel; }; +/** + * A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access + * control over a Customer. + * + * Related guides: [Customer Session with the Payment Element](/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), + * [Customer Session with the Pricing Table](/payments/checkout/pricing-table#customer-session), + * [Customer Session with the Buy Button](/payment-links/buy-button#pass-an-existing-customer). + */ export type CustomerSessionModel = { + /** + * The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. + * + * The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret': string; 'components'?: CustomerSessionResourceComponentsModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The Customer the Customer Session was created for. + */ 'customer': string | CustomerModel; + /** + * The timestamp at which this Customer Session will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_session'; }; export type DeletedAccountModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; }; export type DeletedApplePayDomainModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; export type DeletedCouponModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; }; export type DeletedExternalAccountModel = DeletedBankAccountModel | DeletedCardModel; export type DeletedInvoiceitemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; }; export type DeletedPaymentSourceModel = DeletedBankAccountModel | DeletedCardModel; export type DeletedPersonModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; }; export type DeletedPlanModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; }; export type DeletedProductFeatureModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; export type DeletedRadarValueListModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type DeletedRadarValueListItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; }; export type DeletedSubscriptionItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; }; export type DeletedTerminalConfigurationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; }; export type DeletedTerminalLocationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; }; export type DeletedTerminalReaderModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; }; export type DeletedTestHelpersTestClockModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; }; export type DeletedWebhookEndpointModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; }; +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type EntitlementsFeatureModel = { + /** + * Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + */ 'active': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ 'metadata': { [key: string]: string; }; + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.feature'; }; +/** + * An active entitlement describes access to a feature for a customer. + */ export type EntitlementsActiveEntitlementModel = { + /** + * The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + */ 'feature': string | EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.active_entitlement'; }; export type EphemeralKeyModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which the key will expire. Measured in seconds since the Unix epoch. + */ 'expires': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'ephemeral_key'; + /** + * The key's secret. You can use this value to make authorized requests to the Stripe API. + */ 'secret'?: string | undefined; }; +/** + * An error response from the Stripe API + */ export type ErrorModel = { 'error': ApiErrorsModel; }; export type NotificationEventDataModel = { + /** + * Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. + */ 'object': {}; + /** + * Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. + */ 'previous_attributes'?: {} | undefined; }; export type NotificationEventRequestModel = { + /** + * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + */ 'id'?: string | undefined; + /** + * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + */ 'idempotency_key'?: string | undefined; }; +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export type EventModel = { + /** + * The connected account that originates the event. + */ 'account'?: string | undefined; + /** + * The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. + */ 'api_version'?: string | undefined; + /** + * Authentication context needed to fetch the event or related object. + */ 'context'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'data': NotificationEventDataModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'event'; + /** + * Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + */ 'pending_webhooks': number; + /** + * Information on the API request that triggers the event. + */ 'request'?: NotificationEventRequestModel | undefined; + /** + * Description of the event (for example, `invoice.created` or `charge.refunded`). + */ 'type': string; }; +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export type ExchangeRateModel = { + /** + * Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'exchange_rate'; + /** + * Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + */ 'rates': { [key: string]: number; }; @@ -8076,252 +20815,809 @@ export type ExchangeRateModel = { export type ExternalAccountModel = BankAccountModel | CardModel; +/** + * Describes an owner of an account. + */ export type FinancialConnectionsAccountOwnerModel = { + /** + * The email address of the owner. + */ 'email'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The full name of the owner. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_owner'; + /** + * The ownership object that this owner belongs to. + */ 'ownership': string; + /** + * The raw phone number of the owner. + */ 'phone'?: string | undefined; + /** + * The raw physical address of the owner. + */ 'raw_address'?: string | undefined; + /** + * The timestamp of the refresh that updated this owner. + */ 'refreshed_at'?: number | undefined; }; +/** + * Describes a snapshot of the owners of an account at a particular point in time. + */ export type FinancialConnectionsAccountOwnershipModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_ownership'; + /** + * A paginated list of owners for this account. + */ 'owners': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountOwnerModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; +/** + * A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ export type FinancialConnectionsAccountModel = { + /** + * The account holder that this account belongs to. + */ 'account_holder'?: BankConnectionsResourceAccountholderModel | undefined; + /** + * Details about the account numbers. + */ 'account_numbers'?: BankConnectionsResourceAccountNumberDetailsModel[] | undefined; + /** + * The most recent information about the account's balance. + */ 'balance'?: BankConnectionsResourceBalanceModel | undefined; + /** + * The state of the most recent attempt to refresh the account balance. + */ 'balance_refresh'?: BankConnectionsResourceBalanceRefreshModel | undefined; + /** + * The type of the account. Account category is further divided in `subcategory`. + */ 'category': 'cash' | 'credit' | 'investment' | 'other'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * A human-readable name that has been assigned to this account, either by the account holder or by the institution. + */ 'display_name'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the institution that holds this account. + */ 'institution_name': string; + /** + * The last 4 digits of the account number. If present, this will be 4 numeric characters. + */ 'last4'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account'; + /** + * The most recent information about the account's owners. + */ 'ownership'?: string | FinancialConnectionsAccountOwnershipModel | undefined; + /** + * The state of the most recent attempt to refresh the account owners. + */ 'ownership_refresh'?: BankConnectionsResourceOwnershipRefreshModel | undefined; + /** + * The list of permissions granted by this account. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * The status of the link to the account. + */ 'status': 'active' | 'disconnected' | 'inactive'; + /** + * If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + */ 'subcategory': 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings'; + /** + * The list of data refresh subscriptions requested on this account. + */ 'subscriptions'?: 'transactions'[] | undefined; + /** + * The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + */ 'supported_payment_method_types': Array<'link' | 'us_bank_account'>; + /** + * The state of the most recent attempt to refresh the account transactions. + */ 'transaction_refresh'?: BankConnectionsResourceTransactionRefreshModel | undefined; }; +/** + * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ export type FinancialConnectionsSessionModel = { + /** + * The account holder for whom accounts are collected in this session. + */ 'account_holder'?: BankConnectionsResourceAccountholderModel | undefined; + /** + * The accounts that were collected as part of this Session. + */ 'accounts': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * A value that will be passed to the client to launch the authentication flow. + */ 'client_secret'?: string | undefined; 'filters'?: BankConnectionsResourceLinkAccountSessionFiltersModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.session'; + /** + * Permissions requested for accounts collected during this session. + */ 'permissions': Array<'balances' | 'ownership' | 'payment_method' | 'transactions'>; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch'?: Array<'balances' | 'ownership' | 'transactions'> | undefined; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; }; +/** + * A Transaction represents a real transaction that affects a Financial Connections Account balance. + */ export type FinancialConnectionsTransactionModel = { + /** + * The ID of the Financial Connections Account this transaction belongs to. + */ 'account': string; + /** + * The amount of this transaction, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * The description of this transaction. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.transaction'; + /** + * The status of the transaction. + */ 'status': 'pending' | 'posted' | 'void'; 'status_transitions': BankConnectionsResourceTransactionResourceStatusTransitionsModel; + /** + * Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + */ 'transacted_at': number; + /** + * The token of the transaction refresh that last updated or created this transaction. + */ 'transaction_refresh': string; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; export type FinancialReportingFinanceReportRunRunParametersModel = { + /** + * The set of output columns requested for inclusion in the report run. + */ 'columns'?: string[] | undefined; + /** + * Connected account ID by which to filter the report run. + */ 'connected_account'?: string | undefined; + /** + * Currency of objects to be included in the report run. + */ 'currency'?: string | undefined; + /** + * Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. + */ 'interval_end'?: number | undefined; + /** + * Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. + */ 'interval_start'?: number | undefined; + /** + * Payout ID by which to filter the report run. + */ 'payout'?: string | undefined; + /** + * Category of balance transactions to be included in the report run. + */ 'reporting_category'?: string | undefined; + /** + * Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + */ 'timezone'?: string | undefined; }; +/** + * Metadata about the forwarded request. + */ export type ForwardedRequestContextModel = { + /** + * The time it took in milliseconds for the destination endpoint to respond. + */ 'destination_duration': number; + /** + * The IP address of the destination. + */ 'destination_ip_address': string; }; +/** + * Header data. + */ export type ForwardedRequestHeaderModel = { + /** + * The header name. + */ 'name': string; + /** + * The header value. + */ 'value': string; }; +/** + * Details about the request forwarded to the destination endpoint. + */ export type ForwardedRequestDetailsModel = { + /** + * The body payload to send to the destination endpoint. + */ 'body': string; + /** + * The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP method used to call the destination endpoint. + */ 'http_method': 'POST'; }; +/** + * Details about the response from the destination endpoint. + */ export type ForwardedResponseDetailsModel = { + /** + * The response body from the destination endpoint to Stripe. + */ 'body': string; + /** + * HTTP headers that the destination endpoint returned. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP status code that the destination endpoint returned. + */ 'status': number; }; +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export type ForwardingRequestModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'forwarding.request'; + /** + * The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + */ 'payment_method': string; + /** + * The field kinds to be replaced in the forwarded request. + */ 'replacements': Array<'card_cvc' | 'card_expiry' | 'card_number' | 'cardholder_name' | 'request_signature'>; + /** + * Context about the request from Stripe's servers to the destination endpoint. + */ 'request_context'?: ForwardedRequestContextModel | undefined; + /** + * The request that was sent to the destination endpoint. We redact any sensitive fields. + */ 'request_details'?: ForwardedRequestDetailsModel | undefined; + /** + * The response that the destination endpoint returned to us. We redact any sensitive fields. + */ 'response_details'?: ForwardedResponseDetailsModel | undefined; + /** + * The destination URL for the forwarded request. Must be supported by the config. + */ 'url'?: string | undefined; }; export type FundingInstructionsBankTransferModel = { + /** + * The country of the bank account to fund + */ 'country': string; + /** + * A list of financial addresses that can be used to fund a particular balance + */ 'financial_addresses': FundingInstructionsBankTransferFinancialAddressModel[]; + /** + * The bank_transfer type + */ 'type': 'eu_bank_transfer' | 'jp_bank_transfer'; }; +/** + * Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) + */ export type FundingInstructionsModel = { 'bank_transfer': FundingInstructionsBankTransferModel; + /** + * 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; + /** + * The `funding_type` of the returned instructions + */ 'funding_type': 'bank_transfer'; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'funding_instructions'; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportDateOfBirthModel = { + /** + * Numerical day between 1 and 31. + */ 'day'?: number | undefined; + /** + * Numerical month between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year. + */ 'year'?: number | undefined; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportExpirationDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day'?: number | undefined; + /** + * Numerical month between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year. + */ 'year'?: number | undefined; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportIssuedDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day'?: number | undefined; + /** + * Numerical month between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year. + */ 'year'?: number | undefined; }; +/** + * Point in Time + */ export type GelatoDataIdNumberReportDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day'?: number | undefined; + /** + * Numerical month between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year. + */ 'year'?: number | undefined; }; +/** + * Point in Time + */ export type GelatoDataVerifiedOutputsDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day'?: number | undefined; + /** + * Numerical month between 1 and 12. + */ 'month'?: number | undefined; + /** + * The four-digit year. + */ 'year'?: number | undefined; }; export type GelatoDocumentReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code'?: 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | undefined; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason'?: string | undefined; }; +/** + * Result from a document check + */ export type GelatoDocumentReportModel = { + /** + * Address as it appears in the document. + */ 'address'?: AddressModel | undefined; + /** + * Date of birth as it appears in the document. + */ 'dob'?: GelatoDataDocumentReportDateOfBirthModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error'?: GelatoDocumentReportErrorModel | undefined; + /** + * Expiration date of the document. + */ 'expiration_date'?: GelatoDataDocumentReportExpirationDateModel | undefined; + /** + * Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. + */ 'files'?: string[] | undefined; + /** + * First name as it appears in the document. + */ 'first_name'?: string | undefined; + /** + * Issued date of the document. + */ 'issued_date'?: GelatoDataDocumentReportIssuedDateModel | undefined; + /** + * Issuing country of the document. + */ 'issuing_country'?: string | undefined; + /** + * Last name as it appears in the document. + */ 'last_name'?: string | undefined; + /** + * Document ID number. + */ 'number'?: string | undefined; + /** + * Sex of the person in the document. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * Status of this `document` check. + */ 'status': 'unverified' | 'verified'; + /** + * Type of the document. + */ 'type'?: 'driving_license' | 'id_card' | 'passport' | undefined; + /** + * Place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * Sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; export type GelatoEmailReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code'?: 'email_unverified_other' | 'email_verification_declined' | undefined; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason'?: string | undefined; }; +/** + * Result from a email check + */ export type GelatoEmailReportModel = { + /** + * Email to be verified. + */ 'email'?: string | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error'?: GelatoEmailReportErrorModel | undefined; + /** + * Status of this `email` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoIdNumberReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code'?: 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | undefined; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason'?: string | undefined; }; +/** + * Result from an id_number check + */ export type GelatoIdNumberReportModel = { + /** + * Date of birth. + */ 'dob'?: GelatoDataIdNumberReportDateModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error'?: GelatoIdNumberReportErrorModel | undefined; + /** + * First name. + */ 'first_name'?: string | undefined; + /** + * ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. + */ 'id_number'?: string | undefined; + /** + * Type of ID number. + */ 'id_number_type'?: 'br_cpf' | 'sg_nric' | 'us_ssn' | undefined; + /** + * Last name. + */ 'last_name'?: string | undefined; + /** + * Status of this `id_number` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoPhoneReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code'?: 'phone_unverified_other' | 'phone_verification_declined' | undefined; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason'?: string | undefined; }; +/** + * Result from a phone check + */ export type GelatoPhoneReportModel = { + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error'?: GelatoPhoneReportErrorModel | undefined; + /** + * Phone to be verified. + */ 'phone'?: string | undefined; + /** + * Status of this `phone` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoProvidedDetailsModel = { + /** + * Email of user being verified + */ 'email'?: string | undefined; + /** + * Phone number of user being verified + */ 'phone'?: string | undefined; }; export type GelatoRelatedPersonModel = { + /** + * Token referencing the associated Account of the related Person resource. + */ 'account': string; + /** + * Token referencing the related Person resource. + */ 'person': string; }; export type GelatoReportDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; @@ -8330,25 +21626,61 @@ export type GelatoReportIdNumberOptionsModel = { }; export type GelatoSelfieReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code'?: 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | undefined; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason'?: string | undefined; }; +/** + * Result from a selfie check + */ export type GelatoSelfieReportModel = { + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. + */ 'document'?: string | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error'?: GelatoSelfieReportErrorModel | undefined; + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. + */ 'selfie'?: string | undefined; + /** + * Status of this `selfie` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoSessionDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; export type GelatoSessionEmailOptionsModel = { + /** + * Request one time password verification of `provided_details.email`. + */ 'require_verification'?: boolean | undefined; }; @@ -8356,17 +21688,35 @@ export type GelatoSessionIdNumberOptionsModel = { }; +/** + * Shows last VerificationSession error + */ export type GelatoSessionLastErrorModel = { + /** + * A short machine-readable string giving the reason for the verification or user-session failure. + */ 'code'?: 'abandoned' | 'consent_declined' | 'country_not_supported' | 'device_not_supported' | 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | 'email_unverified_other' | 'email_verification_declined' | 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | 'phone_unverified_other' | 'phone_verification_declined' | 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | 'under_supported_age' | undefined; + /** + * A message that explains the reason for verification or user-session failure. + */ 'reason'?: string | undefined; }; export type GelatoSessionMatchingOptionsModel = { + /** + * Strictness of the DOB matching policy to apply. + */ 'dob'?: 'none' | 'similar' | undefined; + /** + * Strictness of the name matching policy to apply. + */ 'name'?: 'none' | 'similar' | undefined; }; export type GelatoSessionPhoneOptionsModel = { + /** + * Request one time password verification of `provided_details.phone`. + */ 'require_verification'?: boolean | undefined; }; @@ -8384,209 +21734,622 @@ export type GelatoVerificationSessionOptionsModel = { }; export type GelatoVerifiedOutputsModel = { + /** + * The user's verified address. + */ 'address'?: AddressModel | undefined; + /** + * The user’s verified date of birth. + */ 'dob'?: GelatoDataVerifiedOutputsDateModel | undefined; + /** + * The user's verified email address + */ 'email'?: string | undefined; + /** + * The user's verified first name. + */ 'first_name'?: string | undefined; + /** + * The user's verified id number. + */ 'id_number'?: string | undefined; + /** + * The user's verified id number type. + */ 'id_number_type'?: 'br_cpf' | 'sg_nric' | 'us_ssn' | undefined; + /** + * The user's verified last name. + */ 'last_name'?: string | undefined; + /** + * The user's verified phone number + */ 'phone'?: string | undefined; + /** + * The user's verified sex. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * The user's verified place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * The user's verified sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export type IdentityVerificationReportModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'document'?: GelatoDocumentReportModel | undefined; 'email'?: GelatoEmailReportModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'id_number'?: GelatoIdNumberReportModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_report'; 'options'?: GelatoVerificationReportOptionsModel | undefined; 'phone'?: GelatoPhoneReportModel | undefined; 'selfie'?: GelatoSelfieReportModel | undefined; + /** + * Type of report. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * ID of the VerificationSession that created this report. + */ 'verification_session'?: string | undefined; }; export type VerificationSessionRedactionModel = { + /** + * Indicates whether this object and its related objects have been redacted or not. + */ 'status': 'processing' | 'redacted'; }; +/** + * A VerificationSession guides you through the process of collecting and verifying the identities + * of your users. It contains details about the type of verification, such as what [verification + * check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for + * each verification in your system. + * + * A VerificationSession transitions through [multiple + * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through + * the verification flow. The VerificationSession contains the user's verified data after + * verification checks are complete. + * + * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) + */ export type IdentityVerificationSessionModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id'?: string | undefined; + /** + * The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + */ 'client_secret'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * If present, this property tells you the last error encountered when processing the verification. + */ 'last_error'?: GelatoSessionLastErrorModel | undefined; + /** + * ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + */ 'last_verification_report'?: string | IdentityVerificationReportModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_session'; + /** + * A set of options for the session’s verification checks. + */ 'options'?: GelatoVerificationSessionOptionsModel | undefined; + /** + * Details provided about the user being verified. These details may be shown to the user. + */ 'provided_details'?: GelatoProvidedDetailsModel | undefined; + /** + * Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + */ 'redaction'?: VerificationSessionRedactionModel | undefined; + /** + * Customer ID + */ 'related_customer'?: string | undefined; 'related_person'?: GelatoRelatedPersonModel | undefined; + /** + * Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + */ 'status': 'canceled' | 'processing' | 'requires_input' | 'verified'; + /** + * The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + */ 'url'?: string | undefined; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * The user’s verified data. + */ 'verified_outputs'?: GelatoVerifiedOutputsModel | undefined; }; export type TreasurySharedResourceBillingDetailsModel = { 'address': AddressModel; + /** + * Email address. + */ 'email'?: string | undefined; + /** + * Full name. + */ 'name'?: string | undefined; }; export type InboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach'; + /** + * Routing number of the bank account. + */ 'routing_number'?: string | undefined; }; export type InboundTransfersModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; + /** + * The type of the payment method used in the InboundTransfer. + */ 'type': 'us_bank_account'; 'us_bank_account'?: InboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export type InvoiceRenderingTemplateModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * A brief description of the template, hidden from customers + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_rendering_template'; + /** + * The status of the template, one of `active` or `archived`. + */ 'status': 'active' | 'archived'; + /** + * Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + */ 'version': number; }; export type InvoiceSettingQuoteSettingModel = { + /** + * 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 | undefined; 'issuer': ConnectAccountReferenceModel; }; export type ProrationDetailsModel = { + /** + * Discount amounts applied when the proration was created. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; }; +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export type InvoiceitemModel = { + /** + * Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + */ 'amount': number; + /** + * 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; + /** + * The ID of the customer who will be billed when this invoice item is billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'date': number; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * If true, discounts will apply to this invoice item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts'?: Array | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice this invoice item belongs to. + */ 'invoice'?: string | InvoiceModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The amount after discounts, but before credits and taxes. This field is `null` for `discountable=true` items. + */ 'net_amount'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; + /** + * The parent that generated this invoice item. + */ 'parent'?: BillingBillResourceInvoiceItemParentsInvoiceItemParentModel | undefined; 'period': InvoiceLineItemPeriodModel; + /** + * The pricing information of the invoice item. + */ 'pricing'?: BillingBillResourceInvoicingPricingPricingModel | undefined; + /** + * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + */ 'proration': boolean; 'proration_details'?: ProrationDetailsModel | undefined; + /** + * Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + */ 'quantity': number; + /** + * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + */ 'tax_rates'?: TaxRateModel[] | undefined; + /** + * ID of the test clock this invoice item belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; }; +/** + * When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + */ export type IssuingSettlementModel = { + /** + * The Bank Identification Number reflecting this settlement record. + */ 'bin': string; + /** + * The date that the transactions are cleared and posted to user's accounts. + */ 'clearing_date': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The total interchange received as reimbursement for the transactions. + */ 'interchange_fees_amount': 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': { [key: string]: string; }; + /** + * The total net amount required to settle with the network. + */ 'net_total_amount': number; + /** + * The card network for this settlement report. One of ["visa", "maestro"] + */ 'network': 'maestro' | 'visa'; + /** + * The total amount of fees owed to the network. + */ 'network_fees_amount': number; + /** + * The Settlement Identification Number assigned by the network. + */ 'network_settlement_identifier': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.settlement'; + /** + * One of `international` or `uk_national_net`. + */ 'settlement_service': string; + /** + * The current processing status of this settlement. + */ 'status': 'complete' | 'pending'; + /** + * The total transaction amount reflected in this settlement. + */ 'transaction_amount': number; + /** + * The total number of transactions reflected in this settlement. + */ 'transaction_count': number; }; +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export type LoginLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'login_link'; + /** + * The URL for the login link. + */ 'url': string; }; export type OutboundPaymentsPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundPaymentsPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number'?: string | undefined; }; export type OutboundPaymentsPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundPaymentsPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundPayment. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundPaymentsPaymentMethodDetailsUsBankAccountModel | undefined; }; export type OutboundTransfersPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type'?: 'company' | 'individual' | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type'?: 'checking' | 'savings' | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number'?: string | undefined; }; export type OutboundTransfersPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundTransfersPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundTransfer. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. + * Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment + * method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record + * can have guaranteed funds. + */ export type PaymentAttemptRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -8595,37 +22358,107 @@ export type PaymentAttemptRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentAttemptRecord. + */ 'application'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details'?: PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel | undefined; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence'?: 'off_session' | 'on_session' | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_attempt_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel | undefined; + /** + * ID of the Payment Record this Payment Attempt Record belongs to. + */ 'payment_record'?: string | undefined; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Indicates who reported the payment. + */ 'reported_by': 'self' | 'stripe'; + /** + * Shipping information for this payment. + */ 'shipping_details'?: PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel | undefined; }; export type PaymentMethodConfigResourceDisplayPreferenceModel = { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ 'overridable'?: boolean | undefined; + /** + * The account's display preference. + */ 'preference': 'none' | 'off' | 'on'; + /** + * The effective display preference value. + */ 'value': 'off' | 'on'; }; export type PaymentMethodConfigResourcePaymentMethodPropertiesModel = { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ 'available': boolean; 'display_preference': PaymentMethodConfigResourceDisplayPreferenceModel; }; +/** + * PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. + * + * There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): + * + * **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + * + * **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + * + * Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. + * + * Related guides: + * - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) + * - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + * - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) + */ export type PaymentMethodConfigurationModel = { 'acss_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Whether the configuration can be used for new payments. + */ 'active': boolean; 'affirm'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'afterpay_clearpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -8633,6 +22466,9 @@ export type PaymentMethodConfigurationModel = { 'alma'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'amazon_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'apple_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the Connect application associated with the configuration. + */ 'application'?: string | undefined; 'au_becs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'bacs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -8650,8 +22486,14 @@ export type PaymentMethodConfigurationModel = { 'giropay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'google_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'grabpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The default configuration is used whenever a payment method configuration is not specified. + */ 'is_default': boolean; 'jcb'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kakao_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -8659,16 +22501,28 @@ export type PaymentMethodConfigurationModel = { 'konbini'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kr_card'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'link'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'mobilepay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'multibanco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The configuration's name. + */ 'name': string; 'naver_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'nz_bank_account'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_configuration'; 'oxxo'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'p24'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the configuration's parent configuration. + */ 'parent'?: string | undefined; 'pay_by_bank'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'payco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -8688,26 +22542,62 @@ export type PaymentMethodConfigurationModel = { 'zip'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; }; +/** + * Contains additional details about the status of a payment method for a specific payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusDetailsModel = { + /** + * The error message associated with the status of the payment method on the domain. + */ 'error_message': string; }; +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusModel = { + /** + * The status of the payment method on the domain. + */ 'status': 'active' | 'inactive'; 'status_details'?: PaymentMethodDomainResourcePaymentMethodStatusDetailsModel | undefined; }; +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export type PaymentMethodDomainModel = { 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The domain name that this payment method domain object represents. + */ 'domain_name': string; + /** + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + */ 'enabled': boolean; 'google_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Unique identifier for the object. + */ 'id': string; 'klarna': PaymentMethodDomainResourcePaymentMethodStatusModel; 'link': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_domain'; 'paypal': PaymentMethodDomainResourcePaymentMethodStatusModel; }; @@ -8715,432 +22605,1273 @@ export type PaymentMethodDomainModel = { export type PaymentSourceModel = AccountModel | BankAccountModel | CardModel | SourceModel; export type PlanTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount'?: number | undefined; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal'?: string | undefined; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount'?: number | undefined; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal'?: string | undefined; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to'?: number | undefined; }; export type TransformUsageModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PlanModel = { + /** + * Whether the plan can be used for new purchases. + */ 'active': boolean; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'amount'?: number | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'amount_decimal'?: string | undefined; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': 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'?: { [key: string]: string; } | undefined; + /** + * The meter tracking the usage of a metered price + */ 'meter'?: string | undefined; + /** + * A brief description of the plan, hidden from customers. + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; + /** + * The product whose pricing this plan determines. + */ 'product'?: string | ProductModel | DeletedProductModel | undefined; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PlanTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode'?: 'graduated' | 'volume' | undefined; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_usage'?: TransformUsageModel | undefined; + /** + * Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + */ 'trial_period_days'?: number | undefined; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type ProductFeatureModel = { 'entitlement_feature': EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; export type QuotesResourceAutomaticTaxModel = { + /** + * Automatically calculate taxes + */ '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'?: ConnectAccountReferenceModel | undefined; + /** + * The tax provider powering automatic tax. + */ 'provider'?: string | undefined; + /** + * The status of the most recent automated tax calculation for this quote. + */ 'status'?: 'complete' | 'failed' | 'requires_location_inputs' | undefined; }; export type QuotesResourceTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type QuotesResourceTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping'?: number | undefined; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: QuotesResourceTotalDetailsResourceBreakdownModel | undefined; }; export type QuotesResourceRecurringModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceUpfrontModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceComputedModel = { + /** + * The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + */ 'recurring'?: QuotesResourceRecurringModel | undefined; 'upfront': QuotesResourceUpfrontModel; }; export type QuotesResourceFromQuoteModel = { + /** + * Whether this quote is a revision of a different quote. + */ 'is_revision': boolean; + /** + * The quote that was cloned. + */ 'quote': string | QuoteModel; }; export type QuotesResourceStatusTransitionsModel = { + /** + * The time that the quote was accepted. Measured in seconds since Unix epoch. + */ 'accepted_at'?: number | undefined; + /** + * The time that the quote was canceled. Measured in seconds since Unix epoch. + */ 'canceled_at'?: number | undefined; + /** + * The time that the quote was finalized. Measured in seconds since Unix epoch. + */ 'finalized_at'?: number | undefined; }; +/** + * The billing mode of the quote. + */ export type QuotesResourceSubscriptionDataBillingModeModel = { 'flexible'?: SubscriptionsResourceBillingModeFlexibleModel | undefined; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; }; export type QuotesResourceSubscriptionDataSubscriptionDataModel = { 'billing_mode': QuotesResourceSubscriptionDataBillingModeModel; + /** + * 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 | undefined; + /** + * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + */ 'effective_date'?: number | undefined; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ 'metadata'?: { [key: string]: string; } | undefined; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days'?: number | undefined; }; export type QuotesResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ 'amount'?: number | undefined; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + */ 'amount_percent'?: number | undefined; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export type QuoteModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * ID of the Connect Application that created the quote. + */ 'application'?: string | ApplicationModel | DeletedApplicationModel | undefined; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + */ 'application_fee_amount'?: number | undefined; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + */ 'application_fee_percent'?: number | undefined; 'automatic_tax': QuotesResourceAutomaticTaxModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; 'computed': QuotesResourceComputedModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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 | undefined; + /** + * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * The tax rates applied to this quote. + */ 'default_tax_rates'?: Array | undefined; + /** + * A description that will be displayed on the quote PDF. + */ 'description'?: string | undefined; + /** + * The discounts applied to this quote. + */ 'discounts': Array; + /** + * The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * A footer that will be displayed on the quote PDF. + */ 'footer'?: string | undefined; + /** + * Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + */ 'from_quote'?: QuotesResourceFromQuoteModel | undefined; + /** + * A header that will be displayed on the quote PDF. + */ 'header'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was created from this quote. + */ 'invoice'?: string | InvoiceModel | DeletedInvoiceModel | undefined; 'invoice_settings': InvoiceSettingQuoteSettingModel; + /** + * A list of items the customer is being quoted for. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; + /** + * A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + */ 'number'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of'?: string | AccountModel | undefined; + /** + * The status of the quote. + */ 'status': 'accepted' | 'canceled' | 'draft' | 'open'; 'status_transitions': QuotesResourceStatusTransitionsModel; + /** + * The subscription that was created or updated from this quote. + */ 'subscription'?: string | SubscriptionModel | undefined; 'subscription_data': QuotesResourceSubscriptionDataSubscriptionDataModel; + /** + * The subscription schedule that was created or updated from this quote. + */ 'subscription_schedule'?: string | SubscriptionScheduleModel | undefined; + /** + * ID of the test clock this quote belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; 'total_details': QuotesResourceTotalDetailsModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + */ 'transfer_data'?: QuotesResourceTransferDataModel | undefined; }; +/** + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + */ export type RadarEarlyFraudWarningModel = { + /** + * An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + */ 'actionable': boolean; + /** + * ID of the charge this early fraud warning is for, optionally expanded. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + */ 'fraud_type': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.early_fraud_warning'; + /** + * ID of the Payment Intent this early fraud warning is for, optionally expanded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; }; +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListItemModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who added this item to the value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; + /** + * The value of the item. + */ 'value': string; + /** + * The identifier of the value list this item belongs to. + */ 'value_list': string; }; +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListModel = { + /** + * The name of the value list for use in rules. + */ 'alias': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who created this value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. + */ 'item_type': 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'sepa_debit_fingerprint' | 'string' | 'us_bank_account_fingerprint'; + /** + * List of items contained within this value list. + */ 'list_items': { + /** + * Details about each object. + */ 'data': RadarValueListItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The name of the value list. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type ReceivedPaymentMethodDetailsFinancialAccountModel = { + /** + * The FinancialAccount ID. + */ 'id': string; + /** + * The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + */ 'network': 'stripe'; }; +/** + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ 'error'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * `true` if the report is run on live mode data and `false` if it is run on test mode data. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_run'; 'parameters': FinancialReportingFinanceReportRunRunParametersModel; + /** + * The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + */ 'report_type': string; + /** + * The file object representing the result of the report run (populated when + * `status=succeeded`). + */ 'result'?: FileModel | undefined; + /** + * Status of this report run. This will be `pending` when the run is initially created. + * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + */ 'status': string; + /** + * Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ 'succeeded_at'?: number | undefined; }; +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportTypeModel = { + /** + * Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_end': number; + /** + * Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_start': number; + /** + * List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + */ 'default_columns'?: string[] | undefined; + /** + * The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Human-readable name of the Report Type + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_type'; + /** + * When this Report Type was latest updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + */ 'version': number; }; export type SigmaScheduledQueryRunErrorModel = { + /** + * Information about the run failure. + */ 'message': string; }; +/** + * If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + * receive a `sigma.scheduled_query_run.created` webhook each time the query + * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + * retrieve the query results. + */ export type ScheduledQueryRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * When the query was run, Sigma contained a snapshot of your Stripe data at this time. + */ 'data_load_time': number; 'error'?: SigmaScheduledQueryRunErrorModel | undefined; + /** + * The file object representing the results of the query. + */ 'file'?: FileModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'scheduled_query_run'; + /** + * Time at which the result expires and is no longer available for download. + */ 'result_available_until': number; + /** + * SQL for the query. + */ 'sql': string; + /** + * The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + */ 'status': string; + /** + * Title of the query. + */ 'title': string; }; +/** + * A saved query object represents a query that can be executed for a run. + */ export type SigmaSigmaApiQueryModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The name of the query. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'sigma.sigma_api_query'; + /** + * The sql statement for the query. + */ 'sql': string; }; export type SourceMandateNotificationAcssDebitDataModel = { + /** + * The statement descriptor associate with the debit. + */ 'statement_descriptor'?: string | undefined; }; export type SourceMandateNotificationBacsDebitDataModel = { + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; }; export type SourceMandateNotificationSepaDebitDataModel = { + /** + * SEPA creditor ID. + */ 'creditor_identifier'?: string | undefined; + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; + /** + * Mandate reference associated with the debit. + */ 'mandate_reference'?: string | undefined; }; +/** + * Source mandate notifications should be created when a notification related to + * a source mandate must be sent to the payer. They will trigger a webhook or + * deliver an email to the customer. + */ export type SourceMandateNotificationModel = { 'acss_debit'?: SourceMandateNotificationAcssDebitDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + */ 'amount'?: number | undefined; 'bacs_debit'?: SourceMandateNotificationBacsDebitDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_mandate_notification'; + /** + * The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + */ 'reason': string; 'sepa_debit'?: SourceMandateNotificationSepaDebitDataModel | undefined; 'source': SourceModel; + /** + * The status of the mandate notification. Valid statuses are `pending` or `submitted`. + */ 'status': string; + /** + * The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + */ 'type': string; }; export type SourceTransactionAchCreditTransferDataModel = { + /** + * Customer data associated with the transfer. + */ 'customer_data'?: string | undefined; + /** + * Bank account fingerprint associated with the transfer. + */ 'fingerprint'?: string | undefined; + /** + * Last 4 digits of the account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Routing number associated with the transfer. + */ 'routing_number'?: string | undefined; }; export type SourceTransactionChfCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's country address. + */ 'sender_address_country'?: string | undefined; + /** + * Sender's line 1 address. + */ 'sender_address_line1'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; export type SourceTransactionGbpCreditTransferDataModel = { + /** + * Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. + */ 'fingerprint'?: string | undefined; + /** + * The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. + */ 'funding_method'?: string | undefined; + /** + * Last 4 digits of sender account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Sender entered arbitrary information about the transfer. + */ 'reference'?: string | undefined; + /** + * Sender account number associated with the transfer. + */ 'sender_account_number'?: string | undefined; + /** + * Sender name associated with the transfer. + */ 'sender_name'?: string | undefined; + /** + * Sender sort code associated with the transfer. + */ 'sender_sort_code'?: string | undefined; }; export type SourceTransactionPaperCheckDataModel = { + /** + * Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. + */ 'available_at'?: string | undefined; + /** + * Comma-separated list of invoice IDs associated with the paper check. + */ 'invoices'?: string | undefined; }; export type SourceTransactionSepaCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; +/** + * Some payment methods have no required amount that a customer must send. + * Customers can be instructed to send any amount, and it can be made up of + * multiple transactions. As such, sources can have multiple associated + * transactions. + */ export type SourceTransactionModel = { 'ach_credit_transfer'?: SourceTransactionAchCreditTransferDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + */ 'amount': number; 'chf_credit_transfer'?: SourceTransactionChfCreditTransferDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; 'gbp_credit_transfer'?: SourceTransactionGbpCreditTransferDataModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_transaction'; 'paper_check'?: SourceTransactionPaperCheckDataModel | undefined; 'sepa_credit_transfer'?: SourceTransactionSepaCreditTransferDataModel | undefined; + /** + * The ID of the source this transaction is attached to. + */ 'source': string; + /** + * The status of the transaction, one of `succeeded`, `pending`, or `failed`. + */ 'status': string; + /** + * The type of source this transaction is attached to. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'alipay' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel = { + /** + * The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + */ 'transaction': string; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel = { + /** + * Details on why we couldn't commit the tax transaction. + */ 'reason': 'another_payment_associated_with_calculation' | 'calculation_expired' | 'currency_mismatch' | 'original_transaction_voided' | 'unique_reference_violation'; }; export type TaxProductResourceTaxAssociationTransactionAttemptsModel = { 'committed'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel | undefined; 'errored'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel | undefined; + /** + * The source of the tax transaction attempt. This is either a refund or a payment intent. + */ 'source': string; + /** + * The status of the transaction attempt. This can be `errored` or `committed`. + */ 'status': string; }; +/** + * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input + */ export type TaxAssociationModel = { + /** + * The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + */ 'calculation': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.association'; + /** + * The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + */ 'payment_intent': string; + /** + * Information about the tax transactions linked to this payment intent + */ 'tax_transaction_attempts'?: TaxProductResourceTaxAssociationTransactionAttemptsModel[] | undefined; }; export type TaxProductResourcePostalAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1'?: string | undefined; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + */ 'state'?: string | undefined; }; export type TaxProductResourceCustomerDetailsResourceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type TaxProductResourceCustomerDetailsModel = { + /** + * The customer's postal address (for example, home or business location). + */ 'address'?: TaxProductResourcePostalAddressModel | undefined; + /** + * The type of customer address provided. + */ 'address_source'?: 'billing' | 'shipping' | undefined; + /** + * The customer's IP address (IPv4 or IPv6). + */ 'ip_address'?: string | undefined; + /** + * The customer's tax IDs (for example, EU VAT numbers). + */ 'tax_ids': TaxProductResourceCustomerDetailsResourceTaxIdModel[]; + /** + * The taxability override used for taxation. + */ 'taxability_override': 'customer_exempt' | 'none' | 'reverse_charge'; }; export type TaxProductResourceJurisdictionModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * A human-readable name for the jurisdiction imposing the tax. + */ 'display_name': string; + /** + * Indicates the level of the jurisdiction imposing the tax. + */ 'level': 'city' | 'country' | 'county' | 'district' | 'state'; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state'?: string | undefined; }; export type TaxProductResourceLineItemTaxRateDetailsModel = { + /** + * A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + */ 'display_name': string; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + */ 'percentage_decimal': string; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxProductResourceLineItemTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; 'jurisdiction': TaxProductResourceJurisdictionModel; + /** + * Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + */ 'sourcing': 'destination' | 'origin'; + /** + * Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + */ 'tax_rate_details'?: TaxProductResourceLineItemTaxRateDetailsModel | undefined; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; export type TaxCalculationLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product'?: string | undefined; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item. + */ 'reference': string; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to this line item. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; }; @@ -9149,115 +23880,270 @@ export type TaxProductResourceShipFromDetailsModel = { }; export type TaxProductResourceTaxCalculationShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to shipping cost. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; export type TaxProductResourceTaxRateDetailsModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount'?: TaxRateFlatAmountModel | undefined; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. + */ 'percentage_decimal': string; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type'?: 'flat_amount' | 'percentage' | undefined; + /** + * State, county, province, or region. + */ 'state'?: string | undefined; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type'?: 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat' | undefined; }; export type TaxProductResourceTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Specifies whether the tax amount is included in the line item amount. + */ 'inclusive': boolean; 'tax_rate_details': TaxProductResourceTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; +/** + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom) + */ export type TaxCalculationModel = { + /** + * Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_total': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer'?: string | undefined; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Timestamp of date at which the tax calculation will expire. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the calculation. + */ 'id'?: string | undefined; + /** + * The list of items the customer is purchasing. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxCalculationLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation'; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details'?: TaxProductResourceShipFromDetailsModel | undefined; + /** + * The shipping cost details for the calculation. + */ 'shipping_cost'?: TaxProductResourceTaxCalculationShippingCostModel | undefined; + /** + * The amount of tax to be collected on top of the line item prices. + */ 'tax_amount_exclusive': number; + /** + * The amount of tax already included in the line item prices. + */ 'tax_amount_inclusive': number; + /** + * Breakdown of individual tax amounts that add up to the total. + */ 'tax_breakdown': TaxProductResourceTaxBreakdownModel[]; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel = { + /** + * Place of supply scheme used in an Default standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultInboundGoodsModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel | undefined; + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultModel = { + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsSimplifiedModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsEuStandardModel = { + /** + * Place of supply scheme used in an EU standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'small_seller' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsEuropeModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsEuStandardModel | undefined; + /** + * Type of registration in an EU country. + */ 'type': 'ioss' | 'oss_non_union' | 'oss_union' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel = { + /** + * Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'province': string; }; export type TaxProductRegistrationsResourceCountryOptionsCanadaModel = { 'province_standard'?: TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel | undefined; + /** + * Type of registration in Canada. + */ 'type': 'province_standard' | 'simplified' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsThailandModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction'?: string | undefined; + /** + * The type of the election for the state sales tax registration. + */ 'type': 'local_use_tax' | 'simplified_sellers_use_tax' | 'single_local_use_tax'; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel = { + /** + * Elections for the state sales tax registration. + */ 'elections'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel[] | undefined; }; export type TaxProductRegistrationsResourceCountryOptionsUnitedStatesModel = { 'local_amusement_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel | undefined; 'local_lease_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel | undefined; + /** + * Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'state': string; 'state_sales_tax'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel | undefined; + /** + * Type of registration in the US. + */ 'type': 'local_amusement_tax' | 'local_lease_tax' | 'state_communications_tax' | 'state_retail_delivery_fee' | 'state_sales_tax'; }; @@ -9364,21 +24250,61 @@ export type TaxProductRegistrationsResourceCountryOptionsModel = { 'zw'?: TaxProductRegistrationsResourceCountryOptionsDefaultModel | undefined; }; +/** + * A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). + * + * Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering). + * + * Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api) + */ export type TaxRegistrationModel = { + /** + * Time at which the registration becomes active. Measured in seconds since the Unix epoch. + */ 'active_from': number; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; 'country_options': TaxProductRegistrationsResourceCountryOptionsModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + */ 'expires_at'?: number | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.registration'; + /** + * The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + */ 'status': 'active' | 'expired' | 'scheduled'; }; export type TaxProductResourceTaxSettingsDefaultsModel = { + /** + * The tax calculation provider this account uses. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; + /** + * Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. + */ 'tax_behavior'?: 'exclusive' | 'inclusive' | 'inferred_by_currency' | undefined; + /** + * Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. + */ 'tax_code'?: string | undefined; }; @@ -9391,6 +24317,9 @@ export type TaxProductResourceTaxSettingsStatusDetailsResourceActiveModel = { }; export type TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel = { + /** + * The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. + */ 'missing_fields'?: string[] | undefined; }; @@ -9399,91 +24328,251 @@ export type TaxProductResourceTaxSettingsStatusDetailsModel = { 'pending'?: TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel | undefined; }; +/** + * You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. + * + * Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) + */ export type TaxSettingsModel = { 'defaults': TaxProductResourceTaxSettingsDefaultsModel; + /** + * The place where your business is located. + */ 'head_office'?: TaxProductResourceTaxSettingsHeadOfficeModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.settings'; + /** + * The status of the Tax `Settings`. + */ 'status': 'active' | 'pending'; 'status_details': TaxProductResourceTaxSettingsStatusDetailsModel; }; export type TaxProductResourceTaxTransactionLineItemResourceReversalModel = { + /** + * The `id` of the line item to reverse in the original transaction. + */ 'original_line_item': string; }; export type TaxTransactionLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product'?: string | undefined; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item in the transaction. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal'?: TaxProductResourceTaxTransactionLineItemResourceReversalModel | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; + /** + * If `reversal`, this line item reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; export type TaxProductResourceTaxTransactionResourceReversalModel = { + /** + * The `id` of the reversed `Transaction` object. + */ 'original_transaction'?: string | undefined; }; export type TaxProductResourceTaxTransactionShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; +/** + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction) + */ export type TaxTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer'?: string | undefined; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Unique identifier for the transaction. + */ 'id': string; + /** + * The tax collected or refunded, by line item. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxTransactionLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction'; + /** + * The Unix timestamp representing when the tax liability is assumed or reduced. + */ 'posted_at': number; + /** + * A custom unique identifier, such as 'myOrder_123'. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal'?: TaxProductResourceTaxTransactionResourceReversalModel | undefined; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details'?: TaxProductResourceShipFromDetailsModel | undefined; + /** + * The shipping cost details for the transaction. + */ 'shipping_cost'?: TaxProductResourceTaxTransactionShippingCostModel | undefined; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; + /** + * If `reversal`, this transaction reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; export type TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel = { + /** + * A File ID representing an image to display on the reader + */ 'splashscreen'?: string | FileModel | undefined; }; export type TerminalConfigurationConfigurationResourceOfflineConfigModel = { + /** + * Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + */ 'enabled'?: boolean | undefined; }; export type TerminalConfigurationConfigurationResourceRebootWindowModel = { + /** + * Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + */ 'end_hour': number; + /** + * Integer between 0 to 23 that represents the start hour of the reboot time window. + */ 'start_hour': number; }; export type TerminalConfigurationConfigurationResourceCurrencySpecificConfigModel = { + /** + * Fixed amounts displayed when collecting a tip + */ 'fixed_amounts'?: number[] | undefined; + /** + * Percentages displayed when collecting a tip + */ 'percentages'?: number[] | undefined; + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ 'smart_tip_threshold'?: number | undefined; }; @@ -9513,22 +24602,55 @@ export type TerminalConfigurationConfigurationResourceTippingModel = { }; export type TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; + /** + * Username for connecting to the WiFi network + */ 'username': string; }; export type TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * A File ID representing a PEM file containing the client certificate + */ 'client_certificate_file': string; + /** + * A File ID representing a PEM file containing the client RSA private key + */ 'private_key_file': string; + /** + * Password for the private key file + */ 'private_key_file_password'?: string | undefined; + /** + * Name of the WiFi network + */ 'ssid': string; }; export type TerminalConfigurationConfigurationResourcePersonalPskWifiModel = { + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; }; @@ -9536,16 +24658,38 @@ export type TerminalConfigurationConfigurationResourceWifiConfigModel = { 'enterprise_eap_peap'?: TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel | undefined; 'enterprise_eap_tls'?: TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel | undefined; 'personal_psk'?: TerminalConfigurationConfigurationResourcePersonalPskWifiModel | undefined; + /** + * Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type. + */ 'type': 'enterprise_eap_peap' | 'enterprise_eap_tls' | 'personal_psk'; }; +/** + * A Configurations object represents how features should be configured for terminal readers. + * For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). + */ export type TerminalConfigurationModel = { 'bbpos_wisepad3'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; 'bbpos_wisepos_e'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether this Configuration is the default for your account + */ 'is_account_default'?: boolean | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String indicating the name of the Configuration object, set by the user + */ 'name'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; 'offline'?: TerminalConfigurationConfigurationResourceOfflineConfigModel | undefined; 'reboot_window'?: TerminalConfigurationConfigurationResourceRebootWindowModel | undefined; @@ -9555,441 +24699,1223 @@ export type TerminalConfigurationModel = { 'wifi'?: TerminalConfigurationConfigurationResourceWifiConfigModel | undefined; }; +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalConnectionTokenModel = { + /** + * The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + */ 'location'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.connection_token'; + /** + * Your application should pass this token to the Stripe Terminal SDK. + */ 'secret': string; }; +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalLocationModel = { 'address': AddressModel; 'address_kana'?: LegalEntityJapanAddressModel | undefined; 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ 'configuration_overrides'?: string | undefined; + /** + * The display name of the location. + */ 'display_name': string; + /** + * The Kana variation of the display name of the location. + */ 'display_name_kana'?: string | undefined; + /** + * The Kanji variation of the display name of the location. + */ 'display_name_kanji'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; + /** + * The phone number of the location. + */ 'phone'?: string | undefined; }; +/** + * Options associated with the Apple Terms and Conditions link type. + */ export type TerminalOnboardingLinkAppleTermsAndConditionsModel = { + /** + * Whether the link should also support users relinking their Apple account. + */ 'allow_relinking'?: boolean | undefined; + /** + * The business name of the merchant accepting Apple's Terms and Conditions. + */ 'merchant_display_name': string; }; +/** + * Link type options associated with the current onboarding link object. + */ export type TerminalOnboardingLinkLinkOptionsModel = { + /** + * The options associated with the Apple Terms and Conditions link type. + */ 'apple_terms_and_conditions'?: TerminalOnboardingLinkAppleTermsAndConditionsModel | undefined; }; +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export type TerminalOnboardingLinkModel = { 'link_options': TerminalOnboardingLinkLinkOptionsModel; + /** + * The type of link being generated. + */ 'link_type': 'apple_terms_and_conditions'; 'object': 'terminal.onboarding_link'; + /** + * Stripe account ID to generate the link for. + */ 'on_behalf_of'?: string | undefined; + /** + * The link passed back to the user for their onboarding. + */ 'redirect_url': string; }; +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export type TerminalReaderReaderResourceCustomTextModel = { + /** + * Customize the default description for this input + */ 'description'?: string | undefined; + /** + * Customize the default label for this input's skip button + */ 'skip_button'?: string | undefined; + /** + * Customize the default label for this input's submit button + */ 'submit_button'?: string | undefined; + /** + * Customize the default title for this input + */ 'title'?: string | undefined; }; +/** + * Information about a email being collected using a reader + */ export type TerminalReaderReaderResourceEmailModel = { + /** + * The collected email address + */ 'value'?: string | undefined; }; +/** + * Information about a number being collected using a reader + */ export type TerminalReaderReaderResourceNumericModel = { + /** + * The collected number + */ 'value'?: string | undefined; }; +/** + * Information about a phone number being collected using a reader + */ export type TerminalReaderReaderResourcePhoneModel = { + /** + * The collected phone number + */ 'value'?: string | undefined; }; +/** + * Choice to be selected on a Reader + */ export type TerminalReaderReaderResourceChoiceModel = { + /** + * The identifier for the selected choice. Maximum 50 characters. + */ 'id'?: string | undefined; + /** + * The button style for the choice. Can be `primary` or `secondary`. + */ 'style'?: 'primary' | 'secondary' | undefined; + /** + * The text to be selected. Maximum 30 characters. + */ 'text': string; }; +/** + * Information about a selection being collected using a reader + */ export type TerminalReaderReaderResourceSelectionModel = { + /** + * List of possible choices to be selected + */ 'choices': TerminalReaderReaderResourceChoiceModel[]; + /** + * The id of the selected choice + */ 'id'?: string | undefined; + /** + * The text of the selected choice + */ 'text'?: string | undefined; }; +/** + * Information about a signature being collected using a reader + */ export type TerminalReaderReaderResourceSignatureModel = { + /** + * The File ID of a collected signature image + */ 'value'?: string | undefined; }; +/** + * Information about text being collected using a reader + */ export type TerminalReaderReaderResourceTextModel = { + /** + * The collected text value + */ 'value'?: string | undefined; }; +/** + * Information about an input's toggle + */ export type TerminalReaderReaderResourceToggleModel = { + /** + * The toggle's default value. Can be `enabled` or `disabled`. + */ 'default_value'?: 'disabled' | 'enabled' | undefined; + /** + * The toggle's description text. Maximum 50 characters. + */ 'description'?: string | undefined; + /** + * The toggle's title text. Maximum 50 characters. + */ 'title'?: string | undefined; + /** + * The toggle's collected value. Can be `enabled` or `disabled`. + */ 'value'?: 'disabled' | 'enabled' | undefined; }; +/** + * Represents an input to be collected using the reader + */ export type TerminalReaderReaderResourceInputModel = { + /** + * Default text of input being collected. + */ 'custom_text'?: TerminalReaderReaderResourceCustomTextModel | undefined; 'email'?: TerminalReaderReaderResourceEmailModel | undefined; 'numeric'?: TerminalReaderReaderResourceNumericModel | undefined; 'phone'?: TerminalReaderReaderResourcePhoneModel | undefined; + /** + * Indicate that this input is required, disabling the skip button. + */ 'required'?: boolean | undefined; 'selection'?: TerminalReaderReaderResourceSelectionModel | undefined; 'signature'?: TerminalReaderReaderResourceSignatureModel | undefined; + /** + * Indicate that this input was skipped by the user. + */ 'skipped'?: boolean | undefined; 'text'?: TerminalReaderReaderResourceTextModel | undefined; + /** + * List of toggles being collected. Values are present if collection is complete. + */ 'toggles'?: TerminalReaderReaderResourceToggleModel[] | undefined; + /** + * Type of input being collected. + */ 'type': 'email' | 'numeric' | 'phone' | 'selection' | 'signature' | 'text'; }; +/** + * Represents a reader action to collect customer inputs + */ export type TerminalReaderReaderResourceCollectInputsActionModel = { + /** + * List of inputs to be collected. + */ 'inputs': TerminalReaderReaderResourceInputModel[]; + /** + * 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'?: { [key: string]: string; } | undefined; }; +/** + * Represents a per-transaction tipping configuration + */ export type TerminalReaderReaderResourceTippingConfigModel = { + /** + * Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + */ 'amount_eligible'?: number | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceCollectConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to collect a payment method + */ export type TerminalReaderReaderResourceCollectPaymentMethodActionModel = { 'collect_config'?: TerminalReaderReaderResourceCollectConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'payment_method'?: PaymentMethodModel | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceConfirmConfigModel = { + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; }; +/** + * Represents a reader action to confirm a payment + */ export type TerminalReaderReaderResourceConfirmPaymentIntentActionModel = { 'confirm_config'?: TerminalReaderReaderResourceConfirmConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceProcessConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to process a payment intent + */ export type TerminalReaderReaderResourceProcessPaymentIntentActionModel = { + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'process_config'?: TerminalReaderReaderResourceProcessConfigModel | undefined; }; +/** + * Represents a per-setup override of a reader configuration + */ export type TerminalReaderReaderResourceProcessSetupConfigModel = { + /** + * Enable customer-initiated cancellation when processing this SetupIntent. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to process a setup intent + */ export type TerminalReaderReaderResourceProcessSetupIntentActionModel = { + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card'?: string | undefined; 'process_config'?: TerminalReaderReaderResourceProcessSetupConfigModel | undefined; + /** + * Most recent SetupIntent processed by the reader. + */ 'setup_intent': string | SetupIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceRefundPaymentConfigModel = { + /** + * Enable customer-initiated cancellation when refunding this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to refund a payment + */ export type TerminalReaderReaderResourceRefundPaymentActionModel = { + /** + * The amount being refunded. + */ 'amount'?: number | undefined; + /** + * Charge that is being refunded. + */ 'charge'?: string | ChargeModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Payment intent that is being refunded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason for the refund. + */ 'reason'?: 'duplicate' | 'fraudulent' | 'requested_by_customer' | undefined; + /** + * Unique identifier for the refund object. + */ 'refund'?: string | RefundModel | undefined; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + */ 'refund_application_fee'?: boolean | undefined; 'refund_payment_config'?: TerminalReaderReaderResourceRefundPaymentConfigModel | undefined; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + */ 'reverse_transfer'?: boolean | undefined; }; +/** + * Represents a line item to be displayed on the reader + */ export type TerminalReaderReaderResourceLineItemModel = { + /** + * The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Description of the line item. + */ 'description': string; + /** + * The quantity of the line item. + */ 'quantity': number; }; +/** + * Represents a cart to be displayed on the reader + */ export type TerminalReaderReaderResourceCartModel = { + /** + * 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; + /** + * List of line items in the cart. + */ 'line_items': TerminalReaderReaderResourceLineItemModel[]; + /** + * Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'tax'?: number | undefined; + /** + * Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'total': number; }; +/** + * Represents a reader action to set the reader display + */ export type TerminalReaderReaderResourceSetReaderDisplayActionModel = { + /** + * Cart object to be displayed by the reader, including line items, amounts, and currency. + */ 'cart'?: TerminalReaderReaderResourceCartModel | undefined; + /** + * Type of information to be displayed by the reader. Only `cart` is currently supported. + */ 'type': 'cart'; }; +/** + * Represents an action performed by the reader + */ export type TerminalReaderReaderResourceReaderActionModel = { 'collect_inputs'?: TerminalReaderReaderResourceCollectInputsActionModel | undefined; 'collect_payment_method'?: TerminalReaderReaderResourceCollectPaymentMethodActionModel | undefined; 'confirm_payment_intent'?: TerminalReaderReaderResourceConfirmPaymentIntentActionModel | undefined; + /** + * Failure code, only set if status is `failed`. + */ 'failure_code'?: string | undefined; + /** + * Detailed failure message, only set if status is `failed`. + */ 'failure_message'?: string | undefined; 'process_payment_intent'?: TerminalReaderReaderResourceProcessPaymentIntentActionModel | undefined; 'process_setup_intent'?: TerminalReaderReaderResourceProcessSetupIntentActionModel | undefined; 'refund_payment'?: TerminalReaderReaderResourceRefundPaymentActionModel | undefined; 'set_reader_display'?: TerminalReaderReaderResourceSetReaderDisplayActionModel | undefined; + /** + * Status of the action performed by the reader. + */ 'status': 'failed' | 'in_progress' | 'succeeded'; + /** + * Type of action performed by the reader. + */ 'type': 'collect_inputs' | 'collect_payment_method' | 'confirm_payment_intent' | 'process_payment_intent' | 'process_setup_intent' | 'refund_payment' | 'set_reader_display'; }; +/** + * A Reader represents a physical device for accepting payment details. + * + * Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader) + */ export type TerminalReaderModel = { + /** + * The most recent action performed by the reader. + */ 'action'?: TerminalReaderReaderResourceReaderActionModel | undefined; + /** + * The current software version of the reader. + */ 'device_sw_version'?: string | undefined; + /** + * Device type of the reader. + */ 'device_type': 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'mobile_phone_reader' | 'simulated_stripe_s700' | 'simulated_wisepos_e' | 'stripe_m2' | 'stripe_s700' | 'verifone_P400'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The local IP address of the reader. + */ 'ip_address'?: string | undefined; + /** + * Custom label given to the reader for easier identification. + */ 'label': string; + /** + * The last time this reader reported to Stripe backend. + */ 'last_seen_at'?: number | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The location identifier of the reader. + */ 'location'?: string | TerminalLocationModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; + /** + * Serial number of the reader. + */ 'serial_number': string; + /** + * The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + */ 'status'?: 'offline' | 'online' | undefined; }; +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export type TokenModel = { 'bank_account'?: BankAccountModel | undefined; 'card'?: CardModel | undefined; + /** + * IP address of the client that generates the token. + */ 'client_ip'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'token'; + /** + * Type of the token: `account`, `bank_account`, `card`, or `pii`. + */ 'type': string; + /** + * Determines if you have already used this token (you can only use tokens once). + */ 'used': boolean; }; export type TreasuryReceivedCreditsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the CreditReversal changed status to `posted` + */ 'posted_at'?: number | undefined; }; +/** + * Change to a FinancialAccount's balance + */ export type TreasuryTransactionsResourceBalanceImpactModel = { + /** + * The change made to funds the user can spend right now. + */ 'cash': number; + /** + * The change made to funds that are not spendable yet, but will become available at a later time. + */ 'inbound_pending': number; + /** + * The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': number; }; export type TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel = { + /** + * Set if there is an Issuing dispute associated with the DebitReversal. + */ 'issuing_dispute'?: string | undefined; }; export type TreasuryReceivedDebitsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the DebitReversal changed status to `completed`. + */ 'completed_at'?: number | undefined; }; +/** + * You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ export type TreasuryDebitReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account'?: string | undefined; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Other flows linked to a DebitReversal. + */ 'linked_flows'?: TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'card'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.debit_reversal'; + /** + * The ReceivedDebit being reversed. + */ 'received_debit': string; + /** + * Status of the DebitReversal + */ 'status': 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryReceivedDebitsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction'?: string | TreasuryTransactionModel | undefined; }; export type TreasuryInboundTransfersResourceFailureDetailsModel = { + /** + * Reason for the failure. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'debit_not_authorized' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'insufficient_funds' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; }; export type TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel = { + /** + * If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. + */ 'received_debit'?: string | undefined; }; export type TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel = { + /** + * Timestamp describing when an InboundTransfer changed status to `canceled`. + */ 'canceled_at'?: number | undefined; + /** + * Timestamp describing when an InboundTransfer changed status to `failed`. + */ 'failed_at'?: number | undefined; + /** + * Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ 'succeeded_at'?: number | undefined; }; +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export type TreasuryInboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the InboundTransfer is able to be canceled. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * Details about this InboundTransfer's failure. Only set when status is `failed`. + */ 'failure_details'?: TreasuryInboundTransfersResourceFailureDetailsModel | undefined; + /** + * The FinancialAccount that received the funds. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'linked_flows': TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.inbound_transfer'; + /** + * The origin payment method to be debited for an InboundTransfer. + */ 'origin_payment_method'?: string | undefined; + /** + * Details about the PaymentMethod for an InboundTransfer. + */ 'origin_payment_method_details'?: InboundTransfersModel | undefined; + /** + * Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + */ 'returned'?: boolean | undefined; + /** + * Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + */ 'statement_descriptor': string; + /** + * Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + */ 'status': 'canceled' | 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction'?: string | TreasuryTransactionModel | undefined; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel = { + /** + * IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. + */ 'ip_address'?: string | undefined; + /** + * `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + */ 'present': boolean; }; export type TreasuryOutboundPaymentsResourceReturnedStatusModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundPayment changed status to `canceled`. + */ 'canceled_at'?: number | undefined; + /** + * Timestamp describing when an OutboundPayment changed status to `failed`. + */ 'failed_at'?: number | undefined; + /** + * Timestamp describing when an OutboundPayment changed status to `posted`. + */ 'posted_at'?: number | undefined; + /** + * Timestamp describing when an OutboundPayment changed status to `returned`. + */ 'returned_at'?: number | undefined; }; export type TreasuryOutboundPaymentsResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundPayment for payments sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'chips'?: string | undefined; + /** + * IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'imad'?: string | undefined; + /** + * OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'omad'?: string | undefined; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundPaymentsResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export type TreasuryOutboundPaymentModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + */ 'customer'?: string | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + */ 'destination_payment_method'?: string | undefined; + /** + * Details about the PaymentMethod for an OutboundPayment. + */ 'destination_payment_method_details'?: OutboundPaymentsPaymentMethodDetailsModel | undefined; + /** + * Details about the end user. + */ 'end_user_details'?: TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel | undefined; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_payment'; + /** + * Details about a returned OutboundPayment. Only set when the status is `returned`. + */ 'returned_details'?: TreasuryOutboundPaymentsResourceReturnedStatusModel | undefined; + /** + * The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + */ 'statement_descriptor': string; + /** + * Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details'?: TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel | undefined; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceReturnedDetailsModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundTransfer changed status to `canceled` + */ 'canceled_at'?: number | undefined; + /** + * Timestamp describing when an OutboundTransfer changed status to `failed` + */ 'failed_at'?: number | undefined; + /** + * Timestamp describing when an OutboundTransfer changed status to `posted` + */ 'posted_at'?: number | undefined; + /** + * Timestamp describing when an OutboundTransfer changed status to `returned` + */ 'returned_at'?: number | undefined; }; export type TreasuryOutboundTransfersResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'chips'?: string | undefined; + /** + * IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'imad'?: string | undefined; + /** + * OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'omad'?: string | undefined; }; export type TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundTransfersResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export type TreasuryOutboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description'?: string | undefined; + /** + * The PaymentMethod used as the payment instrument for an OutboundTransfer. + */ 'destination_payment_method'?: string | undefined; 'destination_payment_method_details': OutboundTransfersPaymentMethodDetailsModel; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_transfer'; + /** + * Details about a returned OutboundTransfer. Only set when the status is `returned`. + */ 'returned_details'?: TreasuryOutboundTransfersResourceReturnedDetailsModel | undefined; + /** + * Information about the OutboundTransfer to be sent to the recipient account. + */ 'statement_descriptor': string; + /** + * Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundTransfersResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details'?: TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel | undefined; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel = { + /** + * Bank name. + */ 'bank_name'?: string | undefined; + /** + * The last four digits of the bank account number. + */ 'last4'?: string | undefined; + /** + * The routing number for the bank account. + */ 'routing_number'?: string | undefined; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel = { + /** + * Set when `type` is `balance`. + */ 'balance'?: 'payments' | undefined; 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: ReceivedPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + */ 'issuing_card'?: string | undefined; + /** + * Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + */ 'type': 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account'; 'us_bank_account'?: TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -9999,71 +25925,209 @@ export type TreasuryReceivedCreditsResourceSourceFlowsDetailsModel = { 'outbound_payment'?: TreasuryOutboundPaymentModel | undefined; 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'payout'?: PayoutModel | undefined; + /** + * The type of the source flow that originated the ReceivedCredit. + */ 'type': 'credit_reversal' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'payout'; }; export type TreasuryReceivedCreditsResourceLinkedFlowsModel = { + /** + * The CreditReversal created as a result of this ReceivedCredit being reversed. + */ 'credit_reversal'?: string | undefined; + /** + * Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization'?: string | undefined; + /** + * Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. + */ 'issuing_transaction'?: string | undefined; + /** + * ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. + */ 'source_flow'?: string | undefined; + /** + * The expandable object of the source flow. + */ 'source_flow_details'?: TreasuryReceivedCreditsResourceSourceFlowsDetailsModel | undefined; + /** + * The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). + */ 'source_flow_type'?: string | undefined; }; export type TreasuryReceivedCreditsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedCredit can be reversed. + */ 'deadline'?: number | undefined; + /** + * Set if a ReceivedCredit cannot be reversed. + */ 'restricted_reason'?: 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted' | undefined; }; +/** + * ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ export type TreasuryReceivedCreditModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + */ 'failure_code'?: 'account_closed' | 'account_frozen' | 'international_transaction' | 'other' | undefined; + /** + * The FinancialAccount that received the funds. + */ 'financial_account'?: string | undefined; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details': TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel; 'linked_flows': TreasuryReceivedCreditsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The rails used to send the funds. + */ 'network': 'ach' | 'card' | 'stripe' | 'us_domestic_wire'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_credit'; + /** + * Details describing when a ReceivedCredit may be reversed. + */ 'reversal_details'?: TreasuryReceivedCreditsResourceReversalDetailsModel | undefined; + /** + * Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction'?: string | TreasuryTransactionModel | undefined; }; export type TreasuryReceivedDebitsResourceLinkedFlowsModel = { + /** + * The DebitReversal created as a result of this ReceivedDebit being reversed. + */ 'debit_reversal'?: string | undefined; + /** + * Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. + */ 'inbound_transfer'?: string | undefined; + /** + * Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization'?: string | undefined; + /** + * Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. + */ 'issuing_transaction'?: string | undefined; + /** + * Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + */ 'payout'?: string | undefined; }; export type TreasuryReceivedDebitsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedDebit can be reversed. + */ 'deadline'?: number | undefined; + /** + * Set if a ReceivedDebit can't be reversed. + */ 'restricted_reason'?: 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted' | undefined; }; +/** + * ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ export type TreasuryReceivedDebitModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + */ 'failure_code'?: 'account_closed' | 'account_frozen' | 'insufficient_funds' | 'international_transaction' | 'other' | undefined; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account'?: string | undefined; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details'?: TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel | undefined; 'linked_flows': TreasuryReceivedDebitsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The network used for the ReceivedDebit. + */ 'network': 'ach' | 'card' | 'stripe'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_debit'; + /** + * Details describing when a ReceivedDebit might be reversed. + */ 'reversal_details'?: TreasuryReceivedDebitsResourceReversalDetailsModel | undefined; + /** + * Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction'?: string | TreasuryTransactionModel | undefined; }; @@ -10076,207 +26140,575 @@ export type TreasuryTransactionsResourceFlowDetailsModel = { 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'received_credit'?: TreasuryReceivedCreditModel | undefined; 'received_debit'?: TreasuryReceivedDebitModel | undefined; + /** + * Type of the flow that created the Transaction. Set to the same value as `flow_type`. + */ 'type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; }; +/** + * TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ export type TreasuryTransactionEntryModel = { 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * When the TransactionEntry will impact the FinancialAccount's balance. + */ 'effective_at': number; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * Token of the flow associated with the TransactionEntry. + */ 'flow'?: string | undefined; + /** + * Details of the flow associated with the TransactionEntry. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow associated with the TransactionEntry. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction_entry'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; + /** + * The specific money movement that generated the TransactionEntry. + */ 'type': 'credit_reversal' | 'credit_reversal_posting' | 'debit_reversal' | 'inbound_transfer' | 'inbound_transfer_return' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'other' | 'outbound_payment' | 'outbound_payment_cancellation' | 'outbound_payment_failure' | 'outbound_payment_posting' | 'outbound_payment_return' | 'outbound_transfer' | 'outbound_transfer_cancellation' | 'outbound_transfer_failure' | 'outbound_transfer_posting' | 'outbound_transfer_return' | 'received_credit' | 'received_debit'; }; export type TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel = { + /** + * Timestamp describing when the Transaction changed status to `posted`. + */ 'posted_at'?: number | undefined; + /** + * Timestamp describing when the Transaction changed status to `void`. + */ 'void_at'?: number | undefined; }; +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export type TreasuryTransactionModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ 'entries'?: { + /** + * Details about each object. + */ 'data': TreasuryTransactionEntryModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * ID of the flow that created the Transaction. + */ 'flow'?: string | undefined; + /** + * Details of the flow that created the Transaction. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow that created the Transaction. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction'; + /** + * Status of the Transaction. + */ 'status': 'open' | 'posted' | 'void'; 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel; }; +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export type TreasuryCreditReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'stripe'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.credit_reversal'; + /** + * The ReceivedCredit being reversed. + */ 'received_credit': string; + /** + * Status of the CreditReversal + */ 'status': 'canceled' | 'posted' | 'processing'; 'status_transitions': TreasuryReceivedCreditsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction'?: string | TreasuryTransactionModel | undefined; }; +/** + * Balance information for the FinancialAccount + */ export type TreasuryFinancialAccountsResourceBalanceModel = { + /** + * Funds the user can spend right now. + */ 'cash': { [key: string]: number; }; + /** + * Funds not spendable yet, but will become available at a later time. + */ 'inbound_pending': { [key: string]: number; }; + /** + * Funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': { [key: string]: number; }; }; +/** + * Additional details on the FinancialAccount Features information. + */ export type TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel = { + /** + * Represents the reason why the status is `pending` or `restricted`. + */ 'code': 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other'; + /** + * Represents what the user should do, if anything, to activate the Feature. + */ 'resolution'?: 'contact_stripe' | 'provide_information' | 'remove_restriction' | undefined; + /** + * The `platform_restrictions` that are restricting this Feature. + */ 'restriction'?: 'inbound_flows' | 'outbound_flows' | undefined; }; +/** + * Toggle settings for enabling/disabling a feature + */ export type TreasuryFinancialAccountsResourceToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export type TreasuryFinancialAccountsResourceAbaToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Financial Addresses features on a Financial Account + */ export type TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceInboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Outbound Payments features on a Financial Account + */ export type TreasuryFinancialAccountsResourceOutboundPaymentsModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceOutboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export type TreasuryFinancialAccountFeaturesModel = { 'card_issuing'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'deposit_insurance'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'financial_addresses'?: TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel | undefined; 'inbound_transfers'?: TreasuryFinancialAccountsResourceInboundTransfersModel | undefined; 'intra_stripe_flows'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account_features'; 'outbound_payments'?: TreasuryFinancialAccountsResourceOutboundPaymentsModel | undefined; 'outbound_transfers'?: TreasuryFinancialAccountsResourceOutboundTransfersModel | undefined; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type TreasuryFinancialAccountsResourceAbaRecordModel = { + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name': string; + /** + * The account number. + */ 'account_number'?: string | undefined; + /** + * The last four characters of the account number. + */ 'account_number_last4': string; + /** + * Name of the bank. + */ 'bank_name': string; + /** + * Routing number for the account. + */ 'routing_number': string; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceFinancialAddressModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaRecordModel | undefined; + /** + * The list of networks that the address supports + */ 'supported_networks'?: Array<'ach' | 'us_domestic_wire'> | undefined; + /** + * The type of financial address + */ 'type': 'aba'; }; +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export type TreasuryFinancialAccountsResourcePlatformRestrictionsModel = { + /** + * Restricts all inbound money movement. + */ 'inbound_flows'?: 'restricted' | 'unrestricted' | undefined; + /** + * Restricts all outbound money movement. + */ 'outbound_flows'?: 'restricted' | 'unrestricted' | undefined; }; export type TreasuryFinancialAccountsResourceClosedStatusDetailsModel = { + /** + * The array that contains reasons for a FinancialAccount closure. + */ 'reasons': Array<'account_rejected' | 'closed_by_platform' | 'other'>; }; export type TreasuryFinancialAccountsResourceStatusDetailsModel = { + /** + * Details related to the closure of this FinancialAccount + */ 'closed'?: TreasuryFinancialAccountsResourceClosedStatusDetailsModel | undefined; }; +/** + * Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ export type TreasuryFinancialAccountModel = { + /** + * The array of paths to active Features in the Features hash. + */ 'active_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; 'balance': TreasuryFinancialAccountsResourceBalanceModel; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'features'?: TreasuryFinancialAccountFeaturesModel | undefined; + /** + * The set of credentials that resolve to a FinancialAccount. + */ 'financial_addresses': TreasuryFinancialAccountsResourceFinancialAddressModel[]; + /** + * Unique identifier for the object. + */ 'id': string; 'is_default'?: boolean | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The nickname for the FinancialAccount. + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account'; + /** + * The array of paths to pending Features in the Features hash. + */ 'pending_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * The set of functionalities that the platform can restrict on the FinancialAccount. + */ 'platform_restrictions'?: TreasuryFinancialAccountsResourcePlatformRestrictionsModel | undefined; + /** + * The array of paths to restricted Features in the Features hash. + */ 'restricted_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * Status of this FinancialAccount. + */ 'status': 'closed' | 'open'; 'status_details': TreasuryFinancialAccountsResourceStatusDetailsModel; + /** + * The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + */ 'supported_currencies': string[]; }; +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export type WebhookEndpointModel = { + /** + * The API version events are rendered as for this webhook endpoint. + */ 'api_version'?: string | undefined; + /** + * The ID of the associated Connect application. + */ 'application'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An optional description of what the webhook is used for. + */ 'description'?: string | undefined; + /** + * The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + */ 'enabled_events': string[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; + /** + * The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. + */ 'secret'?: string | undefined; + /** + * The status of the webhook. It can be `enabled` or `disabled`. + */ 'status': string; + /** + * The URL of the webhook endpoint. + */ 'url': string; }; @@ -10414,6 +26846,11 @@ export const LegalEntityRepresentativeDeclaration: z.ZodType = z.object({ 'created': z.number().int(), 'expired': z.boolean(), @@ -10426,6 +26863,15 @@ export const FileLink: z.ZodType = z.object({ 'url': z.string().optional() }); +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export const File: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int().optional(), @@ -10507,6 +26953,9 @@ export const CustomerBalanceCustomerBalanceSettings: z.ZodType = z.object({ 'available': z.record(z.string(), z.number().int()).optional(), 'customer': z.string(), @@ -10525,6 +26974,13 @@ export const TokenCardNetworks: z.ZodType = z.object({ 'preferred': z.string().optional() }); +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export const Card: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'address_city': z.string().optional(), @@ -10825,6 +27281,18 @@ export const SourceTypeWechat: z.ZodType = z.object({ 'statement_descriptor': z.string().optional() }); +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export const Source: z.ZodType = z.object({ 'ach_credit_transfer': SourceTypeAchCreditTransfer.optional(), 'ach_debit': SourceTypeAchDebit.optional(), @@ -10874,6 +27342,11 @@ export const CouponCurrencyOption: z.ZodType = z.obje 'amount_off': z.number().int() }); +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export const Coupon: z.ZodType = z.object({ 'amount_off': z.number().int().optional(), 'applies_to': CouponAppliesTo.optional(), @@ -10910,6 +27383,13 @@ export const PromotionCodesResourceRestrictions: z.ZodType = z.object({ 'active': z.boolean(), 'code': z.string(), @@ -10931,6 +27411,12 @@ export const DiscountSource: z.ZodType = z.object({ 'type': z.enum(['coupon']) }); +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export const Discount: z.ZodType = z.object({ 'checkout_session': z.string().optional(), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]).optional(), @@ -11213,6 +27699,9 @@ export const MandateSingleUse: z.ZodType = z.object({ 'currency': z.string() }); +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export const Mandate: z.ZodType = z.object({ 'customer_acceptance': CustomerAcceptance, 'id': z.string(), @@ -11674,6 +28163,18 @@ export const PaymentFlowsPaymentIntentPresentmentDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_reversed': z.number().int(), @@ -11699,6 +28200,21 @@ export const Transfer: z.ZodType = z.object({ 'transfer_group': z.string().optional() }); +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export const TransferReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]).optional(), @@ -11712,6 +28228,13 @@ export const TransferReversal: z.ZodType = z.object({ 'transfer': z.union([z.string(), z.lazy(() => Transfer)]) }); +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export const Refund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]).optional(), @@ -11749,6 +28272,12 @@ export const CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromP 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export const CustomerCashBalanceTransaction: z.ZodType = z.object({ 'adjusted_for_overdraft': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft).optional(), 'applied_to_payment': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction).optional(), @@ -11893,6 +28422,13 @@ export const DisputePaymentMethodDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)), @@ -11913,6 +28449,13 @@ export const Dispute: z.ZodType = z.object({ 'status': z.enum(['lost', 'needs_response', 'prevented', 'under_review', 'warning_closed', 'warning_needs_response', 'warning_under_review', 'won']) }); +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export const FeeRefund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]).optional(), @@ -11990,6 +28533,11 @@ export const IssuingCardholderAuthorizationControls: z.ZodType = z.object({ 'billing': IssuingCardholderAddress, 'company': z.union([IssuingCardholderCompany]).optional(), @@ -12027,6 +28575,9 @@ export const IssuingPhysicalBundleFeatures: z.ZodType = z.object({ 'features': IssuingPhysicalBundleFeatures, 'id': z.string(), @@ -12047,6 +28598,9 @@ export const IssuingPersonalizationDesignRejectionReasons: z.ZodType = z.object({ 'card_logo': z.union([z.string(), z.lazy(() => File)]).optional(), 'carrier_text': z.union([IssuingPersonalizationDesignCarrierText]).optional(), @@ -12120,6 +28674,9 @@ export const IssuingCardWallets: z.ZodType = z.object({ 'primary_account_identifier': z.string().optional() }); +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export const IssuingCard: z.ZodType = z.object({ 'brand': z.string(), 'cancellation_reason': z.enum(['design_rejected', 'lost', 'stolen']).optional(), @@ -12292,6 +28849,9 @@ export const IssuingNetworkTokenNetworkData: z.ZodType = z.object({ 'card': z.union([z.string(), z.lazy(() => IssuingCard)]), 'created': z.number().int(), @@ -12393,6 +28953,11 @@ export const IssuingDisputeTreasury: z.ZodType = z. 'received_debit': z.string() }); +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export const IssuingDispute: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)).optional(), @@ -12500,6 +29065,13 @@ export const IssuingTransactionTreasury: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingTransactionAmountDetails]).optional(), @@ -12550,6 +29122,13 @@ export const IssuingAuthorizationVerificationData: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingAuthorizationAmountDetails]).optional(), @@ -12601,6 +29180,16 @@ export const PayoutsTraceId: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export const Payout: z.ZodType = z.object({ 'amount': z.number().int(), 'application_fee': z.union([z.string(), z.lazy(() => ApplicationFee)]).optional(), @@ -12647,6 +29236,13 @@ export const TaxDeductedAtSource: z.ZodType = z.object 'tax_deduction_account_number': z.string() }); +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export const Topup: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]).optional(), @@ -12666,6 +29262,12 @@ export const Topup: z.ZodType = z.object({ 'transfer_group': z.string().optional() }); +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export const BalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'available_on': z.number().int(), @@ -13296,6 +29898,9 @@ export const PaymentMethodDetails: z.ZodType = z.obje 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export const RadarRadarOptions: z.ZodType = z.object({ 'session': z.string().optional() }); @@ -13315,6 +29920,12 @@ export const RadarReviewResourceSession: z.ZodType = z.object({ 'billing_zip': z.string().optional(), 'charge': z.union([z.string(), z.lazy(() => Charge)]).optional(), @@ -13337,6 +29948,11 @@ export const ChargeTransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export const Charge: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_captured': z.number().int(), @@ -13421,6 +30037,9 @@ export const PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode: z.ZodT 'qr_code': PaymentIntentNextActionCashappQrCode }); +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -13431,6 +30050,9 @@ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -13440,6 +30062,9 @@ export const FundingInstructionsBankTransferIbanRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -13448,6 +30073,9 @@ export const FundingInstructionsBankTransferSortCodeRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -13457,6 +30085,9 @@ export const FundingInstructionsBankTransferSpeiRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -13467,6 +30098,9 @@ export const FundingInstructionsBankTransferSwiftRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string().optional(), @@ -13479,6 +30113,9 @@ export const FundingInstructionsBankTransferZenginRecord: z.ZodType = z.object({ 'aba': FundingInstructionsBankTransferAbaRecord.optional(), 'iban': FundingInstructionsBankTransferIbanRecord.optional(), @@ -14059,6 +30696,19 @@ export const TransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export const PaymentIntent: z.ZodType = z.object({ 'amount': z.number().int().optional(), 'amount_capturable': z.number().int().optional(), @@ -14221,6 +30871,29 @@ export const SetupIntentPaymentMethodOptions: z.ZodType = z.object({ 'application': z.union([z.string(), Application]).optional(), 'attach_to_self': z.boolean().optional(), @@ -14269,6 +30942,12 @@ export const ApiErrors: z.ZodType = z.object({ 'type': z.enum(['api_error', 'card_error', 'idempotency_error', 'invalid_request_error']) }); +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export const SetupAttempt: z.ZodType = z.object({ 'application': z.union([z.string(), Application]).optional(), 'attach_to_self': z.boolean().optional(), @@ -14609,6 +31288,13 @@ export const PaymentMethodZip: z.ZodType = z.object({ }); +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export const PaymentMethod: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -14716,6 +31402,9 @@ export const SubscriptionsResourceBillingModeFlexible: z.ZodType = z.object({ 'flexible': z.union([SubscriptionsResourceBillingModeFlexible]).optional(), 'type': z.enum(['classic', 'flexible']), @@ -14733,11 +31422,19 @@ export const CancellationDetails: z.ZodType = z.object 'reason': z.enum(['cancellation_requested', 'payment_disputed', 'payment_failed']).optional() }); +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export const TaxRateFlatAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string() }); +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export const TaxRate: z.ZodType = z.object({ 'active': z.boolean(), 'country': z.string().optional(), @@ -14772,6 +31469,12 @@ export const TaxIdVerification: z.ZodType = z.object({ 'verified_name': z.string().optional() }); +/** + * 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 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) + */ export const TaxId: z.ZodType = z.object({ 'country': z.string().optional(), 'created': z.number().int(), @@ -14833,6 +31536,9 @@ export const PackageDimensions: z.ZodType = z.object({ 'width': z.number() }); +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export const TaxCode: z.ZodType = z.object({ 'description': z.string(), 'id': z.string(), @@ -14840,6 +31546,16 @@ export const TaxCode: z.ZodType = z.object({ 'object': z.enum(['tax_code']) }); +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export const Product: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -14879,6 +31595,14 @@ export const TransformQuantity: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Price: z.ZodType = z.object({ 'active': z.boolean(), 'billing_scheme': z.enum(['per_unit', 'tiered']), @@ -14903,6 +31627,10 @@ export const Price: z.ZodType = z.object({ 'unit_amount_decimal': z.string().optional() }); +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ export const SubscriptionItem: z.ZodType = z.object({ 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]).optional(), 'created': z.number().int(), @@ -15038,6 +31766,11 @@ export const BillingClocksResourceStatusDetailsStatusDetails: z.ZodType = z.object({ 'created': z.number().int(), 'deletes_after': z.number().int(), @@ -15050,6 +31783,11 @@ export const TestHelpersTestClock: z.ZodType = z.obje 'status_details': BillingClocksResourceStatusDetailsStatusDetails }); +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export const BillingCreditGrant: z.ZodType = z.object({ 'amount': BillingCreditGrantsResourceAmount, 'applicability_config': BillingCreditGrantsResourceApplicabilityConfig, @@ -15080,6 +31818,9 @@ export const BillingCreditGrantsResourceBalanceDebit: z.ZodType = z.object({ 'created': z.number().int(), 'credit': z.union([z.lazy(() => BillingCreditGrantsResourceBalanceCredit)]).optional(), @@ -15124,6 +31865,11 @@ export const BillingBillResourceInvoicingTaxesTax: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -15242,11 +31988,17 @@ export const DeletedInvoice: z.ZodType = z.object({ 'object': z.enum(['invoice']) }); +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export const PaymentsPrimitivesPaymentRecordsResourceAmount: z.ZodType = z.object({ 'currency': z.string(), 'value': z.number().int() }); +/** + * Information about the customer for this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType = z.object({ 'customer': z.string().optional(), 'email': z.string().optional(), @@ -15254,6 +32006,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType< 'phone': z.string().optional() }); +/** + * A representation of a physical address. + */ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'city': z.string().optional(), 'country': z.string().optional(), @@ -15263,6 +32018,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'email': z.string().optional(), @@ -15302,6 +32060,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsRes 'type': z.string() }); +/** + * Details of the card used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z.ZodType = z.object({ 'brand': z.enum(['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'link', 'mastercard', 'unionpay', 'unknown', 'visa']), 'capture_before': z.number().int().optional(), @@ -15319,6 +32080,11 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z 'wallet': z.union([PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWallet]).optional() }); +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails: z.ZodType = z.object({ 'display_name': z.string(), 'type': z.string().optional() @@ -15335,6 +32101,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountD 'routing_number': z.string().optional() }); +/** + * Details about the Payment Method used in this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.ZodType = z.object({ 'ach_credit_transfer': PaymentMethodDetailsAchCreditTransfer.optional(), 'ach_debit': PaymentMethodDetailsAchDebit.optional(), @@ -15397,21 +32166,38 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.Zod 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails: z.ZodType = z.object({ 'payment_reference': z.string().optional() }); +/** + * Processor information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetails: z.ZodType = z.object({ 'custom': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails.optional(), 'type': z.enum(['custom']) }); +/** + * The customer's shipping information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceShippingDetails: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'name': z.string().optional(), 'phone': z.string().optional() }); +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export const PaymentRecord: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -15447,6 +32233,16 @@ export const InvoicesPaymentsInvoicePaymentStatusTransitions: z.ZodType = z.object({ 'amount_paid': z.number().int().optional(), 'amount_requested': z.number().int(), @@ -15494,6 +32290,10 @@ export const ShippingRateFixedAmount: z.ZodType = 'currency_options': z.record(z.string(), ShippingRateCurrencyOption).optional() }); +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export const ShippingRate: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -15541,6 +32341,40 @@ export const InvoiceThresholdReason: z.ZodType = z. 'item_reasons': z.array(InvoiceItemThresholdReason) }); +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export const Invoice: z.ZodType = z.object({ 'account_country': z.string().optional(), 'account_name': z.string().optional(), @@ -15630,6 +32464,10 @@ export const Invoice: z.ZodType = z.object({ 'webhooks_delivered_at': z.number().int().optional() }); +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export const SubscriptionsResourcePauseCollection: z.ZodType = z.object({ 'behavior': z.enum(['keep_as_draft', 'mark_uncollectible', 'void']), 'resumes_at': z.number().int().optional() @@ -15668,6 +32506,10 @@ export const SubscriptionPendingInvoiceItemInterval: z.ZodType = z.object({ 'billing_cycle_anchor': z.number().int().optional(), 'expires_at': z.number().int(), @@ -15738,6 +32580,9 @@ export const DeletedPrice: z.ZodType = z.object({ 'object': z.enum(['price']) }); +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export const SubscriptionScheduleAddInvoiceItem: z.ZodType = z.object({ 'discounts': z.array(DiscountsResourceStackableDiscount), 'metadata': z.record(z.string(), z.string()).optional(), @@ -15759,6 +32604,9 @@ export const InvoiceSettingSubscriptionSchedulePhaseSetting: z.ZodType ConnectAccountReference)]).optional() }); +/** + * A phase item describes the price and quantity of a phase. + */ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]).optional(), 'discounts': z.array(DiscountsResourceStackableDiscount), @@ -15768,6 +32616,9 @@ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'add_invoice_items': z.array(SubscriptionScheduleAddInvoiceItem), 'application_fee_percent': z.number().optional(), @@ -15791,6 +32642,11 @@ export const SubscriptionSchedulePhaseConfiguration: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]).optional(), 'billing_mode': SubscriptionsResourceBillingMode, @@ -15813,14 +32669,25 @@ export const SubscriptionSchedule: z.ZodType = z.obje 'test_clock': z.union([z.string(), TestHelpersTestClock]).optional() }); +/** + * Defines how a subscription behaves when a free trial ends. + */ export const SubscriptionsTrialsResourceEndBehavior: z.ZodType = z.object({ 'missing_payment_method': z.enum(['cancel', 'create_invoice', 'pause']) }); +/** + * Configures how this subscription behaves during the trial period. + */ export const SubscriptionsTrialsResourceTrialSettings: z.ZodType = z.object({ 'end_behavior': SubscriptionsTrialsResourceEndBehavior }); +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export const Subscription: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]).optional(), 'application_fee_percent': z.number().optional(), @@ -15886,6 +32753,10 @@ export const CustomerTax: z.ZodType = z.object({ 'provider': z.enum(['anrok', 'avalara', 'sphere', 'stripe']) }); +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export const Customer: z.ZodType = z.object({ 'address': z.union([Address]).optional(), 'balance': z.number().int().optional(), @@ -15947,6 +32818,15 @@ export const ExternalAccountRequirements: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'account_holder_name': z.string().optional(), @@ -16065,6 +32945,13 @@ export const LegalEntityPersonVerification: z.ZodType = z.object({ 'account': z.string(), 'additional_tos_acceptances': PersonAdditionalTosAcceptances.optional(), @@ -16210,6 +33097,20 @@ export const AccountTosAcceptance: z.ZodType = z.obje 'user_agent': z.string().optional() }); +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export const Account: z.ZodType = z.object({ 'business_profile': z.union([AccountBusinessProfile]).optional(), 'business_type': z.enum(['company', 'government_entity', 'individual', 'non_profit']).optional(), @@ -16263,6 +33164,12 @@ export const AccountCapabilityRequirements: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -16416,6 +33323,15 @@ export const ConnectEmbeddedAccountSessionCreateComponents: z.ZodType = z.object({ 'account': z.string(), 'client_secret': z.string(), @@ -16438,6 +33354,17 @@ export const SecretServiceResourceScope: z.ZodType = z.object({ 'created': z.number().int(), 'deleted': z.boolean().optional(), @@ -16484,6 +33411,14 @@ export const BalanceDetailUngated: z.ZodType = z.obje 'pending': z.array(BalanceAmount) }); +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export const Balance: z.ZodType = z.object({ 'available': z.array(BalanceAmount), 'connect_reserved': z.array(BalanceAmount).optional(), @@ -16519,6 +33454,9 @@ export const BalanceSettingsResourcePayments: z.ZodType = z.object({ 'object': z.enum(['balance_settings']), 'payments': BalanceSettingsResourcePayments @@ -16604,6 +33542,11 @@ export const BillingMeterResourceBillingMeterValue: z.ZodType = z.object({ 'created': z.number().int(), 'customer_mapping': BillingMeterResourceCustomerMappingSettings, @@ -16620,6 +33563,9 @@ export const BillingMeter: z.ZodType = z.object({ 'value_settings': BillingMeterResourceBillingMeterValue }); +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'filters': z.array(ThresholdsResourceUsageAlertFilter).optional(), 'gte': z.number().int(), @@ -16627,6 +33573,9 @@ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'alert_type': z.enum(['usage_threshold']), 'id': z.string(), @@ -16642,6 +33591,9 @@ export const CreditBalance: z.ZodType = z.object({ 'ledger_balance': BillingCreditGrantsResourceAmount }); +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'balances': z.array(CreditBalance), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]), @@ -16649,6 +33601,9 @@ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'created': z.number().int(), 'event_name': z.string(), @@ -16663,6 +33618,9 @@ export const BillingMeterResourceBillingMeterEventAdjustmentCancel: z.ZodType = z.object({ 'cancel': z.union([BillingMeterResourceBillingMeterEventAdjustmentCancel]).optional(), 'event_name': z.string(), @@ -16672,6 +33630,12 @@ export const BillingMeterEventAdjustment: z.ZodType = z.object({ 'aggregated_value': z.number(), 'end_time': z.number().int(), @@ -16766,6 +33730,9 @@ export const PortalLoginPage: z.ZodType = z.object({ 'url': z.string().optional() }); +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export const BillingPortalConfiguration: z.ZodType = z.object({ 'active': z.boolean(), 'application': z.union([z.string(), Application, DeletedApplication]).optional(), @@ -16840,6 +33807,22 @@ export const PortalFlowsFlow: z.ZodType = z.object({ 'type': z.enum(['payment_method_update', 'subscription_cancel', 'subscription_update', 'subscription_update_confirm']) }); +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export const BillingPortalSession: z.ZodType = z.object({ 'configuration': z.union([z.string(), BillingPortalConfiguration]), 'created': z.number().int(), @@ -16854,6 +33837,11 @@ export const BillingPortalSession: z.ZodType = z.obje 'url': z.string() }); +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export const Capability: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]), 'future_requirements': AccountCapabilityFutureRequirements.optional(), @@ -17039,6 +34027,9 @@ export const LineItemsDiscountAmount: z.ZodType = 'discount': z.lazy(() => Discount) }); +/** + * A line item. + */ export const Item: z.ZodType = z.object({ 'amount_discount': z.number().int(), 'amount_subtotal': z.number().int(), @@ -17254,6 +34245,13 @@ export const PaymentLinksResourceTransferData: z.ZodType Account)]) }); +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export const PaymentLink: z.ZodType = z.object({ 'active': z.boolean(), 'after_completion': PaymentLinksResourceAfterCompletion, @@ -17634,6 +34632,22 @@ export const CheckoutSessionWalletOptions: z.ZodType = z.object({ 'adaptive_pricing': z.union([PaymentPagesCheckoutSessionAdaptivePricing]).optional(), 'after_expiration': z.union([PaymentPagesCheckoutSessionAfterExpiration]).optional(), @@ -17719,6 +34733,9 @@ export const ClimateRemovalsLocation: z.ZodType = 'region': z.string().optional() }); +/** + * A supplier of carbon removal. + */ export const ClimateSupplier: z.ZodType = z.object({ 'id': z.string(), 'info_url': z.string(), @@ -17729,6 +34746,9 @@ export const ClimateSupplier: z.ZodType = z.object({ 'removal_pathway': z.enum(['biomass_carbon_removal_and_storage', 'direct_air_capture', 'enhanced_weathering']) }); +/** + * The delivery of a specified quantity of carbon for an order. + */ export const ClimateRemovalsOrderDeliveries: z.ZodType = z.object({ 'delivered_at': z.number().int(), 'location': z.union([ClimateRemovalsLocation]).optional(), @@ -17743,6 +34763,10 @@ export const ClimateRemovalsProductsPrice: z.ZodType = z.object({ 'created': z.number().int(), 'current_prices_per_metric_ton': z.record(z.string(), ClimateRemovalsProductsPrice), @@ -17755,6 +34779,10 @@ export const ClimateProduct: z.ZodType = z.object({ 'suppliers': z.array(ClimateSupplier) }); +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export const ClimateOrder: z.ZodType = z.object({ 'amount_fees': z.number().int(), 'amount_subtotal': z.number().int(), @@ -17780,33 +34808,54 @@ export const ClimateOrder: z.ZodType = z.object({ 'status': z.enum(['awaiting_funds', 'canceled', 'confirmed', 'delivered', 'open']) }); +/** + * This hash contains details about the online acceptance. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline: z.ZodType = z.object({ 'ip_address': z.string().optional(), 'user_agent': z.string().optional() }); +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptance: z.ZodType = z.object({ 'online': z.union([ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline]).optional(), 'type': z.string() }); +/** + * Data used for generating a Mandate. + */ export const ConfirmationTokensResourceMandateData: z.ZodType = z.object({ 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptance }); +/** + * Installment configuration for payments. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment: z.ZodType = z.object({ 'plan': PaymentMethodDetailsCardInstallmentsPlan.optional() }); +/** + * This hash contains the card payment method options. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCard: z.ZodType = z.object({ 'cvc_token': z.string().optional(), 'installments': ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment.optional() }); +/** + * Payment-method-specific configuration + */ export const ConfirmationTokensResourcePaymentMethodOptions: z.ZodType = z.object({ 'card': z.union([ConfirmationTokensResourcePaymentMethodOptionsResourceCard]).optional() }); +/** + * Details of the PaymentMethod collected by Payment Element + */ export const ConfirmationTokensResourcePaymentMethodPreview: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -17871,6 +34920,15 @@ export const ConfirmationTokensResourceShipping: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int().optional(), @@ -17898,6 +34956,14 @@ export const CountrySpecVerificationFields: z.ZodType = z.object({ 'default_currency': z.string(), 'id': z.string(), @@ -17909,6 +34975,14 @@ export const CountrySpec: z.ZodType = z.object({ 'verification_fields': CountrySpecVerificationFields }); +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export const CustomerBalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'checkout_session': z.union([z.string(), CheckoutSession]).optional(), @@ -17933,6 +35007,9 @@ export const CreditNotesPretaxCreditAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string().optional(), @@ -17963,6 +35040,11 @@ export const CreditNoteRefund: z.ZodType = z.object({ 'type': z.enum(['payment_record_refund', 'refund']).optional() }); +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export const CreditNote: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_shipping': z.number().int(), @@ -18004,20 +35086,32 @@ export const CreditNote: z.ZodType = z.object({ 'voided_at': z.number().int().optional() }); +/** + * This hash contains whether the buy button is enabled. + */ export const CustomerSessionResourceComponentsResourceBuyButton: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * This hash contains the features the customer sheet supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])).optional(), 'payment_method_remove': z.enum(['disabled', 'enabled']).optional() }); +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheet: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures]).optional() }); +/** + * This hash contains the features the mobile payment element supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])).optional(), 'payment_method_redisplay': z.enum(['disabled', 'enabled']).optional(), @@ -18026,11 +35120,17 @@ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResour 'payment_method_save_allow_redisplay_override': z.enum(['always', 'limited', 'unspecified']).optional() }); +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures]).optional() }); +/** + * This hash contains the features the Payment Element supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_redisplay': z.enum(['disabled', 'enabled']), @@ -18040,15 +35140,24 @@ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeat 'payment_method_save_usage': z.enum(['off_session', 'on_session']).optional() }); +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures]).optional() }); +/** + * This hash contains whether the pricing table is enabled. + */ export const CustomerSessionResourceComponentsResourcePricingTable: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * Configuration for the components supported by this Customer Session. + */ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'buy_button': CustomerSessionResourceComponentsResourceBuyButton, 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheet, @@ -18057,6 +35166,14 @@ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'client_secret': z.string(), 'components': CustomerSessionResourceComponents.optional(), @@ -18161,6 +35278,10 @@ export const DeletedWebhookEndpoint: z.ZodType = z. 'object': z.enum(['webhook_endpoint']) }); +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const EntitlementsFeature: z.ZodType = z.object({ 'active': z.boolean(), 'id': z.string(), @@ -18171,6 +35292,9 @@ export const EntitlementsFeature: z.ZodType = z.object 'object': z.enum(['entitlements.feature']) }); +/** + * An active entitlement describes access to a feature for a customer. + */ export const EntitlementsActiveEntitlement: z.ZodType = z.object({ 'feature': z.union([z.string(), EntitlementsFeature]), 'id': z.string(), @@ -18188,6 +35312,9 @@ export const EphemeralKey: z.ZodType = z.object({ 'secret': z.string().optional() }); +/** + * An error response from the Stripe API + */ export const Error: z.ZodType = z.object({ 'error': z.lazy(() => ApiErrors) }); @@ -18202,6 +35329,26 @@ export const NotificationEventRequest: z.ZodType 'idempotency_key': z.string().optional() }); +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export const Event: z.ZodType = z.object({ 'account': z.string().optional(), 'api_version': z.string().optional(), @@ -18216,6 +35363,36 @@ export const Event: z.ZodType = z.object({ 'type': z.string() }); +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export const ExchangeRate: z.ZodType = z.object({ 'id': z.string(), 'object': z.enum(['exchange_rate']), @@ -18224,6 +35401,9 @@ export const ExchangeRate: z.ZodType = z.object({ export const ExternalAccount: z.ZodType = z.union([z.lazy(() => BankAccount), z.lazy(() => Card)]); +/** + * Describes an owner of an account. + */ export const FinancialConnectionsAccountOwner: z.ZodType = z.object({ 'email': z.string().optional(), 'id': z.string(), @@ -18235,6 +35415,9 @@ export const FinancialConnectionsAccountOwner: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -18247,6 +35430,9 @@ export const FinancialConnectionsAccountOwnership: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]).optional(), 'account_numbers': z.array(BankConnectionsResourceAccountNumberDetails).optional(), @@ -18270,6 +35456,9 @@ export const FinancialConnectionsAccount: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]).optional(), 'accounts': z.object({ @@ -18288,6 +35477,9 @@ export const FinancialConnectionsSession: z.ZodType = z.object({ 'account': z.string(), 'amount': z.number().int(), @@ -18314,28 +35506,58 @@ export const FinancialReportingFinanceReportRunRunParameters: z.ZodType = z.object({ 'destination_duration': z.number().int(), 'destination_ip_address': z.string() }); +/** + * Header data. + */ export const ForwardedRequestHeader: z.ZodType = z.object({ 'name': z.string(), 'value': z.string() }); +/** + * Details about the request forwarded to the destination endpoint. + */ export const ForwardedRequestDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'http_method': z.enum(['POST']) }); +/** + * Details about the response from the destination endpoint. + */ export const ForwardedResponseDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'status': z.number().int() }); +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export const ForwardingRequest: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -18356,6 +35578,13 @@ export const FundingInstructionsBankTransfer: z.ZodType = z.object({ 'bank_transfer': FundingInstructionsBankTransfer, 'currency': z.string(), @@ -18364,30 +35593,45 @@ export const FundingInstructions: z.ZodType = z.object 'object': z.enum(['funding_instructions']) }); +/** + * Point in Time + */ export const GelatoDataDocumentReportDateOfBirth: z.ZodType = z.object({ 'day': z.number().int().optional(), 'month': z.number().int().optional(), 'year': z.number().int().optional() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportExpirationDate: z.ZodType = z.object({ 'day': z.number().int().optional(), 'month': z.number().int().optional(), 'year': z.number().int().optional() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportIssuedDate: z.ZodType = z.object({ 'day': z.number().int().optional(), 'month': z.number().int().optional(), 'year': z.number().int().optional() }); +/** + * Point in Time + */ export const GelatoDataIdNumberReportDate: z.ZodType = z.object({ 'day': z.number().int().optional(), 'month': z.number().int().optional(), 'year': z.number().int().optional() }); +/** + * Point in Time + */ export const GelatoDataVerifiedOutputsDate: z.ZodType = z.object({ 'day': z.number().int().optional(), 'month': z.number().int().optional(), @@ -18399,6 +35643,9 @@ export const GelatoDocumentReportError: z.ZodType = z.object({ 'address': z.union([Address]).optional(), 'dob': z.union([GelatoDataDocumentReportDateOfBirth]).optional(), @@ -18422,6 +35669,9 @@ export const GelatoEmailReportError: z.ZodType = z. 'reason': z.string().optional() }); +/** + * Result from a email check + */ export const GelatoEmailReport: z.ZodType = z.object({ 'email': z.string().optional(), 'error': z.union([GelatoEmailReportError]).optional(), @@ -18433,6 +35683,9 @@ export const GelatoIdNumberReportError: z.ZodType = z.object({ 'dob': z.union([GelatoDataIdNumberReportDate]).optional(), 'error': z.union([GelatoIdNumberReportError]).optional(), @@ -18448,6 +35701,9 @@ export const GelatoPhoneReportError: z.ZodType = z. 'reason': z.string().optional() }); +/** + * Result from a phone check + */ export const GelatoPhoneReport: z.ZodType = z.object({ 'error': z.union([GelatoPhoneReportError]).optional(), 'phone': z.string().optional(), @@ -18480,6 +35736,9 @@ export const GelatoSelfieReportError: z.ZodType = 'reason': z.string().optional() }); +/** + * Result from a selfie check + */ export const GelatoSelfieReport: z.ZodType = z.object({ 'document': z.string().optional(), 'error': z.union([GelatoSelfieReportError]).optional(), @@ -18502,6 +35761,9 @@ export const GelatoSessionIdNumberOptions: z.ZodType = z.object({ 'code': z.enum(['abandoned', 'consent_declined', 'country_not_supported', 'device_not_supported', 'document_expired', 'document_type_not_supported', 'document_unverified_other', 'email_unverified_other', 'email_verification_declined', 'id_number_insufficient_document_data', 'id_number_mismatch', 'id_number_unverified_other', 'phone_unverified_other', 'phone_verification_declined', 'selfie_document_missing_photo', 'selfie_face_mismatch', 'selfie_manipulated', 'selfie_unverified_other', 'under_supported_age']).optional(), 'reason': z.string().optional() @@ -18543,6 +35805,19 @@ export const GelatoVerifiedOutputs: z.ZodType = z.ob 'unparsed_sex': z.string().optional() }); +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export const IdentityVerificationReport: z.ZodType = z.object({ 'client_reference_id': z.string().optional(), 'created': z.number().int(), @@ -18564,6 +35839,19 @@ export const VerificationSessionRedaction: z.ZodType = z.object({ 'client_reference_id': z.string().optional(), 'client_secret': z.string().optional(), @@ -18609,6 +35897,10 @@ export const InboundTransfers: z.ZodType = z.object({ 'us_bank_account': InboundTransfersPaymentMethodDetailsUsBankAccount.optional() }); +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export const InvoiceRenderingTemplate: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -18629,6 +35921,16 @@ export const ProrationDetails: z.ZodType = z.object({ 'discount_amounts': z.array(DiscountsResourceDiscountAmount) }); +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export const Invoiceitem: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -18653,6 +35955,9 @@ export const Invoiceitem: z.ZodType = z.object({ 'test_clock': z.union([z.string(), TestHelpersTestClock]).optional() }); +/** + * When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + */ export const IssuingSettlement: z.ZodType = z.object({ 'bin': z.string(), 'clearing_date': z.number().int(), @@ -18673,6 +35978,10 @@ export const IssuingSettlement: z.ZodType = z.object({ 'transaction_count': z.number().int() }); +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export const LoginLink: z.ZodType = z.object({ 'created': z.number().int(), 'object': z.enum(['login_link']), @@ -18725,6 +36034,12 @@ export const OutboundTransfersPaymentMethodDetails: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -18760,6 +36075,22 @@ export const PaymentMethodConfigResourcePaymentMethodProperties: z.ZodType = z.object({ 'acss_debit': PaymentMethodConfigResourcePaymentMethodProperties.optional(), 'active': z.boolean(), @@ -18824,15 +36155,27 @@ export const PaymentMethodConfiguration: z.ZodType = z.object({ 'error_message': z.string() }); +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export const PaymentMethodDomainResourcePaymentMethodStatus: z.ZodType = z.object({ 'status': z.enum(['active', 'inactive']), 'status_details': PaymentMethodDomainResourcePaymentMethodStatusDetails.optional() }); +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export const PaymentMethodDomain: z.ZodType = z.object({ 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatus, 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatus, @@ -18863,6 +36206,16 @@ export const TransformUsage: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Plan: z.ZodType = z.object({ 'active': z.boolean(), 'amount': z.number().int().optional(), @@ -18886,6 +36239,10 @@ export const Plan: z.ZodType = z.object({ 'usage_type': z.enum(['licensed', 'metered']) }); +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const ProductFeature: z.ZodType = z.object({ 'entitlement_feature': EntitlementsFeature, 'id': z.string(), @@ -18948,6 +36305,9 @@ export const QuotesResourceStatusTransitions: z.ZodType = z.object({ 'flexible': SubscriptionsResourceBillingModeFlexible.optional(), 'type': z.enum(['classic', 'flexible']) @@ -18967,6 +36327,10 @@ export const QuotesResourceTransferData: z.ZodType Account)]) }); +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export const Quote: z.ZodType = z.object({ 'amount_subtotal': z.number().int(), 'amount_total': z.number().int(), @@ -19010,6 +36374,12 @@ export const Quote: z.ZodType = z.object({ 'transfer_data': z.union([QuotesResourceTransferData]).optional() }); +/** + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + */ export const RadarEarlyFraudWarning: z.ZodType = z.object({ 'actionable': z.boolean(), 'charge': z.union([z.string(), z.lazy(() => Charge)]), @@ -19021,6 +36391,11 @@ export const RadarEarlyFraudWarning: z.ZodType = z. 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]).optional() }); +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueListItem: z.ZodType = z.object({ 'created': z.number().int(), 'created_by': z.string(), @@ -19031,6 +36406,11 @@ export const RadarValueListItem: z.ZodType = z.object({ 'value_list': z.string() }); +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueList: z.ZodType = z.object({ 'alias': z.string(), 'created': z.number().int(), @@ -19054,6 +36434,16 @@ export const ReceivedPaymentMethodDetailsFinancialAccount: z.ZodType = z.object({ 'created': z.number().int(), 'error': z.string().optional(), @@ -19067,6 +36457,16 @@ export const ReportingReportRun: z.ZodType = z.object({ 'succeeded_at': z.number().int().optional() }); +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export const ReportingReportType: z.ZodType = z.object({ 'data_available_end': z.number().int(), 'data_available_start': z.number().int(), @@ -19083,6 +36483,12 @@ export const SigmaScheduledQueryRunError: z.ZodType = z.object({ 'created': z.number().int(), 'data_load_time': z.number().int(), @@ -19097,6 +36503,9 @@ export const ScheduledQueryRun: z.ZodType = z.object({ 'title': z.string() }); +/** + * A saved query object represents a query that can be executed for a run. + */ export const SigmaSigmaApiQuery: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -19120,6 +36529,11 @@ export const SourceMandateNotificationSepaDebitData: z.ZodType = z.object({ 'acss_debit': SourceMandateNotificationAcssDebitData.optional(), 'amount': z.number().int().optional(), @@ -19171,6 +36585,12 @@ export const SourceTransactionSepaCreditTransferData: z.ZodType = z.object({ 'ach_credit_transfer': SourceTransactionAchCreditTransferData.optional(), 'amount': z.number().int(), @@ -19203,6 +36623,9 @@ export const TaxProductResourceTaxAssociationTransactionAttempts: z.ZodType = z.object({ 'calculation': z.string(), 'id': z.string(), @@ -19300,6 +36723,11 @@ export const TaxProductResourceTaxBreakdown: z.ZodType = z.object({ 'amount_total': z.number().int(), 'currency': z.string(), @@ -19490,6 +36918,13 @@ export const TaxProductRegistrationsResourceCountryOptions: z.ZodType = z.object({ 'active_from': z.number().int(), 'country': z.string(), @@ -19525,6 +36960,11 @@ export const TaxProductResourceTaxSettingsStatusDetails: z.ZodType = z.object({ 'defaults': TaxProductResourceTaxSettingsDefaults, 'head_office': z.union([TaxProductResourceTaxSettingsHeadOffice]).optional(), @@ -19566,6 +37006,11 @@ export const TaxProductResourceTaxTransactionShippingCost: z.ZodType = z.object({ 'created': z.number().int(), 'currency': z.string(), @@ -19661,6 +37106,10 @@ export const TerminalConfigurationConfigurationResourceWifiConfig: z.ZodType = z.object({ 'bbpos_wisepad3': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), 'bbpos_wisepos_e': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), @@ -19677,12 +37126,22 @@ export const TerminalConfiguration: z.ZodType = z.ob 'wifi': TerminalConfigurationConfigurationResourceWifiConfig.optional() }); +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalConnectionToken: z.ZodType = z.object({ 'location': z.string().optional(), 'object': z.enum(['terminal.connection_token']), 'secret': z.string() }); +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalLocation: z.ZodType = z.object({ 'address': Address, 'address_kana': LegalEntityJapanAddress.optional(), @@ -19698,15 +37157,24 @@ export const TerminalLocation: z.ZodType = z.object({ 'phone': z.string().optional() }); +/** + * Options associated with the Apple Terms and Conditions link type. + */ export const TerminalOnboardingLinkAppleTermsAndConditions: z.ZodType = z.object({ 'allow_relinking': z.boolean().optional(), 'merchant_display_name': z.string() }); +/** + * Link type options associated with the current onboarding link object. + */ export const TerminalOnboardingLinkLinkOptions: z.ZodType = z.object({ 'apple_terms_and_conditions': z.union([TerminalOnboardingLinkAppleTermsAndConditions]).optional() }); +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export const TerminalOnboardingLink: z.ZodType = z.object({ 'link_options': TerminalOnboardingLinkLinkOptions, 'link_type': z.enum(['apple_terms_and_conditions']), @@ -19715,6 +37183,9 @@ export const TerminalOnboardingLink: z.ZodType = z. 'redirect_url': z.string() }); +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'description': z.string().optional(), 'skip_button': z.string().optional(), @@ -19722,38 +37193,62 @@ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * Information about a number being collected using a reader + */ export const TerminalReaderReaderResourceNumeric: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * Information about a phone number being collected using a reader + */ export const TerminalReaderReaderResourcePhone: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * Choice to be selected on a Reader + */ export const TerminalReaderReaderResourceChoice: z.ZodType = z.object({ 'id': z.string().optional(), 'style': z.enum(['primary', 'secondary']).optional(), 'text': z.string() }); +/** + * Information about a selection being collected using a reader + */ export const TerminalReaderReaderResourceSelection: z.ZodType = z.object({ 'choices': z.array(TerminalReaderReaderResourceChoice), 'id': z.string().optional(), 'text': z.string().optional() }); +/** + * Information about a signature being collected using a reader + */ export const TerminalReaderReaderResourceSignature: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * Information about text being collected using a reader + */ export const TerminalReaderReaderResourceText: z.ZodType = z.object({ 'value': z.string().optional() }); +/** + * Information about an input's toggle + */ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'default_value': z.enum(['disabled', 'enabled']).optional(), 'description': z.string().optional(), @@ -19761,6 +37256,9 @@ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'custom_text': z.union([TerminalReaderReaderResourceCustomText]).optional(), 'email': TerminalReaderReaderResourceEmail.optional(), @@ -19775,36 +37273,57 @@ export const TerminalReaderReaderResourceInput: z.ZodType = z.object({ 'inputs': z.array(TerminalReaderReaderResourceInput), 'metadata': z.record(z.string(), z.string()).optional() }); +/** + * Represents a per-transaction tipping configuration + */ export const TerminalReaderReaderResourceTippingConfig: z.ZodType = z.object({ 'amount_eligible': z.number().int().optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceCollectConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'skip_tipping': z.boolean().optional(), 'tipping': TerminalReaderReaderResourceTippingConfig.optional() }); +/** + * Represents a reader action to collect a payment method + */ export const TerminalReaderReaderResourceCollectPaymentMethodAction: z.ZodType = z.object({ 'collect_config': TerminalReaderReaderResourceCollectConfig.optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]), 'payment_method': z.lazy(() => PaymentMethod).optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceConfirmConfig: z.ZodType = z.object({ 'return_url': z.string().optional() }); +/** + * Represents a reader action to confirm a payment + */ export const TerminalReaderReaderResourceConfirmPaymentIntentAction: z.ZodType = z.object({ 'confirm_config': TerminalReaderReaderResourceConfirmConfig.optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'return_url': z.string().optional(), @@ -19812,25 +37331,40 @@ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]), 'process_config': TerminalReaderReaderResourceProcessConfig.optional() }); +/** + * Represents a per-setup override of a reader configuration + */ export const TerminalReaderReaderResourceProcessSetupConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to process a setup intent + */ export const TerminalReaderReaderResourceProcessSetupIntentAction: z.ZodType = z.object({ 'generated_card': z.string().optional(), 'process_config': TerminalReaderReaderResourceProcessSetupConfig.optional(), 'setup_intent': z.union([z.string(), z.lazy(() => SetupIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceRefundPaymentConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to refund a payment + */ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'amount': z.number().int().optional(), 'charge': z.union([z.string(), z.lazy(() => Charge)]).optional(), @@ -19843,12 +37377,18 @@ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string(), 'quantity': z.number().int() }); +/** + * Represents a cart to be displayed on the reader + */ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'currency': z.string(), 'line_items': z.array(TerminalReaderReaderResourceLineItem), @@ -19856,11 +37396,17 @@ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'cart': z.union([TerminalReaderReaderResourceCart]).optional(), 'type': z.enum(['cart']) }); +/** + * Represents an action performed by the reader + */ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'collect_inputs': TerminalReaderReaderResourceCollectInputsAction.optional(), 'collect_payment_method': TerminalReaderReaderResourceCollectPaymentMethodAction.optional(), @@ -19875,6 +37421,11 @@ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'action': z.union([TerminalReaderReaderResourceReaderAction]).optional(), 'device_sw_version': z.string().optional(), @@ -19891,6 +37442,28 @@ export const TerminalReader: z.ZodType = z.object({ 'status': z.enum(['offline', 'online']).optional() }); +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export const Token: z.ZodType = z.object({ 'bank_account': z.lazy(() => BankAccount).optional(), 'card': z.lazy(() => Card).optional(), @@ -19907,6 +37480,9 @@ export const TreasuryReceivedCreditsResourceStatusTransitions: z.ZodType = z.object({ 'cash': z.number().int(), 'inbound_pending': z.number().int(), @@ -19921,6 +37497,9 @@ export const TreasuryReceivedDebitsResourceStatusTransitions: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -19953,6 +37532,11 @@ export const TreasuryInboundTransfersResourceInboundTransferResourceStatusTransi 'succeeded_at': z.number().int().optional() }); +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export const TreasuryInboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -20009,6 +37593,13 @@ export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDeta 'us_domestic_wire': TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export const TreasuryOutboundPayment: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -20062,6 +37653,13 @@ export const TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDe 'us_domestic_wire': TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export const TreasuryOutboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -20122,6 +37720,9 @@ export const TreasuryReceivedCreditsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -20154,6 +37755,9 @@ export const TreasuryReceivedDebitsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -20185,6 +37789,9 @@ export const TreasuryTransactionsResourceFlowDetails: z.ZodType = z.object({ 'balance_impact': TreasuryTransactionsResourceBalanceImpact, 'created': z.number().int(), @@ -20206,6 +37813,9 @@ export const TreasuryTransactionsResourceAbstractTransactionResourceStatusTransi 'void_at': z.number().int().optional() }); +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export const TreasuryTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_impact': TreasuryTransactionsResourceBalanceImpact, @@ -20229,6 +37839,9 @@ export const TreasuryTransaction: z.ZodType = z.object 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions }); +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export const TreasuryCreditReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -20246,60 +37859,94 @@ export const TreasuryCreditReversal: z.ZodType = z. 'transaction': z.union([z.string(), z.lazy(() => TreasuryTransaction)]).optional() }); +/** + * Balance information for the FinancialAccount + */ export const TreasuryFinancialAccountsResourceBalance: z.ZodType = z.object({ 'cash': z.record(z.string(), z.number().int()), 'inbound_pending': z.record(z.string(), z.number().int()), 'outbound_pending': z.record(z.string(), z.number().int()) }); +/** + * Additional details on the FinancialAccount Features information. + */ export const TreasuryFinancialAccountsResourceTogglesSettingStatusDetails: z.ZodType = z.object({ 'code': z.enum(['activating', 'capability_not_requested', 'financial_account_closed', 'rejected_other', 'rejected_unsupported_business', 'requirements_past_due', 'requirements_pending_verification', 'restricted_by_platform', 'restricted_other']), 'resolution': z.enum(['contact_stripe', 'provide_information', 'remove_restriction']).optional(), 'restriction': z.enum(['inbound_flows', 'outbound_flows']).optional() }); +/** + * Toggle settings for enabling/disabling a feature + */ export const TreasuryFinancialAccountsResourceToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export const TreasuryFinancialAccountsResourceAbaToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Settings related to Financial Addresses features on a Financial Account + */ export const TreasuryFinancialAccountsResourceFinancialAddressesFeatures: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceInboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceInboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceInboundAchToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceOutboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Settings related to Outbound Payments features on a Financial Account + */ export const TreasuryFinancialAccountsResourceOutboundPayments: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceOutboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'card_issuing': TreasuryFinancialAccountsResourceToggleSettings.optional(), 'deposit_insurance': TreasuryFinancialAccountsResourceToggleSettings.optional(), @@ -20311,6 +37958,9 @@ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'account_holder_name': z.string(), 'account_number': z.string().optional(), @@ -20319,12 +37969,18 @@ export const TreasuryFinancialAccountsResourceAbaRecord: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaRecord.optional(), 'supported_networks': z.array(z.enum(['ach', 'us_domestic_wire'])).optional(), 'type': z.enum(['aba']) }); +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export const TreasuryFinancialAccountsResourcePlatformRestrictions: z.ZodType = z.object({ 'inbound_flows': z.enum(['restricted', 'unrestricted']).optional(), 'outbound_flows': z.enum(['restricted', 'unrestricted']).optional() @@ -20338,6 +37994,10 @@ export const TreasuryFinancialAccountsResourceStatusDetails: z.ZodType = z.object({ 'active_features': z.array(z.enum(['card_issuing', 'deposit_insurance', 'financial_addresses.aba', 'financial_addresses.aba.forwarding', 'inbound_transfers.ach', 'intra_stripe_flows', 'outbound_payments.ach', 'outbound_payments.us_domestic_wire', 'outbound_transfers.ach', 'outbound_transfers.us_domestic_wire', 'remote_deposit_capture'])).optional(), 'balance': TreasuryFinancialAccountsResourceBalance, @@ -20359,6 +38019,15 @@ export const TreasuryFinancialAccount: z.ZodType 'supported_currencies': z.array(z.string()) }); +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export const WebhookEndpoint: z.ZodType = z.object({ 'api_version': z.string().optional(), 'application': z.string().optional(), diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/api.ts index b5add80..26637a2 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/api.ts @@ -13,46 +13,164 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, { 'v1': { 'account': { +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())) }, 'account_links': { +/** + * Create an account link + * + * Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountLink.parse(await json())) }, 'account_sessions': { +/** + * Create an Account Session + * + * Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountSession.parse(await json())) }, 'accounts': { +/** + * List all connected accounts + * + * Returns a list of accounts connected to your platform via [Connect](/docs/connect). If you’re not a platform, the list is empty. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * With [Connect](/docs/connect), you can create Stripe accounts for your users. + * To do this, you’ll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). + * + * If you’ve already collected information for your connected accounts, you [can prefill that information](/docs/connect/best-practices#onboarding) when + * creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. + * You can prefill any information on the account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), '$account': { +/** + * Delete an account + * + * With [Connect](/connect), you can delete accounts you manage. + * + * Test-mode accounts can be deleted at any time. + * + * Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all [balances](/api/balance/balance_object) are zero. + * + * If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedAccount.parse(await json())), +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())), +/** + * Update an account + * + * Updates a [connected account](/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + * left unchanged. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, you can update any information on the account. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, you can update all information until you create + * an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) to start Connect onboarding, + * after which some properties can no longer be updated. + * + * To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our + * [Connect](/docs/connect/updating-accounts) documentation to learn more about updating accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), 'capabilities': { +/** + * List all account capabilities + * + * Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$capability': { +/** + * Retrieve an Account Capability + * + * Retrieves information about the specified Account Capability. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Capability.parse(await json())), +/** + * Update an Account Capability + * + * Updates an existing Account Capability. Request or remove a capability by updating its `requested` parameter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Capability.parse(await json())) } }, 'external_accounts': { +/** + * List all external accounts + * + * List external accounts for an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.enum(['bank_account', 'card']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create an external account + * + * Create an external account for a given account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), '$id': { +/** + * Delete an external account + * + * Delete a specified external account for a given account. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedExternalAccount.parse(await json())), +/** + * Retrieve an external account + * + * Retrieve a specified external account for a given account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'login_links': { +/** + * Create a login link + * + * Creates a login link for a connected account to access the Express Dashboard. + * + * **You can only create login links for accounts that use the [Express Dashboard](/connect/express-dashboard) and are connected to your platform**. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LoginLink.parse(await json())) }, 'persons': { +/** + * List all persons + * + * Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), relationship: z.object({ 'authorizer': z.boolean().optional(), 'director': z.boolean().optional(), @@ -61,29 +179,73 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'owner': z.boolean().optional(), 'representative': z.boolean().optional() }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a person + * + * Creates a new person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())), '$person': { +/** + * Delete a person + * + * Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the `account_opener`. If your integration is using the `executive` parameter, you cannot delete the only verified `executive` on file. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPerson.parse(await json())), +/** + * Retrieve a person + * + * Retrieves an existing person. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Person.parse(await json())), +/** + * Update a person + * + * Updates an existing person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())) } }, 'reject': { +/** + * Reject an account + * + * With [Connect](/connect), you can reject accounts that you have flagged as suspicious. + * + * Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())) } } }, 'apple_pay': { 'domains': { +/** + * List apple pay domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an apple pay domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())), '$domain': { +/** + * Delete an apple pay domain. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedApplePayDomain.parse(await json())), +/** + * Retrieve an apple pay domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())) } } }, 'application_fees': { +/** + * List all application fees + * + * Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -93,28 +255,78 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$fee': { 'refunds': { '$id': { +/** + * Retrieve an application fee refund + * + * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FeeRefund.parse(await json())), +/** + * Update an application fee refund + * + * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, '$id': { +/** + * Retrieve an application fee + * + * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplicationFee.parse(await json())), 'refunds': { +/** + * List all application fee refunds + * + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an application fee refund + * + * Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected. + * + * You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded. + * + * Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, 'apps': { 'secrets': { +/** + * List secrets + * + * List all secrets stored on the given scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() }), starting_after: z.string().optional() }).parse), +/** + * Set a Secret + * + * Create or replace a secret in the secret store. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AppsSecret.parse(await json())), 'DELETE': f.builder().def_json(), 'find': { +/** + * Find a Secret + * + * Finds a secret in the secret store by name and scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), name: z.string(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() @@ -123,13 +335,38 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { } }, 'balance': { +/** + * Retrieve balance + * + * Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see [Accounting for negative balances](/docs/connect/account-balances#accounting-for-negative-balances). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Balance.parse(await json())) }, 'balance_settings': { +/** + * Retrieve balance settings + * + * Retrieves balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceSettings.parse(await json())), +/** + * Update balance settings + * + * Updates balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BalanceSettings.parse(await json())) }, 'balance_transactions': { +/** + * List all balance transactions + * + * Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + * + * Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -137,27 +374,69 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payout: z.string().optional(), source: z.string().optional(), starting_after: z.string().optional(), type: z.string().optional() }).parse), '$id': { +/** + * Retrieve a balance transaction + * + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path `/v1/balance/history/:id`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceTransaction.parse(await json())) } }, 'billing': { 'alerts': { +/** + * List billing alerts + * + * Lists billing active and inactive alerts + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alert_type: z.enum(['usage_threshold']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), meter: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a billing alert + * + * Creates a billing alert + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())), '$id': { +/** + * Retrieve a billing alert + * + * Retrieves a billing alert given an ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingAlert.parse(await json())), 'activate': { +/** + * Activate a billing alert + * + * Reactivates this alert, allowing it to trigger again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'archive': { +/** + * Archive a billing alert + * + * Archives this alert, removing it from the list view and APIs. This is non-reversible. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'deactivate': { +/** + * Deactivate a billing alert + * + * Deactivates this alert, preventing it from triggering. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) } } }, 'credit_balance_summary': { +/** + * Retrieve the credit balance summary for a customer + * + * Retrieves the credit balance summary for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), expand: z.array(z.string()).optional(), filter: z.object({ 'applicability_scope': z.object({ 'price_type': z.enum(['metered']).optional(), @@ -170,44 +449,129 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }) }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceSummary.parse(await json())) }, 'credit_balance_transactions': { +/** + * List credit balance transactions + * + * Retrieve a list of credit balance transactions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ credit_grant: z.string().optional(), customer: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a credit balance transaction + * + * Retrieves a credit balance transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceTransaction.parse(await json())) } }, 'credit_grants': { +/** + * List credit grants + * + * Retrieve a list of credit grants. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit grant + * + * Creates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), '$id': { +/** + * Retrieve a credit grant + * + * Retrieves a credit grant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), +/** + * Update a credit grant + * + * Updates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), 'expire': { +/** + * Expire a credit grant + * + * Expires a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) }, 'void': { +/** + * Void a credit grant + * + * Voids a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) } } }, 'meter_event_adjustments': { +/** + * Create a billing meter event adjustment + * + * Creates a billing meter event adjustment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEventAdjustment.parse(await json())) }, 'meter_events': { +/** + * Create a billing meter event + * + * Creates a billing meter event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEvent.parse(await json())) }, 'meters': { +/** + * List billing meters + * + * Retrieve a list of billing meters. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive']).optional() }).parse), +/** + * Create a billing meter + * + * Creates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), '$id': { +/** + * Retrieve a billing meter + * + * Retrieves a billing meter given an ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingMeter.parse(await json())), +/** + * Update a billing meter + * + * Updates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), 'deactivate': { +/** + * Deactivate a billing meter + * + * When a meter is deactivated, no more meter events will be accepted for this meter. You can’t attach a deactivated meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) }, 'event_summaries': { +/** + * List billing meter event summaries + * + * Retrieve a list of billing meter event summaries. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), end_time: z.number().int(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), start_time: z.number().int(), starting_after: z.string().optional(), value_grouping_window: z.enum(['day', 'hour']).optional() }).parse) }, 'reactivate': { +/** + * Reactivate a billing meter + * + * When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) } } @@ -215,37 +579,107 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'billing_portal': { 'configurations': { +/** + * List portal configurations + * + * Returns a list of configurations that describe the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a portal configuration + * + * Creates a configuration that describes the functionality and behavior of a PortalSession + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve a portal configuration + * + * Retrieves a configuration that describes the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), +/** + * Update a portal configuration + * + * Updates a configuration that describes the functionality of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())) } }, 'sessions': { +/** + * Create a portal session + * + * Creates a session of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalSession.parse(await json())) } }, 'charges': { +/** + * List all charges + * + * Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * This method is no longer recommended—use the [Payment Intents API](/docs/api/payment_intents) + * to initiate a new payment instead. Confirmation of the PaymentIntent creates the `Charge` + * object used to request payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'search': { +/** + * Search charges + * + * Search for charges you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$charge': { +/** + * Retrieve a charge + * + * Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Charge.parse(await json())), +/** + * Update a charge + * + * Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'capture': { +/** + * Capture a payment + * + * Capture the payment of an existing, uncaptured charge that was created with the `capture` option set to false. + * + * Uncaptured payments expire a set number of days after they are created ([7 by default](/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + * + * Don’t use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](/docs/api/payment_intents/capture). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())) }, 'refunds': { +/** + * List all refunds + * + * You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$refund': { +/** + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -253,6 +687,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'checkout': { 'sessions': { +/** + * List all Checkout Sessions + * + * Returns a list of Checkout Sessions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -261,14 +700,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), customer: z.string().optional(), customer_details: z.object({ 'email': z.string() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), payment_link: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['complete', 'expired', 'open']).optional(), subscription: z.string().optional() }).parse), +/** + * Create a Checkout Session + * + * Creates a Checkout Session object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), '$session': { +/** + * Retrieve a Checkout Session + * + * Retrieves a Checkout Session object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), +/** + * Update a Checkout Session + * + * Updates a Checkout Session object. + * + * Related guide: [Dynamically update Checkout](/payments/checkout/dynamic-updates) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), 'expire': { +/** + * Expire a Checkout Session + * + * A Checkout Session can be expired when it is in one of these statuses: `open` + * + * After it expires, a customer can’t complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())) }, 'line_items': { +/** + * Retrieve a Checkout Session's line items + * + * When retrieving a Checkout Session, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } @@ -276,63 +744,182 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'climate': { 'orders': { +/** + * List orders + * + * Lists all Climate order objects. The orders are returned sorted by creation date, with the + * most recently created orders appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an order + * + * Creates a Climate order object for a given Climate product. The order will be processed immediately + * after creation and payment will be deducted your Stripe balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), '$order': { +/** + * Retrieve an order + * + * Retrieves the details of a Climate order object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), +/** + * Update an order + * + * Updates the specified order by setting the values of the parameters passed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), 'cancel': { +/** + * Cancel an order + * + * Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + * reservation `amount_subtotal`, but not the `amount_fees` for user-triggered cancellations. Frontier + * might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + * provides 90 days advance notice and refunds the `amount_total`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())) } } }, 'products': { +/** + * List products + * + * Lists all available Climate product objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$product': { +/** + * Retrieve a product + * + * Retrieves the details of a Climate product with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateProduct.parse(await json())) } }, 'suppliers': { +/** + * List suppliers + * + * Lists all available Climate supplier objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$supplier': { +/** + * Retrieve a supplier + * + * Retrieves a Climate supplier object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateSupplier.parse(await json())) } } }, 'confirmation_tokens': { '$confirmation_token': { +/** + * Retrieve a ConfirmationToken + * + * Retrieves an existing ConfirmationToken object + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) } }, 'country_specs': { +/** + * List Country Specs + * + * Lists all Country Spec objects available in the API. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$country': { +/** + * Retrieve a Country Spec + * + * Returns a Country Spec for a given Country code. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CountrySpec.parse(await json())) } }, 'coupons': { +/** + * List all coupons + * + * Returns a list of your coupons. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a coupon + * + * You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. + * + * A coupon has either a `percent_off` or an `amount_off` and `currency`. If you set an `amount_off`, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an `amount_off` of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an `amount_off` of 200 is applied to it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())), '$coupon': { +/** + * Delete a coupon + * + * You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCoupon.parse(await json())), +/** + * Retrieve a coupon + * + * Retrieves the coupon with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Coupon.parse(await json())), +/** + * Update a coupon + * + * Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())) } }, 'credit_notes': { +/** + * List all credit notes + * + * Returns a list of credit notes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit note + * + * Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s `amount_remaining` (and `amount_due`), but not below zero. + * This amount is indicated by the credit note’s `pre_payment_amount`. The excess amount is indicated by `post_payment_amount`, and it can result in any combination of the following: + * + * - Refunds: create a new refund (using `refund_amount`) or link existing refunds (using `refunds`). + * + * - Customer balance credit: credit the customer’s balance (using `credit_amount`) which will be automatically applied to their next invoice when it’s finalized. + * + * - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using `out_of_band_amount`). + * + * The sum of refunds, customer balance credits, and outside of Stripe credits must equal the `post_payment_amount`. + * + * You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s `pre_payment_credit_notes_amount`, + * `post_payment_credit_notes_amount`, or both, depending on the invoice’s `amount_remaining` at the time of credit note creation. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'preview': { +/** + * Preview a credit note + * + * Get a preview of a credit note without creating it. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), expand: z.array(z.string()).optional(), invoice: z.string(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -359,6 +946,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'shipping_rate': z.string().optional() }).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'lines': { +/** + * Retrieve a credit note preview's line items + * + * When retrieving a credit note preview, you’ll get a **lines** property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string(), limit: z.number().int().optional(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -388,93 +980,268 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, '$credit_note': { 'lines': { +/** + * Retrieve a credit note's line items + * + * When retrieving a credit note, you’ll get a **lines** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } }, '$id': { +/** + * Retrieve a credit note + * + * Retrieves the credit note object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), +/** + * Update a credit note + * + * Updates an existing credit note. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'void': { +/** + * Void a credit note + * + * Marks a credit note as void. Learn more about [voiding credit notes](/docs/billing/invoices/credit-notes#voiding). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())) } } }, 'customer_sessions': { +/** + * Create a Customer Session + * + * Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerSession.parse(await json())) }, 'customers': { +/** + * List all customers + * + * Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), test_clock: z.string().optional() }).parse), +/** + * Create a customer + * + * Creates a new customer object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'search': { +/** + * Search customers + * + * Search for customers you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$customer': { +/** + * Delete a customer + * + * Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCustomer.parse(await json())), +/** + * Retrieve a customer + * + * Retrieves a Customer object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a customer + * + * Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the **source** parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the **source** parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the `past_due` state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the **default_source** for a customer will not trigger this behavior. + * + * This request accepts mostly the same arguments as the customer creation call. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'balance_transactions': { +/** + * List customer balance transactions + * + * Returns a list of transactions that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a customer balance transaction + * + * Creates an immutable transaction that updates the customer’s credit [balance](/docs/billing/customer/balance). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), '$transaction': { +/** + * Retrieve a customer balance transaction + * + * Retrieves a specific customer balance transaction that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), +/** + * Update a customer credit balance transaction + * + * Most credit balance transaction fields are immutable, but you may update its `description` and `metadata`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())) } }, 'cash_balance': { +/** + * Retrieve a cash balance + * + * Retrieves a customer’s cash balance. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CashBalance.parse(await json())), +/** + * Update a cash balance's settings + * + * Changes the settings on a customer’s cash balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CashBalance.parse(await json())) }, 'cash_balance_transactions': { +/** + * List cash balance transactions + * + * Returns a list of transactions that modified the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$transaction': { +/** + * Retrieve a cash balance transaction + * + * Retrieves a specific cash balance transaction, which updated the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } }, 'discount': { +/** + * Delete a customer discount + * + * Removes the currently applied discount on a customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())) }, 'funding_instructions': { +/** + * Create or retrieve funding instructions for a customer cash balance + * + * Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FundingInstructions.parse(await json())) }, 'payment_methods': { +/** + * List a Customer's PaymentMethods + * + * Returns a list of PaymentMethods for a given Customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ allow_redisplay: z.enum(['always', 'limited', 'unspecified']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), '$payment_method': { +/** + * Retrieve a Customer's PaymentMethod + * + * Retrieves a PaymentMethod object for a given Customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } }, 'sources': { +/** + * List sources for a specified customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a card + * + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](/docs/api#update_customer) to have a new `default_source`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentSource.parse(await json())), '$id': { +/** + * Delete a customer source + * + * Delete a specified source for a given customer. + */ 'DELETE': f.builder().def_json(), +/** + * Retrieve a specified source for a given customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentSource.parse(await json())), +/** + * Update a specified source for a given customer. + */ 'POST': f.builder().def_json(), 'verify': { +/** + * Verify a bank account + * + * Verify a specified bank account for a given customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BankAccount.parse(await json())) } } }, 'tax_ids': { +/** + * List all Customer tax IDs + * + * Returns a list of tax IDs for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Customer tax ID + * + * Creates a new `tax_id` object for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a Customer tax ID + * + * Deletes an existing `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a Customer tax ID + * + * Retrieves the `tax_id` object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } } } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of your disputes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -482,36 +1249,100 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves the dispute with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Dispute.parse(await json())), +/** + * Update a dispute + * + * When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. + * + * Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](/docs/disputes/categories). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())), 'close': { +/** + * Close a dispute + * + * Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + * + * The status of the dispute will change from `needs_response` to `lost`. *Closing a dispute is irreversible*. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())) } } }, 'entitlements': { 'active_entitlements': { +/** + * List all active entitlements + * + * Retrieve a list of active entitlements for a customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve an active entitlement + * + * Retrieve an active entitlement + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsActiveEntitlement.parse(await json())) } }, 'features': { +/** + * List all features + * + * Retrieve a list of features + */ 'GET': f.builder().def_json().def_searchparams(z.object({ archived: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_key: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a feature + * + * Creates a feature + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), '$id': { +/** + * Retrieve a feature + * + * Retrieves a feature + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), +/** + * Updates a feature + * + * Update a feature’s metadata or permanently deactivate it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())) } } }, 'ephemeral_keys': { +/** + * Create an ephemeral key + * + * Creates a short-lived API key for a given resource. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())), '$key': { +/** + * Immediately invalidate an ephemeral key + * + * Invalidates a short-lived API key for a given resource. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())) } }, 'events': { +/** + * List all events + * + * List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -519,72 +1350,178 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), delivery_success: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.string().optional(), types: z.array(z.string()).optional() }).parse), '$id': { +/** + * Retrieve an event + * + * Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Event.parse(await json())) } }, 'exchange_rates': { +/** + * List all exchange rates + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$rate_id': { +/** + * Retrieve an exchange rate + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Retrieves the exchange rates from the given currency to every supported currency. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExchangeRate.parse(await json())) } }, 'file_links': { +/** + * List all file links + * + * Returns a list of file links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), expired: z.boolean().optional(), file: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a file link + * + * Creates a new file link object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())), '$link': { +/** + * Retrieve a file link + * + * Retrieves the file link with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FileLink.parse(await json())), +/** + * Update a file link + * + * Updates an existing file link object. Expired links can no longer be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())) } }, 'files': { +/** + * List all files + * + * 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. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), purpose: z.enum(['account_requirement', 'additional_verification', 'business_icon', 'business_logo', 'customer_signature', 'dispute_evidence', 'document_provider_identity_document', 'finance_report_run', 'financial_account_statement', 'identity_document', 'identity_document_downloadable', 'issuing_regulatory_reporting', 'pci_document', 'platform_terms_of_service', 'selfie', 'sigma_scheduled_query', 'tax_document_user_upload', 'terminal_android_apk', 'terminal_reader_splashscreen']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create 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 support sending `multipart/form-data`. + */ 'POST': f.builder().def_json().def_body(z.instanceof(FormData).parse).def_response(async ({ json }) => Model.File.parse(await json())), '$file': { +/** + * Retrieve a file + * + * 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](/docs/file-upload#download-file-contents). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.File.parse(await json())) } }, 'financial_connections': { 'accounts': { +/** + * List Accounts + * + * Returns a list of Financial Connections `Account` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account_holder: z.object({ 'account': z.string().optional(), 'customer': z.string().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), session: z.string().optional(), starting_after: z.string().optional() }).parse), '$account': { +/** + * Retrieve an Account + * + * Retrieves the details of an Financial Connections `Account`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())), 'disconnect': { +/** + * Disconnect an Account + * + * Disables your access to a Financial Connections `Account`. You will no longer be able to access data associated with the account (e.g. balances, transactions). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'owners': { +/** + * List Account Owners + * + * Lists all owners for a given `Account` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), ownership: z.string(), starting_after: z.string().optional() }).parse) }, 'refresh': { +/** + * Refresh Account data + * + * Refreshes the data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'subscribe': { +/** + * Subscribe to data refreshes for an Account + * + * Subscribes to periodic refreshes of data associated with a Financial Connections `Account`. When the account status is active, data is typically refreshed once a day. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'unsubscribe': { +/** + * Unsubscribe from data refreshes for an Account + * + * Unsubscribes from periodic refreshes of data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) } } }, 'sessions': { +/** + * Create a Session + * + * To launch the Financial Connections authorization flow, create a `Session`. The session’s `client_secret` can be used to launch the flow using Stripe.js. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())), '$session': { +/** + * Retrieve a Session + * + * Retrieves the details of a Financial Connections `Session` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())) } }, 'transactions': { +/** + * List Transactions + * + * Returns a list of Financial Connections `Transaction` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transacted_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -594,26 +1531,51 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'after': z.string() }).optional() }).parse), '$transaction': { +/** + * Retrieve a Transaction + * + * Retrieves the details of a Financial Connections `Transaction` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsTransaction.parse(await json())) } } }, 'forwarding': { 'requests': { +/** + * List all ForwardingRequests + * + * Lists all ForwardingRequest objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a ForwardingRequest + * + * Creates a ForwardingRequest object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())), '$id': { +/** + * Retrieve a ForwardingRequest + * + * Retrieves a ForwardingRequest object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())) } } }, 'identity': { 'verification_reports': { +/** + * List VerificationReports + * + * List all verification reports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -621,30 +1583,102 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['document', 'id_number']).optional(), verification_session: z.string().optional() }).parse), '$report': { +/** + * Retrieve a VerificationReport + * + * Retrieves an existing VerificationReport + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationReport.parse(await json())) } }, 'verification_sessions': { +/** + * List VerificationSessions + * + * Returns a list of VerificationSessions + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), related_customer: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'processing', 'requires_input', 'verified']).optional() }).parse), +/** + * Create a VerificationSession + * + * Creates a VerificationSession object. + * + * After the VerificationSession is created, display a verification modal using the session `client_secret` or send your users to the session’s `url`. + * + * If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode. + * + * Related guide: [Verify your users’ identity documents](/docs/identity/verify-identity-documents) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), '$session': { +/** + * Retrieve a VerificationSession + * + * Retrieves the details of a VerificationSession that was previously created. + * + * When the session status is `requires_input`, you can use this method to retrieve a valid + * `client_secret` or `url` to allow re-submission. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), +/** + * Update a VerificationSession + * + * Updates a VerificationSession object. + * + * When the session status is `requires_input`, you can use this method to update the + * verification check and options. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), 'cancel': { +/** + * Cancel a VerificationSession + * + * A VerificationSession object can be canceled when it is in `requires_input` [status](/docs/identity/how-sessions-work). + * + * Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](/docs/identity/verification-sessions#cancel). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) }, 'redact': { +/** + * Redact a VerificationSession + * + * Redact a VerificationSession to remove all collected information from Stripe. This will redact + * the VerificationSession and all objects related to it, including VerificationReports, Events, + * request logs, etc. + * + * A VerificationSession object can be redacted when it is in `requires_input` or `verified` + * [status](/docs/identity/how-sessions-work). Redacting a VerificationSession in `requires_action` + * state will automatically cancel it. + * + * The redaction process may take up to four days. When the redaction process is in progress, the + * VerificationSession’s `redaction.status` field will be set to `processing`; when the process is + * finished, it will change to `redacted` and an `identity.verification_session.redacted` event + * will be emitted. + * + * Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + * fields that contain personal data will be replaced by the string `[redacted]` or a similar + * placeholder. The `metadata` field will also be erased. Redacted objects cannot be updated or + * used for any purpose. + * + * [Learn more](/docs/identity/verification-sessions#redact). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) } } } }, 'invoice_payments': { +/** + * List all payments for an invoice + * + * When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -656,36 +1690,91 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'type': z.enum(['payment_intent', 'payment_record']) }).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'open', 'paid']).optional() }).parse), '$invoice_payment': { +/** + * Retrieve an InvoicePayment + * + * Retrieves the invoice payment with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.InvoicePayment.parse(await json())) } }, 'invoice_rendering_templates': { +/** + * List all invoice rendering templates + * + * List all templates, ordered by creation date, with the most recently created template appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'archived']).optional() }).parse), '$template': { +/** + * Retrieve an invoice rendering template + * + * Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), version: z.number().int().optional() }).parse).def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())), 'archive': { +/** + * Archive an invoice rendering template + * + * Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) }, 'unarchive': { +/** + * Unarchive an invoice rendering template + * + * Unarchive an invoice rendering template so it can be used on new Stripe objects again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) } } }, 'invoiceitems': { +/** + * List all invoice items + * + * Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), pending: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an invoice item + * + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), '$invoiceitem': { +/** + * Delete an invoice item + * + * Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoiceitem.parse(await json())), +/** + * Retrieve an invoice item + * + * Retrieves the invoice item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), +/** + * Update an invoice item + * + * Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())) } }, 'invoices': { +/** + * List all invoices + * + * You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -697,54 +1786,176 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['draft', 'open', 'paid', 'uncollectible', 'void']).optional(), subscription: z.string().optional() }).parse), +/** + * Create an invoice + * + * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize](#finalize_invoice) the invoice, which allows you to [pay](#pay_invoice) or [send](#send_invoice) the invoice to your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'create_preview': { +/** + * Create a preview invoice + * + * At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + * + * You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the `subscription_details.proration_date` parameter when doing the actual subscription update. + * + * The recommended way to get only the prorations being previewed on the invoice is to consider line items where `parent.subscription_item_details.proration` is `true`. + * + * Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount. + * + * Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'search': { +/** + * Search invoices + * + * Search for invoices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$invoice': { +/** + * Delete a draft invoice + * + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](#void_invoice). + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoice.parse(await json())), +/** + * Retrieve an invoice + * + * Retrieves the invoice with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoice.parse(await json())), +/** + * Update an invoice + * + * Draft invoices are fully editable. Once an invoice is [finalized](/docs/billing/invoices/workflow#finalized), + * monetary values, as well as `collection_method`, become uneditable. + * + * If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or [automatically reconciling](/docs/billing/invoices/reconciliation) invoices, pass + * `auto_advance=false`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'add_lines': { +/** + * Bulk add invoice line items + * + * Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'attach_payment': { +/** + * Attach a payment to an Invoice + * + * Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of `payments`. + * + * For the PaymentIntent, when the PaymentIntent’s status changes to `succeeded`, the payment is credited + * to the invoice, increasing its `amount_paid`. When the invoice is fully paid, the + * invoice’s status becomes `paid`. + * + * If the PaymentIntent’s status is already `succeeded` when it’s attached, it’s + * credited to the invoice immediately. + * + * See: [Partial payments](/docs/invoicing/partial-payments) to learn more. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'finalize': { +/** + * Finalize an invoice + * + * Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'lines': { +/** + * Retrieve an invoice's line items + * + * When retrieving an invoice, you’ll get a **lines** property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$line_item_id': { +/** + * Update an invoice's line item + * + * Updates an invoice’s line item. Some fields, such as `tax_amounts`, only live on the invoice line item, + * so they can only be updated through this endpoint. Other fields, such as `amount`, live on both the invoice + * item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + * Updating an invoice’s line item is only possible before the invoice is finalized. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LineItem.parse(await json())) } }, 'mark_uncollectible': { +/** + * Mark an invoice as uncollectible + * + * Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'pay': { +/** + * Pay an invoice + * + * Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'remove_lines': { +/** + * Bulk remove invoice line items + * + * Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'send': { +/** + * Send an invoice for manual payment + * + * Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + * + * Requests made in test-mode result in no emails being sent, despite sending an `invoice.sent` event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'update_lines': { +/** + * Bulk update invoice line items + * + * Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'void': { +/** + * Void an invoice + * + * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + * + * Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to [issue another invoice](#create_invoice) or [credit note](#create_credit_note) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * List all authorizations + * + * Returns a list of Issuing `Authorization` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -752,76 +1963,198 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'expired', 'pending', 'reversed']).optional() }).parse), '$authorization': { +/** + * Retrieve an authorization + * + * Retrieves an Issuing `Authorization` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), +/** + * Update an authorization + * + * Updates the specified Issuing `Authorization` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), 'approve': { +/** + * Approve an authorization + * + * [Deprecated] Approves a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real-time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'decline': { +/** + * Decline an authorization + * + * [Deprecated] Declines a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } }, 'cardholders': { +/** + * List all cardholders + * + * Returns a list of Issuing `Cardholder` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), phone_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'blocked', 'inactive']).optional(), type: z.enum(['company', 'individual']).optional() }).parse), +/** + * Create a cardholder + * + * Creates a new Issuing `Cardholder` object that can be issued cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), '$cardholder': { +/** + * Retrieve a cardholder + * + * Retrieves an Issuing `Cardholder` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), +/** + * Update a cardholder + * + * Updates the specified Issuing `Cardholder` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())) } }, 'cards': { +/** + * List all cards + * + * Returns a list of Issuing `Card` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), exp_month: z.number().int().optional(), exp_year: z.number().int().optional(), expand: z.array(z.string()).optional(), last4: z.string().optional(), limit: z.number().int().optional(), personalization_design: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'canceled', 'inactive']).optional(), type: z.enum(['physical', 'virtual']).optional() }).parse), +/** + * Create a card + * + * Creates an Issuing `Card` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())), '$card': { +/** + * Retrieve a card + * + * Retrieves an Issuing `Card` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCard.parse(await json())), +/** + * Update a card + * + * Updates the specified Issuing `Card` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of Issuing `Dispute` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['expired', 'lost', 'submitted', 'unsubmitted', 'won']).optional(), transaction: z.string().optional() }).parse), +/** + * Create a dispute + * + * Creates an Issuing `Dispute` object. Individual pieces of evidence within the `evidence` object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves an Issuing `Dispute` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), +/** + * Update a dispute + * + * Updates the specified Issuing `Dispute` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the `evidence` object can be unset by passing in an empty string. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), 'submit': { +/** + * Submit a dispute + * + * Submits an Issuing `Dispute` to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())) } } }, 'personalization_designs': { +/** + * List all personalization designs + * + * Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_keys: z.array(z.string()).optional(), preferences: z.object({ 'is_default': z.boolean().optional(), 'is_platform_default': z.boolean().optional() }).optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'rejected', 'review']).optional() }).parse), +/** + * Create a personalization design + * + * Creates a personalization design object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), '$personalization_design': { +/** + * Retrieve a personalization design + * + * Retrieves a personalization design object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), +/** + * Update a personalization design + * + * Updates a card personalization object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } }, 'physical_bundles': { +/** + * List all physical bundles + * + * Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'review']).optional(), type: z.enum(['custom', 'standard']).optional() }).parse), '$physical_bundle': { +/** + * Retrieve a physical bundle + * + * Retrieves a physical bundle object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPhysicalBundle.parse(await json())) } }, 'tokens': { +/** + * List all issuing tokens for card + * + * Lists all Issuing `Token` objects for a given card. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -829,11 +2162,26 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'deleted', 'requested', 'suspended']).optional() }).parse), '$token': { +/** + * Retrieve an issuing token + * + * Retrieves an Issuing `Token` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingToken.parse(await json())), +/** + * Update a token status + * + * Attempts to update the specified Issuing `Token` object to the status specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingToken.parse(await json())) } }, 'transactions': { +/** + * List all transactions + * + * Returns a list of Issuing `Transaction` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -841,130 +2189,468 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['capture', 'refund']).optional() }).parse), '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves an Issuing `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())), +/** + * Update a transaction + * + * Updates the specified Issuing `Transaction` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } }, 'mandates': { '$mandate': { +/** + * Retrieve a Mandate + * + * Retrieves a Mandate object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Mandate.parse(await json())) } }, 'payment_attempt_records': { +/** + * List Payment Attempt Records + * + * List all the Payment Attempt Records attached to the specified Payment Record. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_record: z.string(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a Payment Attempt Record + * + * Retrieves a Payment Attempt Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentAttemptRecord.parse(await json())) } }, 'payment_intents': { +/** + * List all PaymentIntents + * + * Returns a list of PaymentIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a PaymentIntent + * + * Creates a PaymentIntent object. + * + * After the PaymentIntent is created, attach a payment method and [confirm](/docs/api/payment_intents/confirm) + * to continue the payment. Learn more about the available payment flows + * with the Payment Intents API. + * + * When you use `confirm=true` during creation, it’s equivalent to creating + * and confirming the PaymentIntent in the same call. You can use any parameters + * available in the [confirm API](/docs/api/payment_intents/confirm) when you supply + * `confirm=true`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'search': { +/** + * Search PaymentIntents + * + * Search for PaymentIntents you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$intent': { +/** + * Retrieve a PaymentIntent + * + * Retrieves the details of a PaymentIntent that has previously been created. + * + * You can retrieve a PaymentIntent client-side using a publishable key when the `client_secret` is in the query string. + * + * If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](#payment_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), +/** + * Update a PaymentIntent + * + * Updates properties on a PaymentIntent object without confirming. + * + * 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](/docs/api/payment_intents/confirm) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'amount_details_line_items': { +/** + * List all PaymentIntent LineItems + * + * Lists all LineItems of a given PaymentIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'apply_customer_balance': { +/** + * Reconcile a customer_balance PaymentIntent + * + * Manually reconcile the remaining amount for a `customer_balance` PaymentIntent. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'cancel': { +/** + * Cancel a PaymentIntent + * + * You can cancel a PaymentIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_action` or, [in rare cases](/docs/payments/intents), `processing`. + * + * After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a `status` of `requires_capture`, the remaining `amount_capturable` is automatically refunded. + * + * You can’t cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'capture': { +/** + * Capture a PaymentIntent + * + * Capture the funds of an existing uncaptured PaymentIntent when its status is `requires_capture`. + * + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + * + * Learn more about [separate authorization and capture](/docs/payments/capture-later). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a PaymentIntent + * + * Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment. + * + * If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If payment fails, + * the PaymentIntent transitions to the `requires_payment_method` status or the + * `canceled` status if the confirmation limit is reached. If + * payment succeeds, the PaymentIntent will transition to the `succeeded` + * status (or `requires_capture`, if `capture_method` is set to `manual`). + * + * If the `confirmation_method` is `automatic`, payment may be attempted + * using our [client SDKs](/docs/stripe-js/reference#stripe-handle-card-payment) + * and the PaymentIntent’s [client_secret](#payment_intent_object-client_secret). + * After `next_action`s are handled by the client, no additional + * confirmation is required to complete the payment. + * + * If the `confirmation_method` is `manual`, all payment attempts must be + * initiated using a secret key. + * + * If any actions are required for the payment, the PaymentIntent will + * return to the `requires_confirmation` state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. + * + * There is a variable upper limit on how many times a PaymentIntent can be confirmed. + * After this limit is reached, any further calls to this endpoint will + * transition the PaymentIntent to the `canceled` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'increment_authorization': { +/** + * Increment an authorization + * + * Perform an incremental authorization on an eligible + * [PaymentIntent](/docs/api/payment_intents/object). To be eligible, the + * PaymentIntent’s status must be `requires_capture` and + * [incremental_authorization_supported](/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + * must be `true`. + * + * Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher `amount` provided. Similar to the + * initial authorization, incremental authorizations can be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount. + * + * If the incremental authorization succeeds, the PaymentIntent object + * returns with the updated + * [amount](/docs/api/payment_intents/object#payment_intent_object-amount). + * If the incremental authorization fails, a + * [card_declined](/docs/error-codes#card-declined) error returns, and no other + * fields on the PaymentIntent or Charge update. The PaymentIntent + * object remains capturable for the previously authorized amount. + * + * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * After it’s captured, a PaymentIntent can no longer be incremented. + * + * Learn more about [incremental authorizations](/docs/terminal/features/incremental-authorizations). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a PaymentIntent + * + * Verifies microdeposits on a PaymentIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) } } }, 'payment_links': { +/** + * List all payment links + * + * Returns a list of your payment links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment link + * + * Creates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), '$payment_link': { +/** + * Retrieve payment link + * + * Retrieve a payment link. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentLink.parse(await json())), +/** + * Update a payment link + * + * Updates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), 'line_items': { +/** + * Retrieve a payment link's line items + * + * When retrieving a payment link, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'payment_method_configurations': { +/** + * List payment method configurations + * + * List payment method configurations + */ 'GET': f.builder().def_json().def_searchparams(z.object({ application: z.union([z.string(), z.enum([''])]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method configuration + * + * Creates a payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve payment method configuration + * + * Retrieve payment method configuration + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), +/** + * Update payment method configuration + * + * Update payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())) } }, 'payment_method_domains': { +/** + * List payment method domains + * + * Lists the details of existing payment method domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), enabled: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method domain + * + * Creates a payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), '$payment_method_domain': { +/** + * Retrieve a payment method domain + * + * Retrieves the details of an existing payment method domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), +/** + * Update a payment method domain + * + * Updates an existing payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), 'validate': { +/** + * Validate an existing payment method domain + * + * Some payment methods might require additional steps to register a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain. + * The payment method doesn’t appear in Elements or Embedded Checkout for this domain until it is active. + * + * To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint. + * + * Related guides: [Payment method domains](/docs/payments/payment-methods/pmd-registration). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())) } } }, 'payment_methods': { +/** + * List PaymentMethods + * + * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer’s PaymentMethods](/docs/api/payment_methods/customer_list) API instead. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), +/** + * Shares a PaymentMethod + * + * Creates a PaymentMethod object. Read the [Stripe.js reference](/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. + * + * Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents](/docs/payments/accept-a-payment) API to accept a payment immediately or the [SetupIntent](/docs/payments/save-and-reuse) API to collect payment method details ahead of a future payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), '$payment_method': { +/** + * Retrieve a PaymentMethod + * + * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer’s PaymentMethods](/docs/api/payment_methods/customer) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), +/** + * Update a PaymentMethod + * + * Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), 'attach': { +/** + * Attach a PaymentMethod to a Customer + * + * Attaches a PaymentMethod object to a Customer. + * + * To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](/docs/api/setup_intents) + * or a PaymentIntent with [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the `/v1/payment_methods/:id/attach` + * endpoint without first using a SetupIntent or PaymentIntent with `setup_future_usage` does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See [Optimizing cards for future payments](/docs/payments/payment-intents#future-usage) for more information about setting up + * future payments. + * + * To use this PaymentMethod as the default for invoice or subscription payments, + * set [`invoice_settings.default_payment_method`](/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + * on the Customer to the PaymentMethod’s ID. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) }, 'detach': { +/** + * Detach a PaymentMethod from a Customer + * + * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } } }, 'payment_records': { 'report_payment': { +/** + * Report a payment + * + * Report a new Payment Record. You may report a Payment Record as it is + * initialized and later report updates through the other report_* methods, or report Payment + * Records in a terminal state directly, through this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, '$id': { +/** + * Retrieve a Payment Record + * + * Retrieves a Payment Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentRecord.parse(await json())), 'report_payment_attempt': { +/** + * Report a payment attempt + * + * Report a new payment attempt on the specified Payment Record. A new payment + * attempt can only be specified if all other payment attempts are canceled or failed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_canceled': { +/** + * Report payment attempt canceled + * + * Report that the most recent payment attempt on the specified Payment Record + * was canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_failed': { +/** + * Report payment attempt failed + * + * Report that the most recent payment attempt on the specified Payment Record + * failed or errored. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_guaranteed': { +/** + * Report payment attempt guaranteed + * + * Report that the most recent payment attempt on the specified Payment Record + * was guaranteed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_informational': { +/** + * Report payment attempt informational + * + * Report informational updates on the specified Payment Record. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_refund': { +/** + * Report a refund + * + * Report that the most recent payment attempt on the specified Payment Record + * was refunded. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) } } }, 'payouts': { +/** + * List all payouts + * + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ arrival_date: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -976,33 +2662,94 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.string().optional() }).parse), +/** + * Create a payout + * + * To send funds to your own bank account, create a new payout object. Your [Stripe balance](#balance) must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. + * + * If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. + * + * If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](#balance_object) details available and pending amounts by source type. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), '$payout': { +/** + * Retrieve a payout + * + * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Payout.parse(await json())), +/** + * Update a payout + * + * Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), 'cancel': { +/** + * Cancel a payout + * + * You can cancel a previously created payout if its status is `pending`. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) }, 'reverse': { +/** + * Reverse a payout + * + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the `pending` status, use `/v1/payouts/:id/cancel` instead. + * + * By requesting a reversal through `/v1/payouts/:id/reverse`, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) } } }, 'plans': { +/** + * List all plans + * + * Returns a list of your plans. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), product: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a plan + * + * You can now model subscriptions more flexibly using the [Prices API](#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())), '$plan': { +/** + * Delete a plan + * + * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPlan.parse(await json())), +/** + * Retrieve a plan + * + * Retrieves the plan with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Plan.parse(await json())), +/** + * Update a plan + * + * Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())) } }, 'prices': { +/** + * List all prices + * + * Returns a list of your active prices, excluding [inline prices](/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set `active` to false. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1013,83 +2760,234 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'meter': z.string().optional(), 'usage_type': z.enum(['licensed', 'metered']).optional() }).optional(), starting_after: z.string().optional(), type: z.enum(['one_time', 'recurring']).optional() }).parse), +/** + * Create a price + * + * Creates a new [Price](https://docs.stripe.com/api/prices) for an existing [Product](https://docs.stripe.com/api/products). The Price can be recurring or one-time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())), 'search': { +/** + * Search prices + * + * Search for prices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$price': { +/** + * Retrieve a price + * + * Retrieves the price with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Price.parse(await json())), +/** + * Update a price + * + * Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())) } }, 'products': { +/** + * List all products + * + * Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), ids: z.array(z.string()).optional(), limit: z.number().int().optional(), shippable: z.boolean().optional(), starting_after: z.string().optional(), type: z.enum(['good', 'service']).optional(), url: z.string().optional() }).parse), +/** + * Create a product + * + * Creates a new product object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())), 'search': { +/** + * Search products + * + * Search for products you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$id': { +/** + * Delete a product + * + * Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with `type=good` is only possible if it has no SKUs associated with it. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProduct.parse(await json())), +/** + * Retrieve a product + * + * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Product.parse(await json())), +/** + * Update a product + * + * Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())) }, '$product': { 'features': { +/** + * List all features attached to a product + * + * Retrieve a list of features for a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Attach a feature to a product + * + * Creates a product_feature, which represents a feature attachment to a product + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ProductFeature.parse(await json())), '$id': { +/** + * Remove a feature from a product + * + * Deletes the feature attachment to a product + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProductFeature.parse(await json())), +/** + * Retrieve a product_feature + * + * Retrieves a product_feature, which represents a feature attachment to a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ProductFeature.parse(await json())) } } } }, 'promotion_codes': { +/** + * List all promotion codes + * + * Returns a list of your promotion codes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), code: z.string().optional(), coupon: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a promotion code + * + * A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())), '$promotion_code': { +/** + * Retrieve a promotion code + * + * Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing `code` use [list](/docs/api/promotion_codes/list) with the desired `code`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PromotionCode.parse(await json())), +/** + * Update a promotion code + * + * Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())) } }, 'quotes': { +/** + * List all quotes + * + * Returns a list of your quotes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['accepted', 'canceled', 'draft', 'open']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a quote + * + * A quote models prices and services for a customer. Default options for `header`, `description`, `footer`, and `expires_at` can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), '$quote': { +/** + * Retrieve a quote + * + * Retrieves the quote with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Quote.parse(await json())), +/** + * Update a quote + * + * A quote models prices and services for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), 'accept': { +/** + * Accept a quote + * + * Accepts the specified quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'cancel': { +/** + * Cancel a quote + * + * Cancels the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'computed_upfront_line_items': { +/** + * Retrieve a quote's upfront line items + * + * When retrieving a quote, there is an includable [**computed.upfront.line_items**](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'finalize': { +/** + * Finalize a quote + * + * Finalizes the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'line_items': { +/** + * Retrieve a quote's line items + * + * When retrieving a quote, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'pdf': { +/** + * Download quote PDF + * + * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse) } } }, 'radar': { 'early_fraud_warnings': { +/** + * List all early fraud warnings + * + * Returns a list of early fraud warnings. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1097,74 +2995,195 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$early_fraud_warning': { +/** + * Retrieve an early fraud warning + * + * Retrieves the details of an early fraud warning that has previously been created. + * + * Please refer to the [early fraud warning](#early_fraud_warning_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarEarlyFraudWarning.parse(await json())) } }, 'value_list_items': { +/** + * List all value list items + * + * Returns a list of `ValueListItem` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), value: z.string().optional(), value_list: z.string() }).parse), +/** + * Create a value list item + * + * Creates a new `ValueListItem` object, which is added to the specified parent value list. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())), '$item': { +/** + * Delete a value list item + * + * Deletes a `ValueListItem` object, removing it from its parent value list. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueListItem.parse(await json())), +/** + * Retrieve a value list item + * + * Retrieves a `ValueListItem` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())) } }, 'value_lists': { +/** + * List all value lists + * + * Returns a list of `ValueList` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alias: z.string().optional(), contains: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a value list + * + * Creates a new `ValueList` object, which can then be referenced in rules. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())), '$value_list': { +/** + * Delete a value list + * + * Deletes a `ValueList` object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueList.parse(await json())), +/** + * Retrieve a value list + * + * Retrieves a `ValueList` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueList.parse(await json())), +/** + * Update a value list + * + * Updates a `ValueList` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that `item_type` is immutable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())) } } }, 'refunds': { +/** + * List all refunds + * + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create customer balance refund + * + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. + * + * You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), '$refund': { +/** + * Retrieve a refund + * + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())), +/** + * Update a refund + * + * Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged. + * + * This request only accepts `metadata` as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), 'cancel': { +/** + * Cancel a refund + * + * Cancels a refund with a status of `requires_action`. + * + * You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the `requires_action` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } }, 'reporting': { 'report_runs': { +/** + * List all Report Runs + * + * Returns a list of Report Runs, with the most recent appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Report Run + * + * Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())), '$report_run': { +/** + * Retrieve a Report Run + * + * Retrieves the details of an existing Report Run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())) } }, 'report_types': { +/** + * List all Report Types + * + * Returns a full list of Report Types. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$report_type': { +/** + * Retrieve a Report Type + * + * Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportType.parse(await json())) } } }, 'reviews': { +/** + * List all open reviews + * + * Returns a list of `Review` objects that have `open` set to `true`. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1172,13 +3191,28 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$review': { +/** + * Retrieve a review + * + * Retrieves a `Review` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Review.parse(await json())), 'approve': { +/** + * Approve a review + * + * Approves a `Review` object, closing it and removing it from the list of reviews. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Review.parse(await json())) } } }, 'setup_attempts': { +/** + * List all SetupAttempts + * + * Returns a list of SetupAttempts that associate with a provided SetupIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1187,71 +3221,211 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), setup_intent: z.string(), starting_after: z.string().optional() }).parse) }, 'setup_intents': { +/** + * List all SetupIntents + * + * Returns a list of SetupIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ attach_to_self: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_method: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a SetupIntent + * + * Creates a SetupIntent object. + * + * After you create the SetupIntent, attach a payment method and [confirm](/docs/api/setup_intents/confirm) + * it to collect any required permissions to charge the payment method later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), '$intent': { +/** + * Retrieve a SetupIntent + * + * Retrieves the details of a SetupIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the `client_secret` is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](#setup_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SetupIntent.parse(await json())), +/** + * Update a SetupIntent + * + * Updates a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), 'cancel': { +/** + * Cancel a SetupIntent + * + * You can cancel a SetupIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_confirmation`, or `requires_action`. + * + * After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can’t cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a SetupIntent + * + * Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website. + * + * If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * `succeeded` status. + * + * Otherwise, it will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If setup fails, + * the SetupIntent will transition to the + * `requires_payment_method` status or the `canceled` status if the + * confirmation limit is reached. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a SetupIntent + * + * Verifies microdeposits on a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) } } }, 'shipping_rates': { +/** + * List all shipping rates + * + * Returns a list of your shipping rates. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a shipping rate + * + * Creates a new shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())), '$shipping_rate_token': { +/** + * Retrieve a shipping rate + * + * Returns the shipping rate object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ShippingRate.parse(await json())), +/** + * Update a shipping rate + * + * Updates an existing shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())) } }, 'sigma': { 'scheduled_query_runs': { +/** + * List all scheduled query runs + * + * Returns a list of scheduled query runs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$scheduled_query_run': { +/** + * Retrieve a scheduled query run + * + * Retrieves the details of an scheduled query run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ScheduledQueryRun.parse(await json())) } } }, 'sources': { +/** + * Shares a source + * + * Creates a new source object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), '$source': { +/** + * Retrieve a source + * + * Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Source.parse(await json())), +/** + * Update a source + * + * Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts the `metadata` and `owner` as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](/docs/sources) for more detail. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), 'source_transactions': { +/** + * List source transactions for a given source. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'verify': { +/** + * Verify a given source. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())) } } }, 'subscription_items': { +/** + * List all subscription items + * + * Returns a list of your subscription items for a given subscription. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), subscription: z.string() }).parse), +/** + * Create a subscription item + * + * Adds a new item to an existing subscription. No existing items will be changed or replaced. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), '$item': { +/** + * Delete a subscription item + * + * Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedSubscriptionItem.parse(await json())), +/** + * Retrieve a subscription item + * + * Retrieves the subscription item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), +/** + * Update a subscription item + * + * Updates the plan or quantity of an item on a current subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())) } }, 'subscription_schedules': { +/** + * List all schedules + * + * Retrieves the list of your subscription schedules. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ canceled_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1273,19 +3447,49 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), scheduled: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a schedule + * + * Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), '$schedule': { +/** + * Retrieve a schedule + * + * Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), +/** + * Update a schedule + * + * Updates an existing subscription schedule. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), 'cancel': { +/** + * Cancel a schedule + * + * Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is `not_started` or `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) }, 'release': { +/** + * Release a schedule + * + * Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is `not_started` or `active`. If the subscription schedule is currently associated with a subscription, releasing it will remove its `subscription` property and set the subscription’s ID to the `released_subscription` property. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) } } }, 'subscriptions': { +/** + * List subscriptions + * + * By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify `status=canceled`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ automatic_tax: z.object({ 'enabled': z.boolean() }).optional(), collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ @@ -1304,23 +3508,96 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), plan: z.string().optional(), price: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a subscription + * + * Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. + * + * When you create a subscription with `collection_method=charge_automatically`, the first invoice is finalized as part of the request. + * The `payment_behavior` parameter determines the exact behavior of the initial payment. + * + * To start subscriptions where the first invoice always begins in a `draft` status, use [subscription schedules](/docs/billing/subscriptions/subscription-schedules#managing) instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'search': { +/** + * Search subscriptions + * + * Search for subscriptions you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$subscription_exposed_id': { +/** + * Cancel a subscription + * + * Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its [metadata](/metadata). + * + * Any pending invoice items that you’ve created are still charged at the end of the period, unless manually [deleted](#delete_invoiceitem). If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if `invoice_now` and `prorate` are both set to true. + * + * By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Retrieve a subscription + * + * Retrieves the subscription with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Update a subscription + * + * Updates an existing subscription to match the specified parameters. + * When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + * To preview how the proration is calculated, use the [create preview](/docs/api/invoices/create_preview) endpoint. + * + * By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. + * + * Switching prices does not normally change the billing date or generate an immediate charge unless: + * + * - The billing interval is changed (for example, from monthly to yearly). + * + * - The subscription moves from free to paid. + * + * - A trial starts or ends. + * + * In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). + * + * If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass `create_prorations`, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually [invoice the customer](/docs/api/invoices/create). + * + * If you don’t want to prorate, set the `proration_behavior` option to `none`. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription. + * + * Updating the quantity on a subscription many times in an hour may result in [rate limiting](/docs/rate-limits). If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](/docs/billing/subscriptions/usage-based) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'discount': { +/** + * Delete a subscription discount + * + * Removes the currently applied discount on a subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())) } }, '$subscription': { 'migrate': { +/** + * Migrate a subscription + * + * Upgrade the billing_mode of an existing subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) }, 'resume': { +/** + * Resume a subscription + * + * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become `active`, and if payment fails the subscription will be `past_due`. The resumption invoice will void automatically if not paid by the expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) } } @@ -1328,130 +3605,378 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'tax': { 'associations': { 'find': { +/** + * Find a Tax Association + * + * Finds a tax association object by PaymentIntent id. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), payment_intent: z.string() }).parse).def_response(async ({ json }) => Model.TaxAssociation.parse(await json())) } }, 'calculations': { +/** + * Create a Tax Calculation + * + * Calculates tax based on the input and returns a Tax `Calculation` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), '$calculation': { +/** + * Retrieve a Tax Calculation + * + * Retrieves a Tax `Calculation` object, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), 'line_items': { +/** + * Retrieve a calculation's line items + * + * Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'registrations': { +/** + * List registrations + * + * Returns a list of Tax `Registration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'expired', 'scheduled']).optional() }).parse), +/** + * Create a registration + * + * Creates a new Tax `Registration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), '$id': { +/** + * Retrieve a registration + * + * Returns a Tax `Registration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), +/** + * Update a registration + * + * Updates an existing Tax `Registration` object. + * + * A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting `expires_at`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())) } }, 'settings': { +/** + * Retrieve settings + * + * Retrieves Tax `Settings` for a merchant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxSettings.parse(await json())), +/** + * Update settings + * + * Updates Tax `Settings` parameters used in tax calculations. All parameters are editable but none can be removed once set. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxSettings.parse(await json())) }, 'transactions': { 'create_from_calculation': { +/** + * Create a transaction from a calculation + * + * Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, 'create_reversal': { +/** + * Create a reversal transaction + * + * Partially or fully reverses a previously created `Transaction`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves a Tax `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxTransaction.parse(await json())), 'line_items': { +/** + * Retrieve a transaction's line items + * + * Retrieves the line items of a committed standalone transaction as a collection. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } } }, 'tax_codes': { +/** + * List all tax codes + * + * A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a tax code + * + * Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCode.parse(await json())) } }, 'tax_ids': { +/** + * List all tax IDs + * + * Returns a list of tax IDs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), owner: z.object({ 'account': z.string().optional(), 'customer': z.string().optional(), 'type': z.enum(['account', 'application', 'customer', 'self']) }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax ID + * + * Creates a new account or customer `tax_id` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a tax ID + * + * Deletes an existing account or customer `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a tax ID + * + * Retrieves an account or customer `tax_id` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } }, 'tax_rates': { +/** + * List all tax rates + * + * Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), inclusive: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax rate + * + * Creates a new tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())), '$tax_rate': { +/** + * Retrieve a tax rate + * + * Retrieves a tax rate with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRate.parse(await json())), +/** + * Update a tax rate + * + * Updates an existing tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())) } }, 'terminal': { 'configurations': { +/** + * List all Configurations + * + * Returns a list of `Configuration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_account_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Configuration + * + * Creates a new `Configuration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConfiguration.parse(await json())), '$configuration': { +/** + * Delete a Configuration + * + * Deletes a `Configuration` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalConfiguration.parse(await json())), +/** + * Retrieve a Configuration + * + * Retrieves a `Configuration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Configuration + * + * Updates a new `Configuration` object. + */ 'POST': f.builder().def_json() } }, 'connection_tokens': { +/** + * Create a Connection Token + * + * To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConnectionToken.parse(await json())) }, 'locations': { +/** + * List all Locations + * + * Returns a list of `Location` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Location + * + * Creates a new `Location` object. + * For further details, including which address fields are required in each country, see the [Manage locations](/docs/terminal/fleet/locations) guide. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalLocation.parse(await json())), '$location': { +/** + * Delete a Location + * + * Deletes a `Location` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalLocation.parse(await json())), +/** + * Retrieve a Location + * + * Retrieves a `Location` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Location + * + * Updates a `Location` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json() } }, 'onboarding_links': { +/** + * Create an Onboarding Link + * + * Creates a new `OnboardingLink` object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalOnboardingLink.parse(await json())) }, 'readers': { +/** + * List all Readers + * + * Returns a list of `Reader` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ device_type: z.enum(['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'verifone_P400']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), location: z.string().optional(), serial_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['offline', 'online']).optional() }).parse), +/** + * Create a Reader + * + * Creates a new `Reader` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())), '$reader': { +/** + * Delete a Reader + * + * Deletes a `Reader` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalReader.parse(await json())), +/** + * Retrieve a Reader + * + * Retrieves a `Reader` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Reader + * + * Updates a `Reader` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json(), 'cancel_action': { +/** + * Cancel the current reader action + * + * Cancels the current reader action. See [Programmatic Cancellation](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_inputs': { +/** + * Collect inputs using a Reader + * + * Initiates an [input collection flow](/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_payment_method': { +/** + * Hand off a PaymentIntent to a Reader and collect card details + * + * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'confirm_payment_intent': { +/** + * Confirm a PaymentIntent on the Reader + * + * Finalizes a payment on a Reader. See [Confirming a Payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_payment_intent': { +/** + * Hand-off a PaymentIntent to a Reader + * + * Initiates a payment flow on a Reader. See [process the payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_setup_intent': { +/** + * Hand-off a SetupIntent to a Reader + * + * Initiates a SetupIntent flow on a Reader. See [Save directly without charging](/docs/terminal/features/saving-payment-details/save-directly) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'refund_payment': { +/** + * Refund a Charge or a PaymentIntent in-person + * + * Initiates an in-person refund on a Reader. See [Refund an Interac Payment](/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'set_reader_display': { +/** + * Set reader display + * + * Sets the reader display to show [cart details](/docs/terminal/features/display). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } @@ -1459,37 +3984,82 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'test_helpers': { 'confirmation_tokens': { +/** + * Create a test Confirmation Token + * + * Creates a test mode Confirmation Token server side for your integration tests. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) }, 'customers': { '$customer': { 'fund_cash_balance': { +/** + * Fund a test mode cash balance + * + * Create an incoming testmode bank transfer + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * Create a test-mode authorization + * + * Create a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), '$authorization': { 'capture': { +/** + * Capture a test-mode authorization + * + * Capture a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'expire': { +/** + * Expire a test-mode authorization + * + * Expire a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'finalize_amount': { +/** + * Finalize a test-mode authorization's amount + * + * Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'fraud_challenges': { 'respond': { +/** + * Respond to fraud challenge + * + * Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } }, 'increment': { +/** + * Increment a test-mode authorization + * + * Increment a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'reverse': { +/** + * Reverse a test-mode authorization + * + * Reverse a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } @@ -1498,18 +4068,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$card': { 'shipping': { 'deliver': { +/** + * Deliver a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `delivered`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'fail': { +/** + * Fail a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `failure`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'return': { +/** + * Return a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `returned`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'ship': { +/** + * Ship a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `shipped`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'submit': { +/** + * Submit a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `submitted`. This method requires Stripe Version ‘2024-09-30.acacia’ or later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } } @@ -1518,25 +4113,55 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'personalization_designs': { '$personalization_design': { 'activate': { +/** + * Activate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'deactivate': { +/** + * Deactivate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `inactive`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'reject': { +/** + * Reject a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `rejected`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } } }, 'transactions': { 'create_force_capture': { +/** + * Create a test-mode force capture + * + * Allows the user to capture an arbitrary amount, also known as a forced capture. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, 'create_unlinked_refund': { +/** + * Create a test-mode unlinked refund + * + * Allows the user to refund an arbitrary amount, also known as a unlinked refund. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, '$transaction': { 'refund': { +/** + * Refund a test-mode transaction + * + * Refund a test-mode Transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } @@ -1545,6 +4170,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'refunds': { '$refund': { 'expire': { +/** + * Expire a pending refund. + * + * Expire a refund with a status of `requires_action`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -1553,24 +4183,64 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'readers': { '$reader': { 'present_payment_method': { +/** + * Simulate presenting a payment method + * + * Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'succeed_input_collection': { +/** + * Simulate a successful input collection + * + * Use this endpoint to trigger a successful input collection on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'timeout_input_collection': { +/** + * Simulate an input collection timeout + * + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } } }, 'test_clocks': { +/** + * List all test clocks + * + * Returns a list of your test clocks. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a test clock + * + * Creates a new test clock that can be attached to new customers and quotes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), '$test_clock': { +/** + * Delete a test clock + * + * Deletes a test clock. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTestHelpersTestClock.parse(await json())), +/** + * Retrieve a test clock + * + * Retrieves a test clock. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), 'advance': { +/** + * Advance a test clock + * + * Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to `Ready`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())) } } @@ -1579,53 +4249,124 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'inbound_transfers': { '$id': { 'fail': { +/** + * Test mode: Fail an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `failed` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an InboundTransfer + * + * Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the `succeeded` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'succeed': { +/** + * Test mode: Succeed an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `succeeded` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { '$id': { +/** + * Test mode: Update an OutboundPayment + * + * Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `failed` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `returned` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { '$outbound_transfer': { +/** + * Test mode: Update an OutboundTransfer + * + * Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `failed` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `returned` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * Test mode: Create a ReceivedCredit + * + * Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) }, 'received_debits': { +/** + * Test mode: Create a ReceivedDebit + * + * Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } } }, 'tokens': { +/** + * Create a CVC update token + * + * Creates a single-use token that represents a bank account’s details. + * You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](#accounts) where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Token.parse(await json())), '$token': { +/** + * Retrieve a token + * + * Retrieves the token with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Token.parse(await json())) } }, 'topups': { +/** + * List all top-ups + * + * Returns a list of top-ups. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1637,35 +4378,103 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'pending', 'succeeded']).optional() }).parse), +/** + * Create a top-up + * + * Top up the balance of an account + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), '$topup': { +/** + * Retrieve a top-up + * + * Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Topup.parse(await json())), +/** + * Update a top-up + * + * Updates the metadata of a top-up. Other top-up details are not editable by design. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), 'cancel': { +/** + * Cancel a top-up + * + * Cancels a top-up. Only pending top-ups can be canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())) } } }, 'transfers': { +/** + * List all transfers + * + * Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * Create a transfer + * + * To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](#balance) must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), '$id': { 'reversals': { +/** + * List all reversals + * + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional reversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a transfer reversal + * + * When you create a new reversal, you must specify a transfer to create it on. + * + * When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. + * + * Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } }, '$transfer': { +/** + * Retrieve a transfer + * + * Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Transfer.parse(await json())), +/** + * Update a transfer + * + * Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts only metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), 'reversals': { '$id': { +/** + * Retrieve a reversal + * + * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TransferReversal.parse(await json())), +/** + * Update a reversal + * + * Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata and description as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } } @@ -1673,91 +4482,241 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'treasury': { 'credit_reversals': { +/** + * List all CreditReversals + * + * Returns a list of CreditReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_credit: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'posted', 'processing']).optional() }).parse), +/** + * Create a CreditReversal + * + * Reverses a ReceivedCredit and creates a CreditReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())), '$credit_reversal': { +/** + * Retrieve a CreditReversal + * + * Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())) } }, 'debit_reversals': { +/** + * List all DebitReversals + * + * Returns a list of DebitReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_debit: z.string().optional(), resolution: z.enum(['lost', 'won']).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'completed', 'processing']).optional() }).parse), +/** + * Create a DebitReversal + * + * Reverses a ReceivedDebit and creates a DebitReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())), '$debit_reversal': { +/** + * Retrieve a DebitReversal + * + * Retrieves a DebitReversal object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())) } }, 'financial_accounts': { +/** + * List all FinancialAccounts + * + * Returns a list of FinancialAccounts. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'open']).optional() }).parse), +/** + * Create a FinancialAccount + * + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), '$financial_account': { +/** + * Retrieve a FinancialAccount + * + * Retrieves the details of a FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), +/** + * Update a FinancialAccount + * + * Updates the details of a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), 'close': { +/** + * Close a FinancialAccount + * + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())) }, 'features': { +/** + * Retrieve FinancialAccount Features + * + * Retrieves Features information associated with the FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())), +/** + * Update FinancialAccount Features + * + * Updates the Features associated with a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())) } } }, 'inbound_transfers': { +/** + * List all InboundTransfers + * + * Returns a list of InboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'processing', 'succeeded']).optional() }).parse), +/** + * Create an InboundTransfer + * + * Creates an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())), '$id': { +/** + * Retrieve an InboundTransfer + * + * Retrieves the details of an existing InboundTransfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, '$inbound_transfer': { 'cancel': { +/** + * Cancel an InboundTransfer + * + * Cancels an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { +/** + * List all OutboundPayments + * + * Returns a list of OutboundPayments sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundPayment + * + * Creates an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), '$id': { +/** + * Retrieve an OutboundPayment + * + * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'cancel': { +/** + * Cancel an OutboundPayment + * + * Cancel an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { +/** + * List all OutboundTransfers + * + * Returns a list of OutboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundTransfer + * + * Creates an OutboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), '$outbound_transfer': { +/** + * Retrieve an OutboundTransfer + * + * Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'cancel': { +/** + * Cancel an OutboundTransfer + * + * An OutboundTransfer can be canceled if the funds have not yet been paid out. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * List all ReceivedCredits + * + * Returns a list of ReceivedCredits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), linked_flows: z.object({ 'source_flow_type': z.enum(['credit_reversal', 'other', 'outbound_payment', 'outbound_transfer', 'payout']) }).optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedCredit + * + * Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) } }, 'received_debits': { +/** + * List all ReceivedDebits + * + * Returns a list of ReceivedDebits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedDebit + * + * Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } }, 'transaction_entries': { +/** + * List all TransactionEntries + * + * Retrieves a list of TransactionEntry objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1770,10 +4729,20 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), order_by: z.enum(['created', 'effective_at']).optional(), starting_after: z.string().optional(), transaction: z.string().optional() }).parse), '$id': { +/** + * Retrieve a TransactionEntry + * + * Retrieves a TransactionEntry object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransactionEntry.parse(await json())) } }, 'transactions': { +/** + * List all Transactions + * + * Retrieves a list of Transaction objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1788,16 +4757,46 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional() }).optional() }).parse), '$id': { +/** + * Retrieve a Transaction + * + * Retrieves the details of an existing Transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransaction.parse(await json())) } } }, 'webhook_endpoints': { +/** + * List all webhook endpoints + * + * Returns a list of your webhook endpoints. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a webhook endpoint + * + * A webhook endpoint must have a `url` and a list of `enabled_events`. You may optionally specify the Boolean `connect` parameter. If set to true, then a Connect webhook endpoint that notifies the specified `url` about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified `url` only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), '$webhook_endpoint': { +/** + * Delete a webhook endpoint + * + * You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedWebhookEndpoint.parse(await json())), +/** + * Retrieve a webhook endpoint + * + * Retrieves the webhook endpoint with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), +/** + * Update a webhook endpoint + * + * Updates the webhook endpoint. You may edit the `url`, the list of `enabled_events`, and the status of your endpoint. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/models.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/models.ts index 2ec6a58..b5623dc 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/models.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_2/models.ts @@ -3,174 +3,575 @@ import { z } from 'zod'; // Helper types for schemas export type AccountAnnualRevenueModel = { + /** + * A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount': number; + /** + * 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; + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + */ 'fiscal_year_end': string; }; export type AccountMonthlyEstimatedRevenueModel = { + /** + * A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount': number; + /** + * 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; }; export type AddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; export type AccountBusinessProfileModel = { + /** + * The applicant's gross annual revenue for its preceding fiscal year. + */ 'annual_revenue'?: AccountAnnualRevenueModel | undefined; + /** + * An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + */ 'estimated_worker_count'?: number | undefined; + /** + * [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + */ 'mcc': string; + /** + * Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. + */ 'minority_owned_business_designation': Array<'lgbtqi_owned_business' | 'minority_owned_business' | 'none_of_these_apply' | 'prefer_not_to_answer' | 'women_owned_business'>; 'monthly_estimated_revenue'?: AccountMonthlyEstimatedRevenueModel | undefined; + /** + * The customer-facing business name. + */ 'name': string; + /** + * Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + */ 'product_description'?: string | undefined; + /** + * A publicly available mailing address for sending support issues to. + */ 'support_address': AddressModel; + /** + * A publicly available email address for sending support issues to. + */ 'support_email': string; + /** + * A publicly available phone number to call with support issues. + */ 'support_phone': string; + /** + * A publicly available website for handling support issues. + */ 'support_url': string; + /** + * The business's publicly available website. + */ 'url': string; }; export type AccountCapabilitiesModel = { + /** + * The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + */ 'acss_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + */ 'affirm_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + */ 'afterpay_clearpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Alma capability of the account, or whether the account can directly process Alma payments. + */ 'alma_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + */ 'amazon_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + */ 'au_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + */ 'bacs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + */ 'bancontact_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + */ 'bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Billie capability of the account, or whether the account can directly process Billie payments. + */ 'billie_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the blik payments capability of the account, or whether the account can directly process blik charges. + */ 'blik_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + */ 'boleto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + */ 'card_issuing'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + */ 'card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + */ 'cartes_bancaires_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + */ 'cashapp_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + */ 'crypto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + */ 'eps_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + */ 'fpx_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + */ 'gb_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + */ 'giropay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + */ 'grabpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + */ 'ideal_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + */ 'india_international_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + */ 'jcb_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + */ 'jp_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + */ 'kakao_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + */ 'klarna_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + */ 'konbini_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + */ 'kr_card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the legacy payments capability of the account. + */ 'legacy_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the link_payments capability of the account, or whether the account can directly process Link charges. + */ 'link_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. + */ 'mb_way_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + */ 'mobilepay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + */ 'multibanco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + */ 'mx_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + */ 'naver_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges. + */ 'nz_bank_account_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + */ 'oxxo_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + */ 'p24_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges. + */ 'pay_by_bank_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Payco capability of the account, or whether the account can directly process Payco payments. + */ 'payco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + */ 'paynow_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pix payments capability of the account, or whether the account can directly process pix charges. + */ 'pix_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + */ 'promptpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + */ 'revolut_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + */ 'samsung_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Satispay capability of the account, or whether the account can directly process Satispay payments. + */ 'satispay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + */ 'sepa_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + */ 'sepa_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + */ 'sofort_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Swish capability of the account, or whether the account can directly process Swish payments. + */ 'swish_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-K (US) capability of the account. + */ 'tax_reporting_us_1099_k'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-MISC (US) capability of the account. + */ 'tax_reporting_us_1099_misc'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + */ 'transfers'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the banking capability, or whether the account can have bank accounts. + */ 'treasury'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + */ 'twint_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + */ 'us_bank_account_ach_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + */ 'us_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Zip capability of the account, or whether the account can directly process Zip charges. + */ 'zip_payments'?: 'active' | 'inactive' | 'pending' | undefined; }; export type LegalEntityJapanAddressModel = { + /** + * City/Ward. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Block/Building number. + */ 'line1': string; + /** + * Building details. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * Prefecture. + */ 'state': string; + /** + * Town/cho-me. + */ 'town': string; }; export type LegalEntityDirectorshipDeclarationModel = { + /** + * The Unix timestamp marking when the directorship declaration attestation was made. + */ 'date': number; + /** + * The IP address from which the directorship declaration attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the directorship declaration attestation was made. + */ 'user_agent': string; }; export type LegalEntityUboDeclarationModel = { + /** + * The Unix timestamp marking when the beneficial owner attestation was made. + */ 'date': number; + /** + * The IP address from which the beneficial owner attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the beneficial owner attestation was made. + */ 'user_agent': string; }; export type LegalEntityRegistrationDateModel = { + /** + * The day of registration, between 1 and 31. + */ 'day': number; + /** + * The month of registration, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of registration. + */ 'year': number; }; export type LegalEntityRepresentativeDeclarationModel = { + /** + * The Unix timestamp marking when the representative declaration attestation was made. + */ 'date': number; + /** + * The IP address from which the representative declaration attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the representative declaration attestation was made. + */ 'user_agent': string; }; +/** + * To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that you can use to + * retrieve the contents of the file without authentication. + */ export type FileLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Returns if the link is already expired. + */ 'expired': boolean; + /** + * Time that the link expires. + */ 'expires_at': number; + /** + * The file object this link points to. + */ 'file': string | FileModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file_link'; + /** + * The publicly accessible URL to download the file. + */ 'url': string; }; +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export type FileModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The file expires and isn't available at this time in epoch seconds. + */ 'expires_at': number; + /** + * The suitable name for saving the file to a filesystem. + */ 'filename': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ 'links'?: { + /** + * Details about each object. + */ 'data': FileLinkModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file'; + /** + * The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + */ 'purpose': 'account_requirement' | 'additional_verification' | 'business_icon' | 'business_logo' | 'customer_signature' | 'dispute_evidence' | 'document_provider_identity_document' | 'finance_report_run' | 'financial_account_statement' | 'identity_document' | 'identity_document_downloadable' | 'issuing_regulatory_reporting' | 'pci_document' | 'platform_terms_of_service' | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' | 'terminal_android_apk' | 'terminal_reader_splashscreen'; + /** + * The size of the file object in bytes. + */ 'size': number; + /** + * A suitable title for the document. + */ 'title': string; + /** + * The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + */ 'type': string; + /** + * Use your live secret API key to download the file from this URL. + */ 'url': string; }; export type LegalEntityCompanyVerificationDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'back': string | FileModel; + /** + * A user-displayable string describing the verification state of this document. + */ 'details': string; + /** + * One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + */ 'details_code': string; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'front': string | FileModel; }; @@ -180,111 +581,327 @@ export type LegalEntityCompanyVerificationModel = { export type LegalEntityCompanyModel = { 'address'?: AddressModel | undefined; + /** + * The Kana variation of the company's primary address (Japan only). + */ 'address_kana'?: LegalEntityJapanAddressModel | undefined; + /** + * The Kanji variation of the company's primary address (Japan only). + */ 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + */ 'directors_provided'?: boolean | undefined; + /** + * This hash is used to attest that the director information provided to Stripe is both current and correct. + */ 'directorship_declaration'?: LegalEntityDirectorshipDeclarationModel | undefined; + /** + * Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + */ 'executives_provided'?: boolean | undefined; + /** + * The export license ID number of the company, also referred as Import Export Code (India only). + */ 'export_license_id'?: string | undefined; + /** + * The purpose code to use for export transactions (India only). + */ 'export_purpose_code'?: string | undefined; + /** + * The company's legal name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name'?: string | undefined; + /** + * The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kana'?: string | undefined; + /** + * The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kanji'?: string | undefined; + /** + * Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + */ 'owners_provided'?: boolean | undefined; + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + */ 'ownership_declaration'?: LegalEntityUboDeclarationModel | undefined; + /** + * This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + */ 'ownership_exemption_reason'?: 'qualified_entity_exceeds_ownership_threshold' | 'qualifies_as_financial_institution' | undefined; + /** + * The company's phone number (used for verification). + */ 'phone'?: string | undefined; 'registration_date'?: LegalEntityRegistrationDateModel | undefined; + /** + * This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + */ 'representative_declaration'?: LegalEntityRepresentativeDeclarationModel | undefined; + /** + * The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + */ 'structure'?: 'free_zone_establishment' | 'free_zone_llc' | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' | 'private_company' | 'private_corporation' | 'private_partnership' | 'public_company' | 'public_corporation' | 'public_partnership' | 'registered_charity' | 'single_member_llc' | 'sole_establishment' | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' | 'unincorporated_non_profit' | 'unincorporated_partnership' | undefined; + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided'?: boolean | undefined; + /** + * The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + */ 'tax_id_registrar'?: string | undefined; + /** + * Whether the company's business VAT number was provided. + */ 'vat_id_provided'?: boolean | undefined; + /** + * Information on the verification state of the company. + */ 'verification'?: LegalEntityCompanyVerificationModel | undefined; }; export type AccountUnificationAccountControllerFeesModel = { + /** + * A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + */ 'payer': 'account' | 'application' | 'application_custom' | 'application_express'; }; export type AccountUnificationAccountControllerLossesModel = { + /** + * A value indicating who is liable when this account can't pay back negative balances from payments. + */ 'payments': 'application' | 'stripe'; }; export type AccountUnificationAccountControllerStripeDashboardModel = { + /** + * A value indicating the Stripe dashboard this account has access to independent of the Connect application. + */ 'type': 'express' | 'full' | 'none'; }; export type AccountUnificationAccountControllerModel = { 'fees'?: AccountUnificationAccountControllerFeesModel | undefined; + /** + * `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + */ 'is_controller'?: boolean | undefined; 'losses'?: AccountUnificationAccountControllerLossesModel | undefined; + /** + * A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + */ 'requirement_collection'?: 'application' | 'stripe' | undefined; 'stripe_dashboard'?: AccountUnificationAccountControllerStripeDashboardModel | undefined; + /** + * The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + */ 'type': 'account' | 'application'; }; export type CustomerBalanceCustomerBalanceSettingsModel = { + /** + * The configuration for how funds that land in the customer cash balance are reconciled. + */ 'reconciliation_mode': 'automatic' | 'manual'; + /** + * A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + */ 'using_merchant_default': boolean; }; +/** + * A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ export type CashBalanceModel = { + /** + * A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'available': { [key: string]: number; }; + /** + * The ID of the customer whose cash balance this object represents. + */ 'customer': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'cash_balance'; 'settings': CustomerBalanceCustomerBalanceSettingsModel; }; export type DeletedCustomerModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; }; export type TokenCardNetworksModel = { + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred': string; }; +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export type CardModel = { 'account'?: string | AccountModel | undefined; + /** + * City/District/Suburb/Town/Village. + */ 'address_city': string; + /** + * Billing address country, if provided when creating card. + */ 'address_country': string; + /** + * Address line 1 (Street address/PO Box/Company name). + */ 'address_line1': string; + /** + * If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * Address line 2 (Apartment/Suite/Unit/Building). + */ 'address_line2': string; + /** + * State/County/Province/Region. + */ 'address_state': string; + /** + * ZIP or postal code. + */ 'address_zip': string; + /** + * If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_zip_check': string; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; + /** + * A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Card brand. Can be `American Express`, `Cartes Bancaires`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + */ 'brand': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'currency'?: string | undefined; + /** + * The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + */ 'cvc_check': string; + /** + * Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'default_for_currency'?: boolean | undefined; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * 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': { [key: string]: string; }; + /** + * Cardholder name. + */ 'name': string; 'networks'?: TokenCardNetworksModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. + */ 'status'?: string | undefined; + /** + * If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + */ 'tokenization_method': string; }; @@ -392,7 +1009,13 @@ export type SourceTypeCardPresentModel = { }; export type SourceCodeVerificationFlowModel = { + /** + * The number of attempts remaining to authenticate the source object with a verification code. + */ 'attempts_remaining': number; + /** + * The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + */ 'status': string; }; @@ -458,13 +1081,37 @@ export type SourceTypeMultibancoModel = { }; export type SourceOwnerModel = { + /** + * Owner's address. + */ 'address': AddressModel; + /** + * Owner's email address. + */ 'email': string; + /** + * Owner's full name. + */ 'name': string; + /** + * Owner's phone number (including extension). + */ 'phone': string; + /** + * Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_address': AddressModel; + /** + * Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email': string; + /** + * Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; + /** + * Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_phone': string; }; @@ -473,18 +1120,48 @@ export type SourceTypeP24Model = { }; export type SourceReceiverFlowModel = { + /** + * The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + */ 'address': string; + /** + * The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + */ 'amount_charged': number; + /** + * The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + */ 'amount_received': number; + /** + * The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + */ 'amount_returned': number; + /** + * Type of refund attribute method, one of `email`, `manual`, or `none`. + */ 'refund_attributes_method': string; + /** + * Type of refund attribute status, one of `missing`, `requested`, or `available`. + */ 'refund_attributes_status': string; }; export type SourceRedirectFlowModel = { + /** + * The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + */ 'failure_reason': string; + /** + * The URL you provide to redirect the customer to after they authenticated their payment. + */ 'return_url': string; + /** + * The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (successful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + */ 'status': string; + /** + * The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + */ 'url': string; }; @@ -523,26 +1200,68 @@ export type SourceTypeSofortModel = { }; export type SourceOrderItemModel = { + /** + * The amount (price) for this order item. + */ 'amount': number; + /** + * This currency of this order item. Required when `amount` is present. + */ 'currency': string; + /** + * Human-readable description for this order item. + */ 'description': string; + /** + * The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + */ 'parent': string; + /** + * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + */ 'quantity'?: number | undefined; + /** + * The type of this order item. Must be `sku`, `tax`, or `shipping`. + */ 'type': string; }; export type ShippingModel = { 'address'?: AddressModel | undefined; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ 'carrier'?: string | undefined; + /** + * Recipient name. + */ 'name'?: string | undefined; + /** + * Recipient phone (including extension). + */ 'phone'?: string | undefined; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'tracking_number'?: string | undefined; }; export type SourceOrderModel = { + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + */ 'amount': number; + /** + * 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; + /** + * The email address of the customer placing the order. + */ 'email'?: string | undefined; + /** + * List of items constituting the order. + */ 'items': SourceOrderItemModel[]; 'shipping'?: ShippingModel | undefined; }; @@ -576,34 +1295,82 @@ export type SourceTypeWechatModel = { 'statement_descriptor'?: string | undefined; }; +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export type SourceModel = { 'ach_credit_transfer'?: SourceTypeAchCreditTransferModel | undefined; 'ach_debit'?: SourceTypeAchDebitModel | undefined; 'acss_debit'?: SourceTypeAcssDebitModel | undefined; 'alipay'?: SourceTypeAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay': 'always' | 'limited' | 'unspecified'; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'amount': number; 'au_becs_debit'?: SourceTypeAuBecsDebitModel | undefined; 'bancontact'?: SourceTypeBancontactModel | undefined; 'card'?: SourceTypeCardModel | undefined; 'card_present'?: SourceTypeCardPresentModel | undefined; + /** + * The client secret of the source. Used for client-side retrieval using a publishable key. + */ 'client_secret': string; 'code_verification'?: SourceCodeVerificationFlowModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'currency': string; + /** + * The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + */ 'customer'?: string | undefined; 'eps'?: SourceTypeEpsModel | undefined; + /** + * The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + */ 'flow': string; 'giropay'?: SourceTypeGiropayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: SourceTypeIdealModel | undefined; 'klarna'?: SourceTypeKlarnaModel | undefined; + /** + * 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': { [key: string]: string; }; 'multibanco'?: SourceTypeMultibancoModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source'; + /** + * Information about the owner of the payment instrument that may be used or required by particular source types. + */ 'owner': SourceOwnerModel; 'p24'?: SourceTypeP24Model | undefined; 'receiver'?: SourceReceiverFlowModel | undefined; @@ -612,10 +1379,22 @@ export type SourceModel = { 'sepa_debit'?: SourceTypeSepaDebitModel | undefined; 'sofort'?: SourceTypeSofortModel | undefined; 'source_order'?: SourceOrderModel | undefined; + /** + * Extra information about a source. This will appear on your customer's statement every time you charge the source. + */ 'statement_descriptor': string; + /** + * The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + */ 'status': string; 'three_d_secure'?: SourceTypeThreeDSecureModel | undefined; + /** + * The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'alipay' | 'au_becs_debit' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; + /** + * Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + */ 'usage': string; 'wechat'?: SourceTypeWechatModel | undefined; }; @@ -623,103 +1402,289 @@ export type SourceModel = { export type PaymentSourceModel = AccountModel | BankAccountModel | CardModel | SourceModel; export type CouponAppliesToModel = { + /** + * A list of product IDs this coupon applies to + */ 'products': string[]; }; export type CouponCurrencyOptionModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off': number; }; +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export type CouponModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off': number; 'applies_to'?: CouponAppliesToModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + */ 'currency': string; + /** + * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CouponCurrencyOptionModel; } | undefined; + /** + * One of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount. + */ 'duration': 'forever' | 'once' | 'repeating'; + /** + * If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + */ 'duration_in_months': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + */ 'max_redemptions': number; + /** + * 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': { [key: string]: string; }; + /** + * Name of the coupon displayed to customers on for instance invoices or receipts. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; + /** + * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + */ 'percent_off': number; + /** + * Date after which the coupon can no longer be redeemed. + */ 'redeem_by': number; + /** + * Number of times this coupon has been applied to a customer. + */ 'times_redeemed': number; + /** + * Taking account of the above properties, whether this coupon can still be applied to a customer. + */ 'valid': boolean; }; export type PromotionCodesResourcePromotionModel = { + /** + * If promotion `type` is `coupon`, the coupon for this promotion. + */ 'coupon': string | CouponModel; + /** + * The type of promotion. + */ 'type': 'coupon'; }; export type PromotionCodeCurrencyOptionModel = { + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount': number; }; export type PromotionCodesResourceRestrictionsModel = { + /** + * Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: PromotionCodeCurrencyOptionModel; } | undefined; + /** + * A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + */ 'first_time_transaction': boolean; + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount': number; + /** + * Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + */ 'minimum_amount_currency': string; }; +/** + * A Promotion Code represents a customer-redeemable code for an underlying promotion. + * You can create multiple codes for a single promotion. + * + * If you enable promotion codes in your [customer portal configuration](https://stripe.com/docs/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal. + * Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal. + */ export type PromotionCodeModel = { + /** + * Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + */ 'active': boolean; + /** + * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + */ 'code': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The customer that this promotion code can be used by. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Date at which the promotion code can no longer be redeemed. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this promotion code can be redeemed. + */ 'max_redemptions': number; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'promotion_code'; 'promotion': PromotionCodesResourcePromotionModel; 'restrictions': PromotionCodesResourceRestrictionsModel; + /** + * Number of times this promotion code has been used. + */ 'times_redeemed': number; }; export type DiscountSourceModel = { + /** + * The coupon that was redeemed to create this discount. + */ 'coupon': string | CouponModel; + /** + * The source type of the discount. + */ 'type': 'coupon'; }; +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export type DiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session': string; + /** + * The ID of the customer associated with this discount. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + */ 'end': number; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice': string; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code': string | PromotionCodeModel; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription': string; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item': string; }; export type InvoiceSettingCustomFieldModel = { + /** + * The name of the custom field. + */ 'name': string; + /** + * The value of the custom field. + */ 'value': string; }; export type PaymentMethodAcssDebitModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Institution number of the bank account. + */ 'institution_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Transit number of the bank account. + */ 'transit_number': string; }; @@ -744,14 +1709,32 @@ export type PaymentMethodAmazonPayModel = { }; export type PaymentMethodAuBecsDebitModel = { + /** + * Six-digit number identifying bank and branch associated with this bank account. + */ 'bsb_number': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; }; export type PaymentMethodBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code': string; }; @@ -764,10 +1747,25 @@ export type PaymentMethodBillieModel = { }; export type BillingDetailsModel = { + /** + * Billing address. + */ 'address': AddressModel; + /** + * Email address. + */ 'email': string; + /** + * Full name. + */ 'name': string; + /** + * Billing phone number (including extension). + */ 'phone': string; + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + */ 'tax_id': string; }; @@ -776,72 +1774,206 @@ export type PaymentMethodBlikModel = { }; export type PaymentMethodBoletoModel = { + /** + * Uniquely identifies the customer tax id (CNPJ or CPF) + */ 'tax_id': string; }; export type PaymentMethodCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type PaymentMethodDetailsCardPresentOfflineModel = { + /** + * Time at which the payment was collected while offline + */ 'stored_at': number; + /** + * The method used to process this payment method offline. Only deferred is allowed. + */ 'type': 'deferred'; }; export type PaymentMethodDetailsCardPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'credit' | 'prepaid' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram': string; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name': string; + /** + * Identifier for this transaction. + */ 'authorization_code': string; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code': string; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method': string; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name': string; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results': string; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information': string; }; export type PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel = { + /** + * The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + */ 'type': 'apple_pay' | 'google_pay' | 'samsung_pay' | 'unknown'; }; export type PaymentMethodDetailsCardPresentModel = { + /** + * The authorized amount + */ 'amount_authorized': number; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product': string; + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ 'incremental_authorization_supported': boolean; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * Details about payments collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; + /** + * Defines whether the authorized amount can be over-captured or not + */ 'overcapture_supported': boolean; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt': PaymentMethodDetailsCardPresentReceiptModel; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type CardGeneratedFromPaymentMethodDetailsModel = { 'card_present'?: PaymentMethodDetailsCardPresentModel | undefined; + /** + * The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + */ 'type': string; }; export type ApplicationModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; @@ -866,14 +1998,26 @@ export type OfflineAcceptanceModel = { }; export type OnlineAcceptanceModel = { + /** + * The customer accepts the mandate from this IP address. + */ 'ip_address': string; + /** + * The customer accepts the mandate using the user agent of the browser. + */ 'user_agent': string; }; export type CustomerAcceptanceModel = { + /** + * The time that the customer accepts the mandate. + */ 'accepted_at': number; 'offline'?: OfflineAcceptanceModel | undefined; 'online'?: OnlineAcceptanceModel | undefined; + /** + * The mandate includes the type of customer acceptance information, such as: `online` or `offline`. + */ 'type': 'offline' | 'online'; }; @@ -882,9 +2026,21 @@ export type MandateMultiUseModel = { }; export type MandateAcssDebitModel = { + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; @@ -893,13 +2049,28 @@ export type MandateAmazonPayModel = { }; export type MandateAuBecsDebitModel = { + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateBacsDebitModel = { + /** + * The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + */ 'network_status': 'accepted' | 'pending' | 'refused' | 'revoked'; + /** + * The unique reference identifying the mandate on the Bacs network. + */ 'reference': string; + /** + * When the mandate is revoked on the Bacs network this field displays the reason for the revocation. + */ 'revocation_reason': 'account_closed' | 'bank_account_restricted' | 'bank_ownership_changed' | 'could_not_process' | 'debit_not_authorized'; + /** + * The URL that will contain the mandate that the customer has signed. + */ 'url': string; }; @@ -936,7 +2107,13 @@ export type MandateNzBankAccountModel = { }; export type MandatePaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id': string; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; }; @@ -945,11 +2122,20 @@ export type MandateRevolutPayModel = { }; export type MandateSepaDebitModel = { + /** + * The unique reference of the mandate. + */ 'reference': string; + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateUsBankAccountModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; @@ -969,37 +2155,96 @@ export type MandatePaymentMethodDetailsModel = { 'paypal'?: MandatePaypalModel | undefined; 'revolut_pay'?: MandateRevolutPayModel | undefined; 'sepa_debit'?: MandateSepaDebitModel | undefined; + /** + * This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. + */ 'type': string; 'us_bank_account'?: MandateUsBankAccountModel | undefined; }; export type MandateSingleUseModel = { + /** + * The amount of the payment on a single use mandate. + */ 'amount': number; + /** + * The currency of the payment on a single use mandate. + */ 'currency': string; }; +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export type MandateModel = { 'customer_acceptance': CustomerAcceptanceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'multi_use'?: MandateMultiUseModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'mandate'; + /** + * The account (if any) that the mandate is intended for. + */ 'on_behalf_of'?: string | undefined; + /** + * ID of the payment method associated with this mandate. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': MandatePaymentMethodDetailsModel; 'single_use'?: MandateSingleUseModel | undefined; + /** + * The mandate status indicates whether or not you can use it to initiate a payment. + */ 'status': 'active' | 'inactive' | 'pending'; + /** + * The type of the mandate. + */ 'type': 'multi_use' | 'single_use'; }; export type SetupAttemptPaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1008,17 +2253,48 @@ export type SetupAttemptPaymentMethodDetailsBoletoModel = { }; export type SetupAttemptPaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type ThreeDSecureDetailsModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow': 'challenge' | 'frictionless'; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator': '01' | '02' | '05' | '06' | '07'; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error'; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason': 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected'; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id': string; + /** + * The version of 3D Secure that was used. + */ 'version': '1.0.2' | '2.1.0' | '2.2.0'; }; @@ -1033,28 +2309,81 @@ export type PaymentMethodDetailsCardWalletGooglePayModel = { export type SetupAttemptPaymentMethodDetailsCardWalletModel = { 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'apple_pay' | 'google_pay' | 'link'; }; export type SetupAttemptPaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Check results by Card networks on Card address and CVC at the time of authorization + */ 'checks': SetupAttemptPaymentMethodDetailsCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * Populated if this authorization used 3D Secure authentication. + */ 'three_d_secure': ThreeDSecureDetailsModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': SetupAttemptPaymentMethodDetailsCardWalletModel; }; export type SetupAttemptPaymentMethodDetailsCardPresentModel = { + /** + * The ID of the Card PaymentMethod which was generated by this SetupAttempt. + */ 'generated_card': string | PaymentMethodModel; + /** + * Details about payments collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; }; @@ -1063,11 +2392,30 @@ export type SetupAttemptPaymentMethodDetailsCashappModel = { }; export type SetupAttemptPaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1088,6 +2436,9 @@ export type SetupAttemptPaymentMethodDetailsLinkModel = { }; export type SetupAttemptPaymentMethodDetailsNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id'?: string | undefined; }; @@ -1108,13 +2459,39 @@ export type SetupAttemptPaymentMethodDetailsSepaDebitModel = { }; export type SetupAttemptPaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Sofort directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1143,6 +2520,9 @@ export type SetupAttemptPaymentMethodDetailsModel = { 'revolut_pay'?: SetupAttemptPaymentMethodDetailsRevolutPayModel | undefined; 'sepa_debit'?: SetupAttemptPaymentMethodDetailsSepaDebitModel | undefined; 'sofort'?: SetupAttemptPaymentMethodDetailsSofortModel | undefined; + /** + * The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + */ 'type': string; 'us_bank_account'?: SetupAttemptPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -1163,8 +2543,17 @@ export type PaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLin }; export type PaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptionsModel = { + /** + * Type of the line item. + */ 'category'?: 'digital_goods' | 'donation' | 'physical_goods' | undefined; + /** + * Description of the line item. + */ 'description'?: string | undefined; + /** + * The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + */ 'sold_by'?: string | undefined; }; @@ -1176,42 +2565,118 @@ export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResour }; export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount': number; }; export type PaymentIntentAmountDetailsLineItemModel = { + /** + * The discount applied on this line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[discount_amount]` field. + */ 'discount_amount': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent_amount_details_line_item'; + /** + * Payment method-specific information for line items. + */ 'payment_method_options': PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptionsModel; + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long. + */ 'product_code': string; + /** + * The product name of the line item. Required for L3 rates. At most 1024 characters long. + * + * For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters. + */ 'product_name': string; + /** + * The quantity of items. Required for L3 rates. An integer greater than 0. + */ 'quantity': number; + /** + * Contains information about the tax on the item. + */ 'tax': PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel; + /** + * The unit cost of the line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0. + */ 'unit_cost': number; + /** + * A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long. + */ 'unit_of_measure': string; }; export type PaymentFlowsAmountDetailsResourceShippingModel = { + /** + * If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than or equal to 0. + */ 'amount': number; + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'from_postal_code': string; + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'to_postal_code': string; }; export type PaymentFlowsAmountDetailsResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount': number; }; export type PaymentFlowsAmountDetailsClientResourceTipModel = { + /** + * Portion of the amount that corresponds to a tip. + */ 'amount'?: number | undefined; }; export type PaymentFlowsAmountDetailsModel = { + /** + * The total discount applied on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field. + */ 'discount_amount'?: number | undefined; + /** + * A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': PaymentIntentAmountDetailsLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'shipping'?: PaymentFlowsAmountDetailsResourceShippingModel | undefined; @@ -1220,11 +2685,22 @@ export type PaymentFlowsAmountDetailsModel = { }; export type PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel = { + /** + * Controls whether this PaymentIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled': boolean; }; export type PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTaxModel = { + /** + * The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + */ 'calculation': string; }; @@ -1237,51 +2713,126 @@ export type PaymentFlowsPaymentIntentAsyncWorkflowsModel = { }; export type FeeModel = { + /** + * Amount of the fee, in cents. + */ 'amount': number; + /** + * ID of the Connect application that earned the fee. + */ 'application': string; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + */ 'type': string; }; export type ConnectCollectionTransferModel = { + /** + * Amount transferred, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * ID of the account that funds are being collected for. + */ 'destination': string | AccountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'connect_collection_transfer'; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + */ 'linked_transaction': string | CustomerCashBalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. + */ 'payment_intent': string | PaymentIntentModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel = { + /** + * The BIC of the bank of the sender of the funding. + */ 'bic': string; + /** + * The last 4 digits of the IBAN of the sender of the funding. + */ 'iban_last4': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel = { + /** + * The last 4 digits of the account number of the sender of the funding. + */ 'account_number_last4': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; + /** + * The sort code of the bank of the sender of the funding + */ 'sort_code': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel = { + /** + * The name of the bank of the sender of the funding. + */ 'sender_bank': string; + /** + * The name of the bank branch of the sender of the funding. + */ 'sender_branch': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel = { + /** + * The banking network used for this funding. + */ 'network'?: 'ach' | 'domestic_wire_us' | 'swift' | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; @@ -1289,7 +2840,13 @@ export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransacti 'eu_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel | undefined; 'gb_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel | undefined; 'jp_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel | undefined; + /** + * The user-supplied reference field on the bank transfer. + */ 'reference': string; + /** + * The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; 'us_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel | undefined; }; @@ -1303,79 +2860,175 @@ export type DestinationDetailsUnimplementedModel = { }; export type RefundDestinationDetailsBlikModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsBrBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsCardModel = { + /** + * Value of the reference number assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; + /** + * Type of the reference number assigned to the refund. + */ 'reference_type'?: string | undefined; + /** + * The type of refund. This can be `refund`, `reversal`, or `pending`. + */ 'type': 'pending' | 'refund' | 'reversal'; }; export type RefundDestinationDetailsCryptoModel = { + /** + * The transaction hash of the refund. + */ 'reference': string; }; export type RefundDestinationDetailsEuBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsGbBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsJpBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMbWayModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMultibancoModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMxBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsP24Model = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsPaypalModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; }; export type RefundDestinationDetailsSwishModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsThBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsUsBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; @@ -1412,6 +3065,9 @@ export type RefundDestinationDetailsModel = { 'swish'?: RefundDestinationDetailsSwishModel | undefined; 'th_bank_transfer'?: RefundDestinationDetailsThBankTransferModel | undefined; 'twint'?: DestinationDetailsUnimplementedModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. + */ 'type': string; 'us_bank_transfer'?: RefundDestinationDetailsUsBankTransferModel | undefined; 'wechat_pay'?: DestinationDetailsUnimplementedModel | undefined; @@ -1419,161 +3075,480 @@ export type RefundDestinationDetailsModel = { }; export type EmailSentModel = { + /** + * The timestamp when the email was sent. + */ 'email_sent_at': number; + /** + * The recipient's email address. + */ 'email_sent_to': string; }; export type RefundNextActionDisplayDetailsModel = { 'email_sent': EmailSentModel; + /** + * The expiry timestamp. + */ 'expires_at': number; }; export type RefundNextActionModel = { 'display_details'?: RefundNextActionDisplayDetailsModel | undefined; + /** + * Type of the next action to perform. + */ 'type': string; }; export type PaymentFlowsPaymentIntentPresentmentDetailsModel = { + /** + * Amount intended to be collected by this payment, denominated in `presentment_currency`. + */ 'presentment_amount': number; + /** + * Currency presented to the customer during payment. + */ 'presentment_currency': string; }; +/** + * A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) + */ export type TransferModel = { + /** + * Amount in cents (or local equivalent) to be transferred. + */ 'amount': number; + /** + * Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + */ 'amount_reversed': number; + /** + * Balance transaction that describes the impact of this transfer on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time that this record of the transfer was first created. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * ID of the Stripe account the transfer was sent to. + */ 'destination': string | AccountModel; + /** + * If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + */ 'destination_payment'?: string | ChargeModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer'; + /** + * A list of reversals that have been applied to the transfer. + */ 'reversals': { + /** + * Details about each object. + */ 'data': TransferReversalModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + */ 'reversed': boolean; + /** + * ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + */ 'source_transaction': string | ChargeModel; + /** + * The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + */ 'source_type'?: string | undefined; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group': string; }; +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export type TransferReversalModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Linked payment refund for the transfer reversal. + */ 'destination_payment_refund': string | RefundModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer_reversal'; + /** + * ID of the refund responsible for the transfer reversal. + */ 'source_refund': string | RefundModel; + /** + * ID of the transfer that was reversed. + */ 'transfer': string | TransferModel; }; +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export type RefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * ID of the charge that's refunded. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + */ 'description'?: string | undefined; 'destination_details'?: RefundDestinationDetailsModel | undefined; + /** + * After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + */ 'failure_balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + */ 'failure_reason'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + */ 'instructions_email'?: string | undefined; + /** + * 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': { [key: string]: string; }; 'next_action'?: RefundNextActionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'refund'; + /** + * ID of the PaymentIntent that's refunded. + */ 'payment_intent': string | PaymentIntentModel; + /** + * Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + */ 'pending_reason'?: 'charge_pending' | 'insufficient_funds' | 'processing' | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + */ 'reason': 'duplicate' | 'expired_uncaptured_charge' | 'fraudulent' | 'requested_by_customer'; + /** + * This is the transaction number that appears on email receipts sent for this refund. + */ 'receipt_number': string; + /** + * The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + */ 'source_transfer_reversal': string | TransferReversalModel; + /** + * Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + */ 'status': string; + /** + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + */ 'transfer_reversal': string | TransferReversalModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel = { + /** + * The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. + */ 'refund': string | RefundModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export type CustomerCashBalanceTransactionModel = { 'adjusted_for_overdraft'?: CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel | undefined; 'applied_to_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer whose available cash balance changed as a result of this transaction. + */ 'customer': string | CustomerModel; + /** + * The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'ending_balance': number; 'funded'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + */ 'net_amount': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_cash_balance_transaction'; 'refunded_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel | undefined; 'transferred_to_balance'?: CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel | undefined; + /** + * The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + */ 'type': 'adjusted_for_overdraft' | 'applied_to_payment' | 'funded' | 'funding_reversed' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'transferred_to_balance' | 'unapplied_from_payment'; 'unapplied_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel | undefined; }; export type DisputeTransactionShippingAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; export type DisputeVisaCompellingEvidence3DisputedTransactionModel = { + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id': string; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint': string; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id': string; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * Categorization of disputed payment. + */ 'merchandise_or_services': 'merchandise' | 'services'; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address': DisputeTransactionShippingAddressModel; }; export type DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel = { + /** + * Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + */ 'charge': string; + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id': string; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint': string; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id': string; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address': DisputeTransactionShippingAddressModel; }; export type DisputeEnhancedEvidenceVisaCompellingEvidence3Model = { + /** + * Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + */ 'disputed_transaction': DisputeVisaCompellingEvidence3DisputedTransactionModel; + /** + * List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + */ 'prior_undisputed_transactions': DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel[]; }; export type DisputeEnhancedEvidenceVisaComplianceModel = { + /** + * A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + */ 'fee_acknowledged': boolean; }; @@ -1583,42 +3558,132 @@ export type DisputeEnhancedEvidenceModel = { }; export type DisputeEvidenceModel = { + /** + * Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + */ 'access_activity_log': string; + /** + * The billing address provided by the customer. + */ 'billing_address': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + */ 'cancellation_policy': string | FileModel; + /** + * An explanation of how and when the customer was shown your refund policy prior to purchase. + */ 'cancellation_policy_disclosure': string; + /** + * A justification for why the customer's subscription was not canceled. + */ 'cancellation_rebuttal': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + */ 'customer_communication': string | FileModel; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The name of the customer. + */ 'customer_name': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + */ 'customer_signature': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + */ 'duplicate_charge_documentation': string | FileModel; + /** + * An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + */ 'duplicate_charge_explanation': string; + /** + * The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + */ 'duplicate_charge_id': string; 'enhanced_evidence': DisputeEnhancedEvidenceModel; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + */ 'receipt': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + */ 'refund_policy': string | FileModel; + /** + * Documentation demonstrating that the customer was shown your refund policy prior to purchase. + */ 'refund_policy_disclosure': string; + /** + * A justification for why the customer is not entitled to a refund. + */ 'refund_refusal_explanation': string; + /** + * The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + */ 'service_date': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + */ 'service_documentation': string | FileModel; + /** + * The address to which a physical product was shipped. You should try to include as complete address information as possible. + */ 'shipping_address': string; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + */ 'shipping_carrier': string; + /** + * The date on which a physical product began its route to the shipping address, in a clear human-readable format. + */ 'shipping_date': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + */ 'shipping_documentation': string | FileModel; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'shipping_tracking_number': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + */ 'uncategorized_file': string | FileModel; + /** + * Any additional evidence or statements. + */ 'uncategorized_text': string; }; export type DisputeEnhancedEligibilityVisaCompellingEvidence3Model = { + /** + * List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + */ 'required_actions': Array<'missing_customer_identifiers' | 'missing_disputed_transaction_description' | 'missing_merchandise_or_services' | 'missing_prior_undisputed_transaction_description' | 'missing_prior_undisputed_transactions'>; + /** + * Visa Compelling Evidence 3.0 eligibility status. + */ 'status': 'not_qualified' | 'qualified' | 'requires_action'; }; export type DisputeEnhancedEligibilityVisaComplianceModel = { + /** + * Visa compliance eligibility status. + */ 'status': 'fee_acknowledged' | 'requires_fee_acknowledgement'; }; @@ -1628,30 +3693,66 @@ export type DisputeEnhancedEligibilityModel = { }; export type DisputeEvidenceDetailsModel = { + /** + * Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. + */ 'due_by': number; 'enhanced_eligibility': DisputeEnhancedEligibilityModel; + /** + * Whether evidence has been staged for this dispute. + */ 'has_evidence': boolean; + /** + * Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + */ 'past_due': boolean; + /** + * The number of times evidence has been submitted. Typically, you may only submit evidence once. + */ 'submission_count': number; }; export type DisputePaymentMethodDetailsAmazonPayModel = { + /** + * The AmazonPay dispute type, chargeback or claim + */ 'dispute_type': 'chargeback' | 'claim'; }; export type DisputePaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The type of dispute opened. Different case types may have varying fees and financial impact. + */ 'case_type': 'block' | 'chargeback' | 'compliance' | 'inquiry' | 'resolution'; + /** + * The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + */ 'network_reason_code': string; }; export type DisputePaymentMethodDetailsKlarnaModel = { + /** + * Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason + */ 'chargeback_loss_reason_code'?: string | undefined; + /** + * The reason for the dispute as defined by Klarna + */ 'reason_code': string; }; export type DisputePaymentMethodDetailsPaypalModel = { + /** + * The ID of the dispute in PayPal. + */ 'case_id': string; + /** + * The reason for the dispute as defined by PayPal + */ 'reason_code': string; }; @@ -1660,47 +3761,139 @@ export type DisputePaymentMethodDetailsModel = { 'card'?: DisputePaymentMethodDetailsCardModel | undefined; 'klarna'?: DisputePaymentMethodDetailsKlarnaModel | undefined; 'paypal'?: DisputePaymentMethodDetailsPaypalModel | undefined; + /** + * Payment method type. + */ 'type': 'amazon_pay' | 'card' | 'klarna' | 'paypal'; }; +/** + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. + * + * Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) + */ export type DisputeModel = { + /** + * Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + */ 'amount': number; + /** + * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + */ 'balance_transactions': BalanceTransactionModel[]; + /** + * ID of the charge that's disputed. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * List of eligibility types that are included in `enhanced_evidence`. + */ 'enhanced_eligibility_types': Array<'visa_compelling_evidence_3' | 'visa_compliance'>; 'evidence': DisputeEvidenceModel; 'evidence_details': DisputeEvidenceDetailsModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + */ 'is_charge_refundable': boolean; + /** + * 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': { [key: string]: string; }; + /** + * Network-dependent reason code for the dispute. + */ 'network_reason_code'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'dispute'; + /** + * ID of the PaymentIntent that's disputed. + */ 'payment_intent': string | PaymentIntentModel; 'payment_method_details'?: DisputePaymentMethodDetailsModel | undefined; + /** + * Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + */ 'reason': string; + /** + * The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`. + */ 'status': 'lost' | 'needs_response' | 'prevented' | 'under_review' | 'warning_closed' | 'warning_needs_response' | 'warning_under_review' | 'won'; }; +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export type FeeRefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the application fee that was refunded. + */ 'fee': string | ApplicationFeeModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'fee_refund'; }; export type IssuingAuthorizationAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee': number; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount': number; }; @@ -1709,451 +3902,1255 @@ export type IssuingCardholderAddressModel = { }; export type IssuingCardholderCompanyModel = { + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided': boolean; }; export type IssuingCardholderUserTermsAcceptanceModel = { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. + */ 'date': number; + /** + * The IP address from which the cardholder accepted the Authorized User Terms. + */ 'ip': string; + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ 'user_agent': string; }; export type IssuingCardholderCardIssuingModel = { + /** + * Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + */ 'user_terms_acceptance': IssuingCardholderUserTermsAcceptanceModel; }; export type IssuingCardholderIndividualDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type IssuingCardholderIdDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back': string | FileModel; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front': string | FileModel; }; export type IssuingCardholderVerificationModel = { + /** + * An identifying document, either a passport or local ID card. + */ 'document': IssuingCardholderIdDocumentModel; }; export type IssuingCardholderIndividualModel = { + /** + * Information related to the card_issuing program for this cardholder. + */ 'card_issuing'?: IssuingCardholderCardIssuingModel | undefined; + /** + * The date of birth of this cardholder. + */ 'dob': IssuingCardholderIndividualDobModel; + /** + * The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'first_name': string; + /** + * The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'last_name': string; + /** + * Government-issued ID document for this cardholder. + */ 'verification': IssuingCardholderVerificationModel; }; export type IssuingCardholderRequirementsModel = { + /** + * If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + */ 'disabled_reason': 'listed' | 'rejected.listed' | 'requirements.past_due' | 'under_review'; + /** + * Array of fields that need to be collected in order to verify and re-enable the cardholder. + */ 'past_due': Array<'company.tax_id' | 'individual.card_issuing.user_terms_acceptance.date' | 'individual.card_issuing.user_terms_acceptance.ip' | 'individual.dob.day' | 'individual.dob.month' | 'individual.dob.year' | 'individual.first_name' | 'individual.last_name' | 'individual.verification.document'>; }; export type IssuingCardholderSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardholderAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries': string[]; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries': string[]; + /** + * Limit spending with amount-based rules that apply across this cardholder's cards. + */ 'spending_limits': IssuingCardholderSpendingLimitModel[]; + /** + * Currency of the amounts within `spending_limits`. + */ 'spending_limits_currency': string; }; +/** + * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + */ export type IssuingCardholderModel = { 'billing': IssuingCardholderAddressModel; + /** + * Additional information about a `company` cardholder. + */ 'company': IssuingCardholderCompanyModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The cardholder's email address. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Additional information about an `individual` cardholder. + */ 'individual': IssuingCardholderIndividualModel; + /** + * 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': { [key: string]: string; }; + /** + * The cardholder's name. This will be printed on cards issued to them. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.cardholder'; + /** + * The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + */ 'phone_number': string; + /** + * The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + * This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + */ 'preferred_locales': Array<'de' | 'en' | 'es' | 'fr' | 'it'>; 'requirements': IssuingCardholderRequirementsModel; + /** + * Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ 'spending_controls': IssuingCardholderAuthorizationControlsModel; + /** + * Specifies whether to permit authorizations on this cardholder's cards. + */ 'status': 'active' | 'blocked' | 'inactive'; + /** + * One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + */ 'type': 'company' | 'individual'; }; export type IssuingCardFraudWarningModel = { + /** + * Timestamp of the most recent fraud warning. + */ 'started_at': number; + /** + * The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card. + */ 'type': 'card_testing_exposure' | 'fraud_dispute_filed' | 'third_party_reported' | 'user_indicated_fraud'; }; export type IssuingPersonalizationDesignCarrierTextModel = { + /** + * The footer body text of the carrier letter. + */ 'footer_body': string; + /** + * The footer title text of the carrier letter. + */ 'footer_title': string; + /** + * The header body text of the carrier letter. + */ 'header_body': string; + /** + * The header title text of the carrier letter. + */ 'header_title': string; }; export type IssuingPhysicalBundleFeaturesModel = { + /** + * The policy for how to use card logo images in a card design with this physical bundle. + */ 'card_logo': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use carrier letter text in a card design with this physical bundle. + */ 'carrier_text': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use a second line on a card with this physical bundle. + */ 'second_line': 'optional' | 'required' | 'unsupported'; }; +/** + * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. + */ export type IssuingPhysicalBundleModel = { 'features': IssuingPhysicalBundleFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Friendly display name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.physical_bundle'; + /** + * Whether this physical bundle can be used to create cards. + */ 'status': 'active' | 'inactive' | 'review'; + /** + * Whether this physical bundle is a standard Stripe offering or custom-made for you. + */ 'type': 'custom' | 'standard'; }; export type IssuingPersonalizationDesignPreferencesModel = { + /** + * 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; + /** + * Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + */ 'is_platform_default': boolean; }; export type IssuingPersonalizationDesignRejectionReasonsModel = { + /** + * The reason(s) the card logo was rejected. + */ 'card_logo': Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_binary_image' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'>; + /** + * The reason(s) the carrier text was rejected. + */ 'carrier_text': Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'>; }; +/** + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. + */ export type IssuingPersonalizationDesignModel = { + /** + * 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 | FileModel; + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ 'carrier_text': IssuingPersonalizationDesignCarrierTextModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key': string; + /** + * 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': { [key: string]: string; }; + /** + * Friendly display name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.personalization_design'; + /** + * The physical bundle object belonging to this personalization design. + */ 'physical_bundle': string | IssuingPhysicalBundleModel; 'preferences': IssuingPersonalizationDesignPreferencesModel; 'rejection_reasons': IssuingPersonalizationDesignRejectionReasonsModel; + /** + * Whether this personalization design can be used to create cards. + */ 'status': 'active' | 'inactive' | 'rejected' | 'review'; }; export type IssuingCardShippingAddressValidationModel = { + /** + * The address validation capabilities to use. + */ 'mode': 'disabled' | 'normalization_only' | 'validation_and_normalization'; + /** + * The normalized shipping address. + */ 'normalized_address': AddressModel; + /** + * The validation result for the shipping address. + */ 'result': 'indeterminate' | 'likely_deliverable' | 'likely_undeliverable'; }; export type IssuingCardShippingCustomsModel = { + /** + * A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. + */ 'eori_number': string; }; export type IssuingCardShippingModel = { 'address': AddressModel; + /** + * Address validation details for the shipment. + */ 'address_validation': IssuingCardShippingAddressValidationModel; + /** + * The delivery company that shipped a card. + */ 'carrier': 'dhl' | 'fedex' | 'royal_mail' | 'usps'; + /** + * Additional information that may be required for clearing customs. + */ 'customs': IssuingCardShippingCustomsModel; + /** + * A unix timestamp representing a best estimate of when the card will be delivered. + */ 'eta': number; + /** + * Recipient name. + */ 'name': string; + /** + * The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. + */ 'phone_number': string; + /** + * Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + */ 'require_signature': boolean; + /** + * Shipment service, such as `standard` or `express`. + */ 'service': 'express' | 'priority' | 'standard'; + /** + * The delivery status of the card. + */ 'status': 'canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped' | 'submitted'; + /** + * A tracking number for a card shipment. + */ 'tracking_number': string; + /** + * A link to the shipping carrier's site where you can view detailed information about a card shipment. + */ 'tracking_url': string; + /** + * Packaging options. + */ 'type': 'bulk' | 'individual'; }; export type IssuingCardSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries': string[]; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries': string[]; + /** + * Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + */ 'spending_limits': IssuingCardSpendingLimitModel[]; + /** + * Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + */ 'spending_limits_currency': string; }; export type IssuingCardApplePayModel = { + /** + * Apple Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Apple Pay + */ 'ineligible_reason': 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region'; }; export type IssuingCardGooglePayModel = { + /** + * Google Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Google Pay + */ 'ineligible_reason': 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region'; }; export type IssuingCardWalletsModel = { 'apple_pay': IssuingCardApplePayModel; 'google_pay': IssuingCardGooglePayModel; + /** + * Unique identifier for a card used with digital wallets + */ 'primary_account_identifier': string; }; +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export type IssuingCardModel = { + /** + * The brand of the card. + */ 'brand': string; + /** + * The reason why the card was canceled. + */ 'cancellation_reason': 'design_rejected' | 'lost' | 'stolen'; 'cardholder': IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + */ 'currency': string; + /** + * The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'cvc'?: string | undefined; + /** + * The expiration month of the card. + */ 'exp_month': number; + /** + * The expiration year of the card. + */ 'exp_year': number; + /** + * The financial account this card is attached to. + */ 'financial_account'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last 4 digits of the card number. + */ 'last4': string; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ 'latest_fraud_warning': IssuingCardFraudWarningModel; + /** + * 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': { [key: string]: string; }; + /** + * The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'number'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.card'; + /** + * The personalization design object belonging to this card. + */ 'personalization_design': string | IssuingPersonalizationDesignModel; + /** + * The latest card that replaces this card, if any. + */ 'replaced_by': string | IssuingCardModel; + /** + * The card this card replaces, if any. + */ 'replacement_for': string | IssuingCardModel; + /** + * The reason why the previous card needed to be replaced. + */ 'replacement_reason': 'damaged' | 'expired' | 'lost' | 'stolen'; + /** + * Text separate from cardholder name, printed on the card. + */ 'second_line': string; + /** + * Where and how the card will be shipped. + */ 'shipping': IssuingCardShippingModel; 'spending_controls': IssuingCardAuthorizationControlsModel; + /** + * Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + */ 'status': 'active' | 'canceled' | 'inactive'; + /** + * The type of the card. + */ 'type': 'physical' | 'virtual'; + /** + * Information relating to digital wallets (like Apple Pay and Google Pay). + */ 'wallets': IssuingCardWalletsModel; }; export type IssuingAuthorizationFleetCardholderPromptDataModel = { + /** + * [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + */ 'alphanumeric_id': string; + /** + * Driver ID. + */ 'driver_id': string; + /** + * Odometer reading. + */ 'odometer': number; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id': string; + /** + * User ID. + */ 'user_id': string; + /** + * Vehicle number. + */ 'vehicle_number': string; }; export type IssuingAuthorizationFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingAuthorizationFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingAuthorizationFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'local_amount_decimal': string; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'national_amount_decimal': string; }; export type IssuingAuthorizationFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel': IssuingAuthorizationFleetFuelPriceDataModel; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel': IssuingAuthorizationFleetNonFuelPriceDataModel; + /** + * Information about tax included in this transaction. + */ 'tax': IssuingAuthorizationFleetTaxDataModel; }; export type IssuingAuthorizationFleetDataModel = { + /** + * Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + */ 'cardholder_prompt_data': IssuingAuthorizationFleetCardholderPromptDataModel; + /** + * The type of purchase. + */ 'purchase_type': 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase'; + /** + * More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown': IssuingAuthorizationFleetReportedBreakdownModel; + /** + * The type of fuel service. + */ 'service_type': 'full_service' | 'non_fuel_transaction' | 'self_service'; }; export type IssuingAuthorizationFraudChallengeModel = { + /** + * The method by which the fraud challenge was delivered to the cardholder. + */ 'channel': 'sms'; + /** + * The status of the fraud challenge. + */ 'status': 'expired' | 'pending' | 'rejected' | 'undeliverable' | 'verified'; + /** + * If the challenge is not deliverable, the reason why. + */ 'undeliverable_reason': 'no_phone_number' | 'unsupported_phone_number'; }; export type IssuingAuthorizationFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code': string; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal': string; + /** + * The type of fuel that was purchased. + */ 'type': 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super'; + /** + * The units for `quantity_decimal`. + */ 'unit': 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon'; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal': string; }; export type IssuingAuthorizationMerchantDataModel = { + /** + * A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + */ 'category': string; + /** + * The merchant category code for the seller’s business + */ 'category_code': string; + /** + * City where the seller is located + */ 'city': string; + /** + * Country where the seller is located + */ 'country': string; + /** + * Name of the seller + */ 'name': string; + /** + * Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + */ 'network_id': string; + /** + * Postal code where the seller is located + */ 'postal_code': string; + /** + * State where the seller is located + */ 'state': string; + /** + * The seller's tax identification number. Currently populated for French merchants only. + */ 'tax_id': string; + /** + * An ID assigned by the seller to the location of the sale. + */ 'terminal_id': string; + /** + * URL provided by the merchant on a 3DS request + */ 'url': string; }; export type IssuingAuthorizationNetworkDataModel = { + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + */ 'acquiring_institution_id': string; + /** + * The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. + */ 'system_trace_audit_number': string; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id': string; }; export type IssuingAuthorizationPendingRequestModel = { + /** + * The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * 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; + /** + * If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + */ 'is_amount_controllable': boolean; + /** + * The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The local currency the merchant is requesting to authorize. + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score': number; }; export type IssuingAuthorizationRequest_1Model = { + /** + * The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * Whether this request was approved. + */ 'approved': boolean; + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The currency that was collected by the merchant and presented to the cardholder for the authorization. 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). + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score': number; + /** + * When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + */ 'reason': 'account_disabled' | 'card_active' | 'card_canceled' | 'card_expired' | 'card_inactive' | 'cardholder_blocked' | 'cardholder_inactive' | 'cardholder_verification_required' | 'insecure_authorization_method' | 'insufficient_funds' | 'network_fallback' | 'not_allowed' | 'pin_blocked' | 'spending_controls' | 'suspected_fraud' | 'verification_failed' | 'webhook_approved' | 'webhook_declined' | 'webhook_error' | 'webhook_timeout'; + /** + * If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. + */ 'reason_message': string; + /** + * Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. + */ 'requested_at': number; }; export type IssuingNetworkTokenDeviceModel = { + /** + * An obfuscated ID derived from the device ID. + */ 'device_fingerprint'?: string | undefined; + /** + * The IP address of the device at provisioning time. + */ 'ip_address'?: string | undefined; + /** + * The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + */ 'location'?: string | undefined; + /** + * The name of the device used for tokenization. + */ 'name'?: string | undefined; + /** + * The phone number of the device used for tokenization. + */ 'phone_number'?: string | undefined; + /** + * The type of device used for tokenization. + */ 'type'?: 'other' | 'phone' | 'watch' | undefined; }; export type IssuingNetworkTokenMastercardModel = { + /** + * A unique reference ID from MasterCard to represent the card account number. + */ 'card_reference_id'?: string | undefined; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to MasterCard. + */ 'token_requestor_id': string; + /** + * The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + */ 'token_requestor_name'?: string | undefined; }; export type IssuingNetworkTokenVisaModel = { + /** + * A unique reference ID from Visa to represent the card account number. + */ 'card_reference_id': string; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to Visa. + */ 'token_requestor_id': string; + /** + * Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + */ 'token_risk_score'?: string | undefined; }; export type IssuingNetworkTokenAddressModel = { + /** + * The street address of the cardholder tokenizing the card. + */ 'line1': string; + /** + * The postal code of the cardholder tokenizing the card. + */ 'postal_code': string; }; export type IssuingNetworkTokenWalletProviderModel = { + /** + * The wallet provider-given account ID of the digital wallet the token belongs to. + */ 'account_id'?: string | undefined; + /** + * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + */ 'account_trust_score'?: number | undefined; + /** + * The method used for tokenizing a card. + */ 'card_number_source'?: 'app' | 'manual' | 'on_file' | 'other' | undefined; 'cardholder_address'?: IssuingNetworkTokenAddressModel | undefined; + /** + * The name of the cardholder tokenizing the card. + */ 'cardholder_name'?: string | undefined; + /** + * An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + */ 'device_trust_score'?: number | undefined; + /** + * The hashed email address of the cardholder's account with the wallet provider. + */ 'hashed_account_email_address'?: string | undefined; + /** + * The reasons for suggested tokenization given by the card network. + */ 'reason_codes'?: Array<'account_card_too_new' | 'account_recently_changed' | 'account_too_new' | 'account_too_new_since_launch' | 'additional_device' | 'data_expired' | 'defer_id_v_decision' | 'device_recently_lost' | 'good_activity_history' | 'has_suspended_tokens' | 'high_risk' | 'inactive_account' | 'long_account_tenure' | 'low_account_score' | 'low_device_score' | 'low_phone_number_score' | 'network_service_error' | 'outside_home_territory' | 'provisioning_cardholder_mismatch' | 'provisioning_device_and_cardholder_mismatch' | 'provisioning_device_mismatch' | 'same_device_no_prior_authentication' | 'same_device_successful_prior_authentication' | 'software_update' | 'suspicious_activity' | 'too_many_different_cardholders' | 'too_many_recent_attempts' | 'too_many_recent_tokens'> | undefined; + /** + * The recommendation on responding to the tokenization request. + */ 'suggested_decision'?: 'approve' | 'decline' | 'require_auth' | undefined; + /** + * The version of the standard for mapping reason codes followed by the wallet provider. + */ 'suggested_decision_version'?: string | undefined; }; export type IssuingNetworkTokenNetworkDataModel = { 'device'?: IssuingNetworkTokenDeviceModel | undefined; 'mastercard'?: IssuingNetworkTokenMastercardModel | undefined; + /** + * The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + */ 'type': 'mastercard' | 'visa'; 'visa'?: IssuingNetworkTokenVisaModel | undefined; 'wallet_provider'?: IssuingNetworkTokenWalletProviderModel | undefined; }; +/** + * An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. + */ export type IssuingTokenModel = { + /** + * Card associated with this token. + */ 'card': string | IssuingCardModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The hashed ID derived from the device ID from the card network associated with the token. + */ 'device_fingerprint': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the token. + */ 'last4'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The token service provider / card network associated with the token. + */ 'network': 'mastercard' | 'visa'; 'network_data'?: IssuingNetworkTokenNetworkDataModel | undefined; + /** + * Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + */ 'network_updated_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.token'; + /** + * The usage state of the token. + */ 'status': 'active' | 'deleted' | 'requested' | 'suspended'; + /** + * The digital wallet for this token, if one was used. + */ 'wallet_provider'?: 'apple_pay' | 'google_pay' | 'samsung_pay' | undefined; }; export type IssuingTransactionAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee': number; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount': number; }; export type IssuingDisputeCanceledEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when order was canceled. + */ 'canceled_at': number; + /** + * Whether the cardholder was provided with a cancellation policy. + */ 'cancellation_policy_provided': boolean; + /** + * Reason for canceling the order. + */ 'cancellation_reason': string; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at': number; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status': 'merchant_rejected' | 'successful'; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at': number; }; export type IssuingDisputeDuplicateEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + */ 'card_statement': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + */ 'cash_receipt': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + */ 'check_image': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + */ 'original_transaction': string; }; export type IssuingDisputeFraudulentEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; }; export type IssuingDisputeMerchandiseNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Date when the product was received. + */ 'received_at': number; + /** + * Description of the cardholder's attempt to return the product. + */ 'return_description': string; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status': 'merchant_rejected' | 'successful'; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at': number; }; export type IssuingDisputeNoValidAuthorizationEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; }; export type IssuingDisputeNotReceivedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at': number; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; }; export type IssuingDisputeOtherEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; }; export type IssuingDisputeServiceNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when order was canceled. + */ 'canceled_at': number; + /** + * Reason for canceling the order. + */ 'cancellation_reason': string; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Date when the product was received. + */ 'received_at': number; }; @@ -2165,352 +5162,1072 @@ export type IssuingDisputeEvidenceModel = { 'no_valid_authorization'?: IssuingDisputeNoValidAuthorizationEvidenceModel | undefined; 'not_received'?: IssuingDisputeNotReceivedEvidenceModel | undefined; 'other'?: IssuingDisputeOtherEvidenceModel | undefined; + /** + * The reason for filing the dispute. Its value will match the field containing the evidence. + */ 'reason': 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'no_valid_authorization' | 'not_received' | 'other' | 'service_not_as_described'; 'service_not_as_described'?: IssuingDisputeServiceNotAsDescribedEvidenceModel | undefined; }; export type IssuingDisputeTreasuryModel = { + /** + * The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + */ 'debit_reversal': string; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + */ 'received_debit': string; }; +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export type IssuingDisputeModel = { + /** + * Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + */ 'amount': number; + /** + * List of balance transactions associated with the dispute. + */ 'balance_transactions'?: BalanceTransactionModel[] | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency the `transaction` was made in. + */ 'currency': string; 'evidence': IssuingDisputeEvidenceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + */ 'loss_reason'?: 'cardholder_authentication_issuer_liability' | 'eci5_token_transaction_with_tavv' | 'excess_disputes_in_timeframe' | 'has_not_met_the_minimum_dispute_amount_requirements' | 'invalid_duplicate_dispute' | 'invalid_incorrect_amount_dispute' | 'invalid_no_authorization' | 'invalid_use_of_disputes' | 'merchandise_delivered_or_shipped' | 'merchandise_or_service_as_described' | 'not_cancelled' | 'other' | 'refund_issued' | 'submitted_beyond_allowable_time_limit' | 'transaction_3ds_required' | 'transaction_approved_after_prior_fraud_dispute' | 'transaction_authorized' | 'transaction_electronically_read' | 'transaction_qualifies_for_visa_easy_payment_service' | 'transaction_unattended' | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.dispute'; + /** + * Current status of the dispute. + */ 'status': 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won'; + /** + * The transaction being disputed. + */ 'transaction': string | IssuingTransactionModel; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingDisputeTreasuryModel | undefined; }; export type IssuingTransactionNetworkDataModel = { + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code': string; + /** + * The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + */ 'processing_date': string; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id': string; }; export type IssuingTransactionFleetCardholderPromptDataModel = { + /** + * Driver ID. + */ 'driver_id': string; + /** + * Odometer reading. + */ 'odometer': number; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id': string; + /** + * User ID. + */ 'user_id': string; + /** + * Vehicle number. + */ 'vehicle_number': string; }; export type IssuingTransactionFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingTransactionFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingTransactionFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'local_amount_decimal': string; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'national_amount_decimal': string; }; export type IssuingTransactionFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel': IssuingTransactionFleetFuelPriceDataModel; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel': IssuingTransactionFleetNonFuelPriceDataModel; + /** + * Information about tax included in this transaction. + */ 'tax': IssuingTransactionFleetTaxDataModel; }; export type IssuingTransactionFleetDataModel = { + /** + * Answers to prompts presented to cardholder at point of sale. + */ 'cardholder_prompt_data': IssuingTransactionFleetCardholderPromptDataModel; + /** + * The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + */ 'purchase_type': string; + /** + * More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown': IssuingTransactionFleetReportedBreakdownModel; + /** + * The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + */ 'service_type': string; }; export type IssuingTransactionFlightDataLegModel = { + /** + * The three-letter IATA airport code of the flight's destination. + */ 'arrival_airport_code': string; + /** + * The airline carrier code. + */ 'carrier': string; + /** + * The three-letter IATA airport code that the flight departed from. + */ 'departure_airport_code': string; + /** + * The flight number. + */ 'flight_number': string; + /** + * The flight's service class. + */ 'service_class': string; + /** + * Whether a stopover is allowed on this flight. + */ 'stopover_allowed': boolean; }; export type IssuingTransactionFlightDataModel = { + /** + * The time that the flight departed. + */ 'departure_at': number; + /** + * The name of the passenger. + */ 'passenger_name': string; + /** + * Whether the ticket is refundable. + */ 'refundable': boolean; + /** + * The legs of the trip. + */ 'segments': IssuingTransactionFlightDataLegModel[]; + /** + * The travel agency that issued the ticket. + */ 'travel_agency': string; }; export type IssuingTransactionFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code': string; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal': string; + /** + * The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + */ 'type': string; + /** + * The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + */ 'unit': string; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal': string; }; export type IssuingTransactionLodgingDataModel = { + /** + * The time of checking into the lodging. + */ 'check_in_at': number; + /** + * The number of nights stayed at the lodging. + */ 'nights': number; }; export type IssuingTransactionReceiptDataModel = { + /** + * The description of the item. The maximum length of this field is 26 characters. + */ 'description': string; + /** + * The quantity of the item. + */ 'quantity': number; + /** + * The total for this line item in cents. + */ 'total': number; + /** + * The unit cost of the item in cents. + */ 'unit_cost': number; }; export type IssuingTransactionPurchaseDetailsModel = { + /** + * Fleet-specific information for transactions using Fleet cards. + */ 'fleet': IssuingTransactionFleetDataModel; + /** + * Information about the flight that was purchased with this transaction. + */ 'flight': IssuingTransactionFlightDataModel; + /** + * Information about fuel that was purchased with this transaction. + */ 'fuel': IssuingTransactionFuelDataModel; + /** + * Information about lodging that was purchased with this transaction. + */ 'lodging': IssuingTransactionLodgingDataModel; + /** + * The line items in the purchase. + */ 'receipt': IssuingTransactionReceiptDataModel[]; + /** + * A merchant-specific order number. + */ 'reference': string; }; export type IssuingTransactionTreasuryModel = { + /** + * The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + */ 'received_credit': string; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + */ 'received_debit': string; }; +/** + * Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) + */ export type IssuingTransactionModel = { + /** + * The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingTransactionAmountDetailsModel; + /** + * The `Authorization` object that led to this transaction. + */ 'authorization': string | IssuingAuthorizationModel; + /** + * ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * The card used to make this transaction. + */ 'card': string | IssuingCardModel; + /** + * The cardholder to whom this transaction belongs. + */ 'cardholder': string | IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * If you've disputed the transaction, the ID of the dispute. + */ 'dispute': string | IssuingDisputeModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + */ 'merchant_amount': number; + /** + * The currency with which the merchant is taking payment. + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the transaction, such as processing dates, set by the card network. + */ 'network_data': IssuingTransactionNetworkDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.transaction'; + /** + * Additional purchase information that is optionally provided by the merchant. + */ 'purchase_details'?: IssuingTransactionPurchaseDetailsModel | undefined; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingTransactionTreasuryModel | undefined; + /** + * The nature of the transaction. + */ 'type': 'capture' | 'refund'; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + */ 'wallet': 'apple_pay' | 'google_pay' | 'samsung_pay'; }; export type IssuingAuthorizationTreasuryModel = { + /** + * The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + */ 'received_credits': string[]; + /** + * The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + */ 'received_debits': string[]; + /** + * The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + */ 'transaction': string; }; export type IssuingAuthorizationAuthenticationExemptionModel = { + /** + * The entity that requested the exemption, either the acquiring merchant or the Issuing user. + */ 'claimed_by': 'acquirer' | 'issuer'; + /** + * The specific exemption claimed for this authorization. + */ 'type': 'low_value_transaction' | 'transaction_risk_analysis' | 'unknown'; }; export type IssuingAuthorizationThreeDSecureModel = { + /** + * The outcome of the 3D Secure authentication request. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'failed' | 'required'; }; export type IssuingAuthorizationVerificationDataModel = { + /** + * Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + */ 'address_line1_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + */ 'address_postal_code_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The exemption applied to this authorization. + */ 'authentication_exemption': IssuingAuthorizationAuthenticationExemptionModel; + /** + * Whether the cardholder provided a CVC and if it matched Stripe’s record. + */ 'cvc_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided an expiry date and if it matched Stripe’s record. + */ 'expiry_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The postal code submitted as part of the authorization used for postal code verification. + */ 'postal_code': string; + /** + * 3D Secure details. + */ 'three_d_secure': IssuingAuthorizationThreeDSecureModel; }; +/** + * When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + */ export type IssuingAuthorizationModel = { + /** + * The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * Whether the authorization has been approved. + */ 'approved': boolean; + /** + * How the card details were provided. + */ 'authorization_method': 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe'; + /** + * List of balance transactions associated with this authorization. + */ 'balance_transactions': BalanceTransactionModel[]; 'card': IssuingCardModel; + /** + * The cardholder to whom this authorization belongs. + */ 'cardholder': string | IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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; + /** + * Fleet-specific information for authorizations using Fleet cards. + */ 'fleet': IssuingAuthorizationFleetDataModel; + /** + * Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + */ 'fraud_challenges'?: IssuingAuthorizationFraudChallengeModel[] | undefined; + /** + * Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + */ 'fuel': IssuingAuthorizationFuelDataModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + */ 'merchant_amount': number; + /** + * The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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). + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the authorization, such as identifiers, set by the card network. + */ 'network_data': IssuingAuthorizationNetworkDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.authorization'; + /** + * The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + */ 'pending_request': IssuingAuthorizationPendingRequestModel; + /** + * History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + */ 'request_history': IssuingAuthorizationRequest_1Model[]; + /** + * The current status of the authorization in its lifecycle. + */ 'status': 'closed' | 'expired' | 'pending' | 'reversed'; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + */ 'transactions': IssuingTransactionModel[]; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + */ 'treasury'?: IssuingAuthorizationTreasuryModel | undefined; 'verification_data': IssuingAuthorizationVerificationDataModel; + /** + * Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + */ 'verified_by_fraud_challenge': boolean; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + */ 'wallet': string; }; export type DeletedBankAccountModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; }; export type DeletedCardModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; }; export type DeletedExternalAccountModel = DeletedBankAccountModel | DeletedCardModel; export type PayoutsTraceIdModel = { + /** + * Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + */ 'status': string; + /** + * The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + */ 'value': string; }; +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export type PayoutModel = { + /** + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + */ 'amount': number; + /** + * The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee': string | ApplicationFeeModel; + /** + * The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee_amount': number; + /** + * Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + */ 'arrival_date': number; + /** + * Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + */ 'automatic': boolean; + /** + * ID of the balance transaction that describes the impact of this payout on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * ID of the bank account or card the payout is sent to. + */ 'destination': string | ExternalAccountModel | DeletedExternalAccountModel; + /** + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + */ 'failure_balance_transaction': string | BalanceTransactionModel; + /** + * Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + */ 'failure_code': string; + /** + * Message that provides the reason for a payout failure, if available. + */ 'failure_message': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + */ 'method': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payout'; + /** + * If the payout reverses another, this is the ID of the original payout. + */ 'original_payout': string | PayoutModel; + /** + * ID of the v2 FinancialAccount the funds are sent to. + */ 'payout_method': string; + /** + * If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + */ 'reconciliation_status': 'completed' | 'in_progress' | 'not_applicable'; + /** + * If the payout reverses, this is the ID of the payout that reverses this payout. + */ 'reversed_by': string | PayoutModel; + /** + * The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + */ 'source_type': string; + /** + * Extra information about a payout that displays on the user's bank statement. + */ 'statement_descriptor': string; + /** + * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + */ 'status': string; + /** + * A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + */ 'trace_id': PayoutsTraceIdModel; + /** + * Can be `bank_account` or `card`. + */ 'type': 'bank_account' | 'card'; }; export type ReserveTransactionModel = { 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reserve_transaction'; }; export type TaxDeductedAtSourceModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_deducted_at_source'; + /** + * The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_end': number; + /** + * The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_start': number; + /** + * The TAN that was supplied to Stripe when TDS was assessed + */ 'tax_deduction_account_number': string; }; +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export type TopupModel = { + /** + * Amount transferred. + */ 'amount': number; + /** + * ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + */ 'expected_availability_date': number; + /** + * Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + */ 'failure_code': string; + /** + * Message to user further explaining reason for top-up failure if available. + */ 'failure_message': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'topup'; + /** + * The source field is deprecated. It might not always be present in the API response. + */ 'source': SourceModel; + /** + * Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + */ 'statement_descriptor': string; + /** + * The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + */ 'status': 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded'; + /** + * A string that identifies this top-up as part of a group. + */ 'transfer_group': string; }; export type BalanceTransactionSourceModel = ApplicationFeeModel | ChargeModel | ConnectCollectionTransferModel | CustomerCashBalanceTransactionModel | DisputeModel | FeeRefundModel | IssuingAuthorizationModel | IssuingDisputeModel | IssuingTransactionModel | PayoutModel | RefundModel | ReserveTransactionModel | TaxDeductedAtSourceModel | TopupModel | TransferModel | TransferReversalModel; +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export type BalanceTransactionModel = { + /** + * Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + */ 'amount': number; + /** + * The date that the transaction's net funds become available in the Stripe balance. + */ 'available_on': number; + /** + * The balance that this transaction impacts. + */ 'balance_type'?: 'issuing' | 'payments' | 'refund_and_dispute_prefunding' | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + */ 'exchange_rate': number; + /** + * Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + */ 'fee': number; + /** + * Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + */ 'fee_details': FeeModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + */ 'net': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_transaction'; + /** + * Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + */ 'reporting_category': string; + /** + * This transaction relates to the Stripe object. + */ 'source': string | BalanceTransactionSourceModel; + /** + * The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + */ 'status': string; + /** + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + */ 'type': 'adjustment' | 'advance' | 'advance_funding' | 'anticipation_repayment' | 'application_fee' | 'application_fee_refund' | 'charge' | 'climate_order_purchase' | 'climate_order_refund' | 'connect_collection_transfer' | 'contribution' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'issuing_dispute' | 'issuing_transaction' | 'obligation_outbound' | 'obligation_reversal_inbound' | 'payment' | 'payment_failure_refund' | 'payment_network_reserve_hold' | 'payment_network_reserve_release' | 'payment_refund' | 'payment_reversal' | 'payment_unreconciled' | 'payout' | 'payout_cancel' | 'payout_failure' | 'payout_minimum_balance_hold' | 'payout_minimum_balance_release' | 'refund' | 'refund_failure' | 'reserve_transaction' | 'reserved_funds' | 'stripe_balance_payment_debit' | 'stripe_balance_payment_debit_reversal' | 'stripe_fee' | 'stripe_fx_fee' | 'tax_fee' | 'topup' | 'topup_reversal' | 'transfer' | 'transfer_cancel' | 'transfer_failure' | 'transfer_refund'; }; export type PlatformEarningFeeSourceModel = { + /** + * Charge ID that created this application fee. + */ 'charge'?: string | undefined; + /** + * Payout ID that created this application fee. + */ 'payout'?: string | undefined; + /** + * Type of object that created the application fee. + */ 'type': 'charge' | 'payout'; }; export type ApplicationFeeModel = { + /** + * ID of the Stripe account this fee was taken from. + */ 'account': string | AccountModel; + /** + * Amount earned, in cents (or local equivalent). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + */ 'amount_refunded': number; + /** + * ID of the Connect application that earned the fee. + */ 'application': string | ApplicationModel; + /** + * Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * ID of the charge that the application fee was taken from. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + */ 'fee_source': PlatformEarningFeeSourceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application_fee'; + /** + * ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + */ 'originating_transaction': string | ChargeModel; + /** + * Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the fee. + */ 'refunds': { + /** + * Details about each object. + */ 'data': FeeRefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; export type ChargeFraudDetailsModel = { + /** + * Assessments from Stripe. If set, the value is `fraudulent`. + */ 'stripe_report'?: string | undefined; + /** + * Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + */ 'user_report'?: string | undefined; }; @@ -2533,176 +6250,445 @@ export type Level3Model = { }; export type RuleModel = { + /** + * The action taken on the payment. + */ 'action': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The predicate to evaluate the payment against. + */ 'predicate': string; }; export type ChargeOutcomeModel = { + /** + * An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines). + */ 'advice_code': 'confirm_card_data' | 'do_not_try_again' | 'try_again_later'; + /** + * For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + */ 'network_advice_code': string; + /** + * For charges declined by the network, an alphanumeric code which indicates the reason the charge failed. + */ 'network_decline_code': string; + /** + * Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + */ 'network_status': string; + /** + * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + */ 'reason': string; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + */ 'risk_level'?: string | undefined; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + */ 'risk_score'?: number | undefined; + /** + * The ID of the Radar rule that matched the payment, if applicable. + */ 'rule'?: string | RuleModel | undefined; + /** + * A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + */ 'seller_message': string; + /** + * Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + */ 'type': string; }; export type PaymentMethodDetailsAchCreditTransferModel = { + /** + * Account number to transfer funds to. + */ 'account_number': string; + /** + * Name of the bank associated with the routing number. + */ 'bank_name': string; + /** + * Routing transit number for the bank account to transfer funds to. + */ 'routing_number': string; + /** + * SWIFT code of the bank associated with the routing number. + */ 'swift_code': string; }; export type PaymentMethodDetailsAchDebitModel = { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Routing transit number of the bank account. + */ 'routing_number': string; }; export type PaymentMethodDetailsAcssDebitModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Institution number of the bank account + */ 'institution_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; + /** + * Transit number of the bank account. + */ 'transit_number': string; }; export type PaymentMethodDetailsAffirmModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * The Affirm transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsAfterpayClearpayModel = { + /** + * The Afterpay order ID associated with this payment intent. + */ 'order_id': string; + /** + * Order identifier shown to the merchant in Afterpay’s online portal. + */ 'reference': string; }; export type PaymentFlowsPrivatePaymentMethodsAlipayDetailsModel = { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'buyer_id'?: string | undefined; + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'fingerprint': string; + /** + * Transaction ID of this particular Alipay transaction. + */ 'transaction_id': string; }; export type AlmaInstallmentsModel = { + /** + * The number of installments. + */ 'count': number; }; export type PaymentMethodDetailsAlmaModel = { 'installments'?: AlmaInstallmentsModel | undefined; + /** + * The Alma transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsPassthroughCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * The last four digits of the card. + */ 'last4': string; }; export type AmazonPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type': 'card'; }; export type PaymentMethodDetailsAmazonPayModel = { 'funding'?: AmazonPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Amazon Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsAuBecsDebitModel = { + /** + * Bank-State-Branch number of the bank account. + */ 'bsb_number': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; }; export type PaymentMethodDetailsBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate': string; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code': string; }; export type PaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; export type PaymentMethodDetailsBillieModel = { + /** + * The Billie transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsBlikModel = { + /** + * A unique and immutable identifier assigned by BLIK to every buyer. + */ 'buyer_id': string; }; export type PaymentMethodDetailsBoletoModel = { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ 'tax_id': string; }; export type PaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel = { + /** + * Indicates whether or not the capture window is extended beyond the standard authorization. + */ 'status': 'disabled' | 'enabled'; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel = { + /** + * Indicates whether or not the incremental authorization feature is supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardInstallmentsPlanModel = { + /** + * For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + */ 'count': number; + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ 'interval': 'month'; + /** + * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + */ 'type': 'bonus' | 'fixed_count' | 'revolving'; }; export type PaymentMethodDetailsCardInstallmentsModel = { + /** + * Installment plan selected for the payment. + */ 'plan': PaymentMethodDetailsCardInstallmentsPlanModel; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel = { + /** + * Indicates whether or not multiple captures are supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel = { + /** + * The maximum amount that can be captured. + */ 'maximum_amount_capturable': number; + /** + * Indicates whether or not the authorized amount can be over-captured. + */ 'status': 'available' | 'unavailable'; }; export type ThreeDSecureDetailsChargeModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow': 'challenge' | 'frictionless'; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator': '01' | '02' | '05' | '06' | '07'; + /** + * The exemption requested via 3DS and accepted by the issuer at authentication time. + */ 'exemption_indicator': 'low_risk' | 'none'; + /** + * Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + * the outcome of Stripe's internal risk assessment. + */ 'exemption_indicator_applied'?: boolean | undefined; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error'; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason': 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected'; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id': string; + /** + * The version of 3D Secure that was used. + */ 'version': '1.0.2' | '2.1.0' | '2.2.0'; }; @@ -2715,9 +6701,21 @@ export type PaymentMethodDetailsCardWalletLinkModel = { }; export type PaymentMethodDetailsCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; @@ -2726,64 +6724,176 @@ export type PaymentMethodDetailsCardWalletSamsungPayModel = { }; export type PaymentMethodDetailsCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; export type PaymentMethodDetailsCardWalletModel = { 'amex_express_checkout'?: PaymentMethodDetailsCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodDetailsCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodDetailsCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodDetailsCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodDetailsCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodDetailsCardModel = { + /** + * The authorized amount. + */ 'amount_authorized': number; + /** + * Authorization code on the charge. + */ 'authorization_code': string; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks': PaymentMethodDetailsCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; 'extended_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel | undefined; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; 'incremental_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments': PaymentMethodDetailsCardInstallmentsModel; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * ID of the mandate used to make this payment or created by it. + */ 'mandate': string; + /** + * True if this payment was marked as MOTO and out of scope for SCA. + */ 'moto'?: boolean | undefined; 'multicapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentMethodDetailsCardNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; 'overcapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel | undefined; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure': ThreeDSecureDetailsChargeModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentMethodDetailsCardWalletModel; }; export type PaymentMethodDetailsCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id': string; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag': string; + /** + * A unique and immutable identifier of payments assigned by Cash App + */ 'transaction_id': string; }; export type PaymentMethodDetailsCryptoModel = { + /** + * The wallet address of the customer. + */ 'buyer_address'?: string | undefined; + /** + * The blockchain network that the transaction was sent on. + */ 'network'?: 'base' | 'ethereum' | 'polygon' | 'solana' | undefined; + /** + * The token currency that the transaction was sent with. + */ 'token_currency'?: 'usdc' | 'usdg' | 'usdp' | undefined; + /** + * The blockchain transaction hash of the crypto payment. + */ 'transaction_hash'?: string | undefined; }; @@ -2792,105 +6902,289 @@ export type PaymentMethodDetailsCustomerBalanceModel = { }; export type PaymentMethodDetailsEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank': 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau'; + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; export type PaymentMethodDetailsFpxModel = { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; + /** + * Unique transaction id generated by FPX for every request from the merchant + */ 'transaction_id': string; }; export type PaymentMethodDetailsGiropayModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; export type PaymentMethodDetailsGrabpayModel = { + /** + * Unique transaction id generated by GrabPay + */ 'transaction_id': string; }; export type PaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Unique transaction ID generated by iDEAL. + */ 'transaction_id': string; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; export type PaymentMethodDetailsInteracPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'savings' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram': string; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name': string; + /** + * Identifier for this transaction. + */ 'authorization_code': string; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code': string; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method': string; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name': string; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results': string; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information': string; }; export type PaymentMethodDetailsInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt': PaymentMethodDetailsInteracPresentReceiptModel; }; export type PaymentMethodDetailsKakaoPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Kakao Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type KlarnaAddressModel = { + /** + * The payer address country + */ 'country': string; }; export type KlarnaPayerDetailsModel = { + /** + * The payer's address + */ 'address': KlarnaAddressModel; }; export type PaymentMethodDetailsKlarnaModel = { + /** + * The payer details for this transaction. + */ 'payer_details': KlarnaPayerDetailsModel; + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ 'payment_method_category': string; + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ 'preferred_locale': string; }; export type PaymentMethodDetailsKonbiniStoreModel = { + /** + * The name of the convenience store chain where the payment was completed. + */ 'chain': 'familymart' | 'lawson' | 'ministop' | 'seicomart'; }; export type PaymentMethodDetailsKonbiniModel = { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ 'store': PaymentMethodDetailsKonbiniStoreModel; }; export type PaymentMethodDetailsKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand': 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori'; + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4': string; + /** + * The Korean Card transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsLinkModel = { + /** + * 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; }; @@ -2899,43 +7193,105 @@ export type PaymentMethodDetailsMbWayModel = { }; export type InternalCardModel = { + /** + * Brand of the card used in the transaction + */ 'brand': string; + /** + * Two-letter ISO code representing the country of the card + */ 'country': string; + /** + * Two digit number representing the card's expiration month + */ 'exp_month': number; + /** + * Two digit number representing the card's expiration year + */ 'exp_year': number; + /** + * The last 4 digits of the card + */ 'last4': string; }; export type PaymentMethodDetailsMobilepayModel = { + /** + * Internal card details + */ 'card': InternalCardModel; }; export type PaymentMethodDetailsMultibancoModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity': string; + /** + * Reference number associated with this Multibanco payment. + */ 'reference': string; }; export type PaymentMethodDetailsNaverPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Naver Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name': string; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix': string; }; export type PaymentMethodDetailsOxxoModel = { + /** + * OXXO reference number + */ 'number': string; }; export type PaymentMethodDetailsP24Model = { + /** + * The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ 'bank': 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank'; + /** + * Unique reference for this Przelewy24 payment. + */ 'reference': string; + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; @@ -2944,81 +7300,199 @@ export type PaymentMethodDetailsPayByBankModel = { }; export type PaymentMethodDetailsPaycoModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Payco transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsPaynowModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Reference number associated with this PayNow payment + */ 'reference': string; }; export type PaypalSellerProtectionModel = { + /** + * An array of conditions that are covered for the transaction, if applicable. + */ 'dispute_categories': Array<'fraudulent' | 'product_not_received'>; + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + */ 'status': 'eligible' | 'not_eligible' | 'partially_eligible'; }; export type PaymentMethodDetailsPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country': string; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email': string; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; + /** + * Owner's full name. Values provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_name': string; + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + */ 'seller_protection': PaypalSellerProtectionModel; + /** + * A unique ID generated by PayPal for this transaction. + */ 'transaction_id': string; }; export type PaymentMethodDetailsPixModel = { + /** + * Unique transaction id generated by BCB + */ 'bank_transaction_id'?: string | undefined; }; export type PaymentMethodDetailsPromptpayModel = { + /** + * Bill reference generated by PromptPay + */ 'reference': string; }; export type RevolutPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type': 'card'; }; export type PaymentMethodDetailsRevolutPayModel = { 'funding'?: RevolutPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Revolut Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSamsungPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Samsung Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSatispayModel = { + /** + * The Satispay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSepaCreditTransferModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * IBAN of the bank account to transfer funds to. + */ 'iban': string; }; export type PaymentMethodDetailsSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four characters of the IBAN. + */ 'last4': string; + /** + * Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + */ 'mandate': string; }; export type PaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ 'preferred_language': 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl'; + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -3027,8 +7501,17 @@ export type PaymentMethodDetailsStripeAccountModel = { }; export type PaymentMethodDetailsSwishModel = { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + */ 'fingerprint': string; + /** + * Payer bank reference number for the payment + */ 'payment_reference': string; + /** + * The last four digits of the Swish account phone number + */ 'verified_phone_last4': string; }; @@ -3037,13 +7520,37 @@ export type PaymentMethodDetailsTwintModel = { }; export type PaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * Reference number to locate ACH payments with customer's bank. + */ 'payment_reference': string; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; @@ -3052,9 +7559,21 @@ export type PaymentMethodDetailsWechatModel = { }; export type PaymentMethodDetailsWechatPayModel = { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ 'fingerprint': string; + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Transaction ID of this particular WeChat Pay transaction. + */ 'transaction_id': string; }; @@ -3115,6 +7634,11 @@ export type PaymentMethodDetailsModel = { 'stripe_account'?: PaymentMethodDetailsStripeAccountModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentMethodDetailsUsBankAccountModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -3122,324 +7646,907 @@ export type PaymentMethodDetailsModel = { 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export type RadarRadarOptionsModel = { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ 'session'?: string | undefined; }; export type RadarReviewResourceLocationModel = { + /** + * The city where the payment originated. + */ 'city': string; + /** + * Two-letter ISO code representing the country where the payment originated. + */ 'country': string; + /** + * The geographic latitude where the payment originated. + */ 'latitude': number; + /** + * The geographic longitude where the payment originated. + */ 'longitude': number; + /** + * The state/county/province/region where the payment originated. + */ 'region': string; }; export type RadarReviewResourceSessionModel = { + /** + * The browser used in this browser session (e.g., `Chrome`). + */ 'browser': string; + /** + * Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + */ 'device': string; + /** + * The platform for the browser session (e.g., `Macintosh`). + */ 'platform': string; + /** + * The version for the browser session (e.g., `61.0.3163.100`). + */ 'version': string; }; +/** + * Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ export type ReviewModel = { + /** + * The ZIP or postal code of the card used, if applicable. + */ 'billing_zip': string; + /** + * The charge associated with this review. + */ 'charge': string | ChargeModel; + /** + * The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'closed_reason': 'acknowledged' | 'approved' | 'canceled' | 'disputed' | 'payment_never_settled' | 'redacted' | 'refunded' | 'refunded_as_fraud'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The IP address where the payment originated. + */ 'ip_address': string; + /** + * Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + */ 'ip_address_location': RadarReviewResourceLocationModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'review'; + /** + * If `true`, the review needs action. + */ 'open': boolean; + /** + * The reason the review was opened. One of `rule` or `manual`. + */ 'opened_reason': 'manual' | 'rule'; + /** + * The PaymentIntent ID associated with this review, if one exists. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'reason': string; + /** + * Information related to the browsing session of the user who initiated the payment. + */ 'session': RadarReviewResourceSessionModel; }; export type ChargeTransferDataModel = { + /** + * The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + */ 'amount': number; + /** + * ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + */ 'destination': string | AccountModel; }; +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export type ChargeModel = { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + */ 'amount_captured': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + */ 'amount_refunded': number; + /** + * ID of the Connect application that created the charge. + */ 'application': string | ApplicationModel; + /** + * The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee': string | ApplicationFeeModel; + /** + * The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee_amount': number; + /** + * Authorization code on the charge. + */ 'authorization_code'?: string | undefined; + /** + * ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + */ 'balance_transaction': string | BalanceTransactionModel; 'billing_details': BillingDetailsModel; + /** + * The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + */ 'calculated_statement_descriptor': string; + /** + * If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + */ 'captured': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer this charge is for if one exists. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Whether the charge has been disputed. + */ 'disputed': boolean; + /** + * ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + */ 'failure_balance_transaction': string | BalanceTransactionModel; + /** + * Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + */ 'failure_code': string; + /** + * Message to user further explaining reason for charge failure if available. + */ 'failure_message': string; + /** + * Information on fraud assessments for the charge. + */ 'fraud_details': ChargeFraudDetailsModel; + /** + * Unique identifier for the object. + */ 'id': string; 'level3'?: Level3Model | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'charge'; + /** + * The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + */ 'outcome': ChargeOutcomeModel; + /** + * `true` if the charge succeeded, or was successfully authorized for later capture. + */ 'paid': boolean; + /** + * ID of the PaymentIntent associated with this charge, if one exists. + */ 'payment_intent': string | PaymentIntentModel; + /** + * ID of the payment method used in this charge. + */ 'payment_method': string; + /** + * Details about the payment method at the time of the transaction. + */ 'payment_method_details': PaymentMethodDetailsModel; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; 'radar_options'?: RadarRadarOptionsModel | undefined; + /** + * This is the email address that the receipt for this charge was sent to. + */ 'receipt_email': string; + /** + * This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + */ 'receipt_number': string; + /** + * This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + */ 'receipt_url': string; + /** + * Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the charge. + */ 'refunds'?: { + /** + * Details about each object. + */ 'data': RefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the review associated with this charge if one exists. + */ 'review': string | ReviewModel; + /** + * Shipping information for the charge. + */ 'shipping': ShippingModel; + /** + * This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. + */ 'source': PaymentSourceModel; + /** + * The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + */ 'source_transfer': string | TransferModel; + /** + * For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + */ 'statement_descriptor': string; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + */ 'statement_descriptor_suffix': string; + /** + * The status of the payment is either `succeeded`, `pending`, or `failed`. + */ 'status': 'failed' | 'pending' | 'succeeded'; + /** + * ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + */ 'transfer'?: string | TransferModel | undefined; + /** + * An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ 'transfer_data': ChargeTransferDataModel; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group': string; }; export type PaymentIntentNextActionAlipayHandleRedirectModel = { + /** + * The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + */ 'native_data': string; + /** + * The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + */ 'native_url': string; + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url': string; }; export type PaymentIntentNextActionBoletoModel = { + /** + * The timestamp after which the boleto expires. + */ 'expires_at': number; + /** + * The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + */ 'hosted_voucher_url': string; + /** + * The boleto number. + */ 'number': string; + /** + * The URL to the downloadable boleto voucher PDF. + */ 'pdf': string; }; export type PaymentIntentNextActionCardAwaitNotificationModel = { + /** + * The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ 'charge_attempt_at': number; + /** + * For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + */ 'customer_approval_required': boolean; }; export type PaymentIntentNextActionCashappQrCodeModel = { + /** + * The date (unix timestamp) when the QR code expires. + */ 'expires_at': number; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + */ 'hosted_instructions_url': string; + /** + * The url for mobile redirect based auth + */ 'mobile_auth_url': string; 'qr_code': PaymentIntentNextActionCashappQrCodeModel; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type FundingInstructionsBankTransferAbaRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The ABA account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The ABA routing number + */ 'routing_number': string; }; +/** + * Iban Records contain E.U. bank account details per the SEPA format. + */ export type FundingInstructionsBankTransferIbanRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The BIC/SWIFT code of the account. + */ 'bic': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * The IBAN of the account. + */ 'iban': string; }; +/** + * Sort Code Records contain U.K. bank account details per the sort code format. + */ export type FundingInstructionsBankTransferSortCodeRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; 'bank_address': AddressModel; + /** + * The six-digit sort code + */ 'sort_code': string; }; +/** + * SPEI Records contain Mexico bank account details per the SPEI format. + */ export type FundingInstructionsBankTransferSpeiRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The three-digit bank code + */ 'bank_code': string; + /** + * The short banking institution name + */ 'bank_name': string; + /** + * The CLABE number + */ 'clabe': string; }; +/** + * SWIFT Records contain U.S. bank account details per the SWIFT format. + */ export type FundingInstructionsBankTransferSwiftRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The SWIFT code + */ 'swift_code': string; }; +/** + * Zengin Records contain Japan bank account details per the Zengin format. + */ export type FundingInstructionsBankTransferZenginRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; + /** + * The bank account type. In Japan, this can only be `futsu` or `toza`. + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank code of the account + */ 'bank_code': string; + /** + * The bank name of the account + */ 'bank_name': string; + /** + * The branch code of the account + */ 'branch_code': string; + /** + * The branch name of the account + */ 'branch_name': string; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type FundingInstructionsBankTransferFinancialAddressModel = { 'aba'?: FundingInstructionsBankTransferAbaRecordModel | undefined; 'iban'?: FundingInstructionsBankTransferIbanRecordModel | undefined; 'sort_code'?: FundingInstructionsBankTransferSortCodeRecordModel | undefined; 'spei'?: FundingInstructionsBankTransferSpeiRecordModel | undefined; + /** + * The payment networks supported by this FinancialAddress + */ 'supported_networks'?: Array<'ach' | 'bacs' | 'domestic_wire_us' | 'fps' | 'sepa' | 'spei' | 'swift' | 'zengin'> | undefined; 'swift'?: FundingInstructionsBankTransferSwiftRecordModel | undefined; + /** + * The type of financial address + */ 'type': 'aba' | 'iban' | 'sort_code' | 'spei' | 'swift' | 'zengin'; 'zengin'?: FundingInstructionsBankTransferZenginRecordModel | undefined; }; export type PaymentIntentNextActionDisplayBankTransferInstructionsModel = { + /** + * The remaining amount that needs to be transferred to complete the payment. + */ 'amount_remaining': number; + /** + * 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; + /** + * A list of financial addresses that can be used to fund the customer balance + */ 'financial_addresses'?: FundingInstructionsBankTransferFinancialAddressModel[] | undefined; + /** + * A link to a hosted page that guides your customer through completing the transfer. + */ 'hosted_instructions_url': string; + /** + * A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + */ 'reference': string; + /** + * Type of bank transfer + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type PaymentIntentNextActionKonbiniFamilymartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniLawsonModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniMinistopModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniSeicomartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniStoresModel = { + /** + * FamilyMart instruction details. + */ 'familymart': PaymentIntentNextActionKonbiniFamilymartModel; + /** + * Lawson instruction details. + */ 'lawson': PaymentIntentNextActionKonbiniLawsonModel; + /** + * Ministop instruction details. + */ 'ministop': PaymentIntentNextActionKonbiniMinistopModel; + /** + * Seicomart instruction details. + */ 'seicomart': PaymentIntentNextActionKonbiniSeicomartModel; }; export type PaymentIntentNextActionKonbiniModel = { + /** + * The timestamp at which the pending Konbini payment expires. + */ 'expires_at': number; + /** + * The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + */ 'hosted_voucher_url': string; 'stores': PaymentIntentNextActionKonbiniStoresModel; }; export type PaymentIntentNextActionDisplayMultibancoDetailsModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity': string; + /** + * The timestamp at which the Multibanco voucher expires. + */ 'expires_at': number; + /** + * The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + */ 'hosted_voucher_url': string; + /** + * Reference number associated with this Multibanco payment. + */ 'reference': string; }; export type PaymentIntentNextActionDisplayOxxoDetailsModel = { + /** + * The timestamp after which the OXXO voucher expires. + */ 'expires_after': number; + /** + * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + */ 'hosted_voucher_url': string; + /** + * OXXO reference number. + */ 'number': string; }; export type PaymentIntentNextActionPaynowDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + */ 'hosted_instructions_url': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionPixDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data'?: string | undefined; + /** + * The date (unix timestamp) when the PIX expires. + */ 'expires_at'?: number | undefined; + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ 'hosted_instructions_url'?: string | undefined; + /** + * The image_url_png string used to render png QR code + */ 'image_url_png'?: string | undefined; + /** + * The image_url_svg string used to render svg QR code + */ 'image_url_svg'?: string | undefined; }; export type PaymentIntentNextActionPromptpayDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + */ 'hosted_instructions_url': string; + /** + * The PNG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_png': string; + /** + * The SVG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_svg': string; }; export type PaymentIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url': string; }; export type PaymentIntentNextActionSwishQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Swish instructions page, which allows customers to view the QR code. + */ 'hosted_instructions_url': string; + /** + * The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). + */ 'mobile_auth_url': string; 'qr_code': PaymentIntentNextActionSwishQrCodeModel; }; export type PaymentIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type': 'amounts' | 'descriptor_code'; }; export type PaymentIntentNextActionWechatPayDisplayQrCodeModel = { + /** + * The data being used to generate QR code + */ 'data': string; + /** + * The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + */ 'hosted_instructions_url': string; + /** + * The base64 image data for a pre-generated QR code + */ 'image_data_url': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionWechatPayRedirectToAndroidAppModel = { + /** + * app_id is the APP ID registered on WeChat open platform + */ 'app_id': string; + /** + * nonce_str is a random string + */ 'nonce_str': string; + /** + * package is static value + */ 'package': string; + /** + * an unique merchant ID assigned by WeChat Pay + */ 'partner_id': string; + /** + * an unique trading ID assigned by WeChat Pay + */ 'prepay_id': string; + /** + * A signature + */ 'sign': string; + /** + * Specifies the current time in epoch format + */ 'timestamp': string; }; export type PaymentIntentNextActionWechatPayRedirectToIosAppModel = { + /** + * An universal link that redirect to WeChat Pay app + */ 'native_url': string; }; @@ -3457,7 +8564,13 @@ export type PaymentIntentNextActionModel = { 'promptpay_display_qr_code'?: PaymentIntentNextActionPromptpayDisplayQrCodeModel | undefined; 'redirect_to_url'?: PaymentIntentNextActionRedirectToUrlModel | undefined; 'swish_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: PaymentIntentNextActionVerifyWithMicrodepositsModel | undefined; 'wechat_pay_display_qr_code'?: PaymentIntentNextActionWechatPayDisplayQrCodeModel | undefined; @@ -3466,174 +8579,521 @@ export type PaymentIntentNextActionModel = { }; export type PaymentFlowsPaymentDetailsModel = { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + * This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. + */ 'customer_reference': string; + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. + * + * Required when the Payment Method Types array contains `card`, including when [automatic_payment_methods.enabled](/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled) is set to `true`. + * + * For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app. + */ 'order_reference': string; }; export type PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel = { + /** + * ID of the payment method configuration used. + */ 'id': string; + /** + * ID of the parent payment method configuration used. + */ 'parent': string; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type PaymentIntentPaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsAffirmModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAfterpayClearpayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAlipayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsAlmaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsAmazonPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsAuBecsDebitModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsBacsDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsBillieModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsBlikModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsBoletoModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCardInstallmentsModel = { + /** + * Installment plans that may be selected for this PaymentIntent. + */ 'available_plans': PaymentMethodDetailsCardInstallmentsPlanModel[]; + /** + * Whether Installments are enabled for this PaymentIntent. + */ 'enabled': boolean; + /** + * Installment plan selected for this PaymentIntent. + */ 'plan': PaymentMethodDetailsCardInstallmentsPlanModel; }; export type PaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date': number; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count': number; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types': 'india'[]; }; export type PaymentIntentPaymentMethodOptionsCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments': PaymentMethodOptionsCardInstallmentsModel; + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options': PaymentMethodOptionsCardMandateOptionsModel; + /** + * Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; }; export type PaymentMethodOptionsCardPresentRoutingModel = { + /** + * Requested routing priority + */ 'requested_priority': 'domestic' | 'international'; }; export type PaymentMethodOptionsCardPresentModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; + /** + * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + */ 'request_extended_authorization': 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. + */ 'request_incremental_authorization_support': boolean; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; }; export type PaymentMethodOptionsCashappModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCryptoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsCustomerBalanceEuBankAccountModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type PaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type PaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: PaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsEpsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsFpxModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGiropayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGrabpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsIdealModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; @@ -3642,64 +9102,214 @@ export type PaymentMethodOptionsInteracPresentModel = { }; export type PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsKlarnaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsKonbiniModel = { + /** + * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + */ 'confirmation_number': string; + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days': number; + /** + * The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ 'expires_at': number; + /** + * A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + */ 'product_description': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsKrCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsLinkModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsMbWayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsMobilepayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsMultibancoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsNzBankAccountModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsOxxoModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsP24Model = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -3708,99 +9318,279 @@ export type PaymentMethodOptionsPayByBankModel = { }; export type PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsPaynowModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsPaypalModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsPixModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + */ 'expires_after_seconds': number; + /** + * The timestamp at which the Pix expires. + */ 'expires_at': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsPromptpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsRevolutPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsSatispayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsSepaDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsSofortModel = { + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsSwishModel = { + /** + * A reference for this payment to be displayed in the Swish app. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsTwintModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; }; export type LinkedAccountOptionsCommonModel = { 'filters'?: PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'ownership' | 'transactions'>; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; }; export type PaymentMethodOptionsUsBankAccountMandateOptionsModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; export type PaymentIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Preferred transaction settlement speed + */ 'preferred_settlement_speed'?: 'fastest' | 'standard' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsWechatPayModel = { + /** + * The app ID registered with WeChat Pay. Only required when client is ios or android. + */ 'app_id': string; + /** + * The client type that the end customer will pay from + */ 'client': 'android' | 'ios' | 'web'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsZipModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -3859,7 +9649,13 @@ export type PaymentIntentPaymentMethodOptionsModel = { }; export type PaymentIntentProcessingCustomerNotificationModel = { + /** + * Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + */ 'approval_requested': boolean; + /** + * If customer approval is required, they need to provide approval before this time. + */ 'completes_at': number; }; @@ -3869,99 +9665,306 @@ export type PaymentIntentCardProcessingModel = { export type PaymentIntentProcessing_1Model = { 'card'?: PaymentIntentCardProcessingModel | undefined; + /** + * Type of the payment method for which payment is in `processing` state, one of `card`. + */ 'type': 'card'; }; export type DeletedPaymentSourceModel = DeletedBankAccountModel | DeletedCardModel; export type TransferDataModel = { + /** + * The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + * The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + * representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). + */ 'amount'?: number | undefined; + /** + * The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. + */ 'destination': string | AccountModel; }; +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export type PaymentIntentModel = { + /** + * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Amount that can be captured from this PaymentIntent. + */ 'amount_capturable': number; 'amount_details'?: PaymentFlowsAmountDetailsModel | undefined; + /** + * Amount that this PaymentIntent collects. + */ 'amount_received': number; + /** + * ID of the Connect application that created the PaymentIntent. + */ 'application': string | ApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'application_fee_amount': number; + /** + * Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + */ 'automatic_payment_methods': PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel; + /** + * Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). + */ 'cancellation_reason': 'abandoned' | 'automatic' | 'duplicate' | 'expired' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice'; + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method': 'automatic' | 'automatic_async' | 'manual'; + /** + * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + */ 'client_secret': string; + /** + * Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + */ 'confirmation_method': 'automatic' | 'manual'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The list of payment method types to exclude from use with this payment. + */ 'excluded_payment_method_types': Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; 'hooks'?: PaymentFlowsPaymentIntentAsyncWorkflowsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + */ 'last_payment_error': ApiErrorsModel; + /** + * ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + */ 'latest_charge': string | ChargeModel; + /** + * 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + */ 'metadata': { [key: string]: string; }; + /** + * If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + */ 'next_action': PaymentIntentNextActionModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent'; + /** + * The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; 'payment_details'?: PaymentFlowsPaymentDetailsModel | undefined; + /** + * ID of the payment method used in this PaymentIntent. + */ 'payment_method': string | PaymentMethodModel; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment-method-specific configuration for this PaymentIntent. + */ 'payment_method_options': PaymentIntentPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types': string[]; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * If present, this property tells you about the processing state of the payment. + */ 'processing': PaymentIntentProcessing_1Model; + /** + * Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + */ 'receipt_email': string; + /** + * ID of the review associated with this PaymentIntent, if any. + */ 'review': string | ReviewModel; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * Shipping information for this PaymentIntent. + */ 'shipping': ShippingModel; + /** + * This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + */ 'source': string | PaymentSourceModel | DeletedPaymentSourceModel; + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + */ 'statement_descriptor': string; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + */ 'statement_descriptor_suffix': string; + /** + * Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'transfer_data': TransferDataModel; + /** + * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + */ 'transfer_group': string; }; export type PaymentFlowsAutomaticPaymentMethodsSetupIntentModel = { + /** + * Controls whether this SetupIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled': boolean; }; export type SetupIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate. + */ 'url': string; }; export type SetupIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type': 'amounts' | 'descriptor_code'; }; export type SetupIntentNextActionModel = { 'cashapp_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel | undefined; 'redirect_to_url'?: SetupIntentNextActionRedirectToUrlModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: SetupIntentNextActionVerifyWithMicrodepositsModel | undefined; }; export type SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type SetupIntentPaymentMethodOptionsAcssDebitModel = { + /** + * Currency supported by the bank account + */ 'currency': 'cad' | 'usd'; 'mandate_options'?: SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -3970,6 +9973,9 @@ export type SetupIntentPaymentMethodOptionsAmazonPayModel = { }; export type SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -3978,21 +9984,60 @@ export type SetupIntentPaymentMethodOptionsBacsDebitModel = { }; export type SetupIntentPaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * 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; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date': number; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count': number; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types': 'india'[]; }; export type SetupIntentPaymentMethodOptionsCardModel = { + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options': SetupIntentPaymentMethodOptionsCardMandateOptionsModel; + /** + * Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; @@ -4001,19 +10046,34 @@ export type SetupIntentPaymentMethodOptionsCardPresentModel = { }; export type SetupIntentPaymentMethodOptionsKlarnaModel = { + /** + * The currency of the setup intent. Three letter ISO currency code. + */ 'currency': string; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale': string; }; export type SetupIntentPaymentMethodOptionsLinkModel = { + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token': string; }; export type SetupIntentPaymentMethodOptionsPaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id': string; }; export type SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -4024,6 +10084,9 @@ export type SetupIntentPaymentMethodOptionsSepaDebitModel = { export type SetupIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -4040,86 +10103,303 @@ export type SetupIntentPaymentMethodOptionsModel = { 'us_bank_account'?: SetupIntentPaymentMethodOptionsUsBankAccountModel | undefined; }; +/** + * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + * + * Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + */ export type SetupIntentModel = { + /** + * ID of the Connect application that created the SetupIntent. + */ 'application': string | ApplicationModel; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Settings for dynamic payment methods compatible with this Setup Intent + */ 'automatic_payment_methods': PaymentFlowsAutomaticPaymentMethodsSetupIntentModel; + /** + * Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + */ 'cancellation_reason': 'abandoned' | 'duplicate' | 'requested_by_customer'; + /** + * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Payment method types that are excluded from this SetupIntent. + */ 'excluded_payment_method_types': Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions'?: Array<'inbound' | 'outbound'> | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The error encountered in the previous SetupIntent confirmation. + */ 'last_setup_error': ApiErrorsModel; + /** + * The most recent SetupAttempt for this SetupIntent. + */ 'latest_attempt': string | SetupAttemptModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * ID of the multi use Mandate generated by the SetupIntent. + */ 'mandate': string | MandateModel; + /** + * 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': { [key: string]: string; }; + /** + * If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + */ 'next_action': SetupIntentNextActionModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_intent'; + /** + * The account (if any) for which the setup is intended. + */ 'on_behalf_of': string | AccountModel; + /** + * ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + */ 'payment_method': string | PaymentMethodModel; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment method-specific configuration for this SetupIntent. + */ 'payment_method_options': SetupIntentPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types': string[]; + /** + * ID of the single_use Mandate generated by the SetupIntent. + */ 'single_use_mandate': string | MandateModel; + /** + * [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ 'usage': string; }; export type ApiErrorsModel = { + /** + * For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one. + */ 'advice_code'?: string | undefined; + /** + * For card errors, the ID of the failed charge. + */ 'charge'?: string | undefined; + /** + * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + */ 'code'?: 'account_closed' | 'account_country_invalid_address' | 'account_error_country_change_requires_additional_steps' | 'account_information_mismatch' | 'account_invalid' | 'account_number_invalid' | 'acss_debit_session_incomplete' | 'alipay_upgrade_required' | 'amount_too_large' | 'amount_too_small' | 'api_key_expired' | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' | 'bank_account_restricted' | 'bank_account_unusable' | 'bank_account_unverified' | 'bank_account_verification_failed' | 'billing_invalid_mandate' | 'bitcoin_upgrade_required' | 'capture_charge_authorization_expired' | 'capture_unauthorized_payment' | 'card_decline_rate_limit_exceeded' | 'card_declined' | 'cardholder_phone_number_required' | 'charge_already_captured' | 'charge_already_refunded' | 'charge_disputed' | 'charge_exceeds_source_limit' | 'charge_exceeds_transaction_limit' | 'charge_expired_for_capture' | 'charge_invalid_parameter' | 'charge_not_refundable' | 'clearing_code_unsupported' | 'country_code_invalid' | 'country_unsupported' | 'coupon_expired' | 'customer_max_payment_methods' | 'customer_max_subscriptions' | 'customer_session_expired' | 'customer_tax_location_invalid' | 'debit_not_authorized' | 'email_invalid' | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_account_pending_account_numbers' | 'financial_connections_account_unavailable_account_numbers' | 'financial_connections_no_successful_transaction_refresh' | 'forwarding_api_inactive' | 'forwarding_api_invalid_parameter' | 'forwarding_api_retryable_upstream_error' | 'forwarding_api_upstream_connection_error' | 'forwarding_api_upstream_connection_timeout' | 'forwarding_api_upstream_error' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' | 'incorrect_number' | 'incorrect_zip' | 'india_recurring_payment_mandate_canceled' | 'instant_payouts_config_disabled' | 'instant_payouts_currency_disabled' | 'instant_payouts_limit_exceeded' | 'instant_payouts_unsupported' | 'insufficient_funds' | 'intent_invalid_state' | 'intent_verification_method_missing' | 'invalid_card_type' | 'invalid_characters' | 'invalid_charge_amount' | 'invalid_cvc' | 'invalid_expiry_month' | 'invalid_expiry_year' | 'invalid_mandate_reference_prefix_format' | 'invalid_number' | 'invalid_source_usage' | 'invalid_tax_location' | 'invoice_no_customer_line_items' | 'invoice_no_payment_method_types' | 'invoice_no_subscription_line_items' | 'invoice_not_editable' | 'invoice_on_behalf_of_not_editable' | 'invoice_payment_intent_requires_action' | 'invoice_upcoming_none' | 'livemode_mismatch' | 'lock_timeout' | 'missing' | 'no_account' | 'not_allowed_on_standard_account' | 'out_of_inventory' | 'ownership_declaration_not_allowed' | 'parameter_invalid_empty' | 'parameter_invalid_integer' | 'parameter_invalid_string_blank' | 'parameter_invalid_string_empty' | 'parameter_missing' | 'parameter_unknown' | 'parameters_exclusive' | 'payment_intent_action_required' | 'payment_intent_authentication_failure' | 'payment_intent_incompatible_payment_method' | 'payment_intent_invalid_parameter' | 'payment_intent_konbini_rejected_confirmation_number' | 'payment_intent_mandate_invalid' | 'payment_intent_payment_attempt_expired' | 'payment_intent_payment_attempt_failed' | 'payment_intent_rate_limit_exceeded' | 'payment_intent_unexpected_state' | 'payment_method_bank_account_already_verified' | 'payment_method_bank_account_blocked' | 'payment_method_billing_details_address_missing' | 'payment_method_configuration_failures' | 'payment_method_currency_mismatch' | 'payment_method_customer_decline' | 'payment_method_invalid_parameter' | 'payment_method_invalid_parameter_testmode' | 'payment_method_microdeposit_failed' | 'payment_method_microdeposit_verification_amounts_invalid' | 'payment_method_microdeposit_verification_amounts_mismatch' | 'payment_method_microdeposit_verification_attempts_exceeded' | 'payment_method_microdeposit_verification_descriptor_code_mismatch' | 'payment_method_microdeposit_verification_timeout' | 'payment_method_not_available' | 'payment_method_provider_decline' | 'payment_method_provider_timeout' | 'payment_method_unactivated' | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' | 'platform_api_key_expired' | 'postal_code_invalid' | 'processing_error' | 'product_inactive' | 'progressive_onboarding_limit_exceeded' | 'rate_limit' | 'refer_to_customer' | 'refund_disputed_payment' | 'resource_already_exists' | 'resource_missing' | 'return_intent_already_processed' | 'routing_number_invalid' | 'secret_key_required' | 'sepa_unsupported_account' | 'setup_attempt_failed' | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' | 'shipping_calculation_failed' | 'sku_inactive' | 'state_unsupported' | 'status_transition_invalid' | 'stripe_tax_inactive' | 'tax_id_invalid' | 'tax_id_prohibited' | 'taxes_calculation_failed' | 'terminal_location_country_unsupported' | 'terminal_reader_busy' | 'terminal_reader_hardware_fault' | 'terminal_reader_invalid_location_for_activation' | 'terminal_reader_invalid_location_for_payment' | 'terminal_reader_offline' | 'terminal_reader_timeout' | 'testmode_charges_only' | 'tls_version_unsupported' | 'token_already_used' | 'token_card_network_invalid' | 'token_in_use' | 'transfer_source_balance_parameters_mismatch' | 'transfers_not_allowed' | 'url_invalid' | undefined; + /** + * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + */ 'decline_code'?: string | undefined; + /** + * A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + */ 'doc_url'?: string | undefined; + /** + * A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + */ 'message'?: string | undefined; + /** + * For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + */ 'network_advice_code'?: string | undefined; + /** + * For payments declined by the network, an alphanumeric code which indicates the reason the payment failed. + */ 'network_decline_code'?: string | undefined; + /** + * If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + */ 'param'?: string | undefined; 'payment_intent'?: PaymentIntentModel | undefined; 'payment_method'?: PaymentMethodModel | undefined; + /** + * If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + */ 'payment_method_type'?: string | undefined; + /** + * A URL to the request log entry in your dashboard. + */ 'request_log_url'?: string | undefined; 'setup_intent'?: SetupIntentModel | undefined; 'source'?: PaymentSourceModel | undefined; + /** + * The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + */ 'type': 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error'; }; +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export type SetupAttemptModel = { + /** + * The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + */ 'application': string | ApplicationModel; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions': Array<'inbound' | 'outbound'>; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_attempt'; + /** + * The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + */ 'on_behalf_of': string | AccountModel; + /** + * ID of the payment method used with this SetupAttempt. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': SetupAttemptPaymentMethodDetailsModel; + /** + * The error encountered during this attempt to confirm the SetupIntent, if any. + */ 'setup_error': ApiErrorsModel; + /** + * ID of the SetupIntent that this attempt belongs to. + */ 'setup_intent': string | SetupIntentModel; + /** + * Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + */ 'status': string; + /** + * The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + */ 'usage': string; }; export type PaymentMethodCardGeneratedCardModel = { + /** + * The charge that created this object. + */ 'charge': string; + /** + * Transaction-specific details of the payment method used in the payment. + */ 'payment_method_details': CardGeneratedFromPaymentMethodDetailsModel; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt': string | SetupAttemptModel; }; export type NetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred': string; }; export type ThreeDSecureUsageModel = { + /** + * Whether 3D Secure is supported on this card. + */ 'supported': boolean; }; @@ -4140,9 +10420,21 @@ export type PaymentMethodCardWalletLinkModel = { }; export type PaymentMethodCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; @@ -4151,71 +10443,204 @@ export type PaymentMethodCardWalletSamsungPayModel = { }; export type PaymentMethodCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; export type PaymentMethodCardWalletModel = { 'amex_express_checkout'?: PaymentMethodCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; 'google_pay'?: PaymentMethodCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Checks on Card address and CVC if provided. + */ 'checks': PaymentMethodCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + */ 'display_brand': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Details of the original PaymentMethod that created this object. + */ 'generated_from': PaymentMethodCardGeneratedCardModel; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': NetworksModel; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * Contains details on how this Card may be used for 3D Secure authentication. + */ 'three_d_secure_usage': ThreeDSecureUsageModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentMethodCardWalletModel; }; export type PaymentMethodCardPresentNetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for the card. + */ 'preferred': string; }; export type PaymentMethodCardPresentModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': PaymentMethodCardPresentNetworksModel; + /** + * Details about payment methods collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type PaymentMethodCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id': string; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag': string; }; @@ -4224,13 +10649,28 @@ export type PaymentMethodCryptoModel = { }; export type CustomLogoModel = { + /** + * Content type of the Dashboard-only CustomPaymentMethodType logo. + */ 'content_type': string; + /** + * URL of the Dashboard-only CustomPaymentMethodType logo. + */ 'url': string; }; export type PaymentMethodCustomModel = { + /** + * Display name of the Dashboard-only CustomPaymentMethodType. + */ 'display_name': string; + /** + * Contains information about the Dashboard-only CustomPaymentMethodType logo. + */ 'logo': CustomLogoModel; + /** + * ID of the Dashboard-only CustomPaymentMethodType. Not expandable. + */ 'type': string; }; @@ -4239,11 +10679,20 @@ export type PaymentMethodCustomerBalanceModel = { }; export type PaymentMethodEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank': 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau'; }; export type PaymentMethodFpxModel = { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; }; @@ -4256,24 +10705,74 @@ export type PaymentMethodGrabpayModel = { }; export type PaymentMethodIdealModel = { + /** + * The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank, if the bank was provided. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; }; export type PaymentMethodInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': PaymentMethodCardPresentNetworksModel; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; }; @@ -4282,12 +10781,24 @@ export type PaymentMethodKakaoPayModel = { }; export type PaymentFlowsPrivatePaymentMethodsKlarnaDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type PaymentMethodKlarnaModel = { + /** + * The customer's date of birth, if provided. + */ 'dob'?: PaymentFlowsPrivatePaymentMethodsKlarnaDobModel | undefined; }; @@ -4296,12 +10807,24 @@ export type PaymentMethodKonbiniModel = { }; export type PaymentMethodKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand': 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori'; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4': string; }; export type PaymentMethodLinkModel = { + /** + * Account owner's email address. + */ 'email': string; + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token'?: string | undefined; }; @@ -4318,16 +10841,40 @@ export type PaymentMethodMultibancoModel = { }; export type PaymentMethodNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id': string; + /** + * Whether to fund this transaction with Naver Pay points or a card. + */ 'funding': 'card' | 'points'; }; export type PaymentMethodNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name': string; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix': string; }; @@ -4336,6 +10883,9 @@ export type PaymentMethodOxxoModel = { }; export type PaymentMethodP24Model = { + /** + * The customer's bank, if provided. + */ 'bank': 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank'; }; @@ -4352,8 +10902,18 @@ export type PaymentMethodPaynowModel = { }; export type PaymentMethodPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country': string; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email': string; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; }; @@ -4378,20 +10938,47 @@ export type PaymentMethodSatispayModel = { }; export type SepaDebitGeneratedFromModel = { + /** + * The ID of the Charge that generated this PaymentMethod, if any. + */ 'charge': string | ChargeModel; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt': string | SetupAttemptModel; }; export type PaymentMethodSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Information about the object that generated this PaymentMethod. + */ 'generated_from': SepaDebitGeneratedFromModel; + /** + * Last four characters of the IBAN. + */ 'last4': string; }; export type PaymentMethodSofortModel = { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; }; @@ -4404,12 +10991,24 @@ export type PaymentMethodTwintModel = { }; export type UsBankAccountNetworksModel = { + /** + * The preferred network. + */ 'preferred': string; + /** + * All supported networks. + */ 'supported': Array<'ach' | 'us_domestic_wire'>; }; export type PaymentMethodUsBankAccountBlockedModel = { + /** + * The ACH network code that resulted in this block. + */ 'network_code': 'R02' | 'R03' | 'R04' | 'R05' | 'R07' | 'R08' | 'R10' | 'R11' | 'R16' | 'R20' | 'R29' | 'R31'; + /** + * The reason why this PaymentMethod's fingerprint has been blocked + */ 'reason': 'bank_account_closed' | 'bank_account_frozen' | 'bank_account_invalid_details' | 'bank_account_restricted' | 'bank_account_unusable' | 'debit_not_authorized' | 'tokenized_account_number_deactivated'; }; @@ -4418,14 +11017,41 @@ export type PaymentMethodUsBankAccountStatusDetailsModel = { }; export type PaymentMethodUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The ID of the Financial Connections Account used to create the payment method. + */ 'financial_connections_account': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Contains information about US bank account networks that can be used. + */ 'networks': UsBankAccountNetworksModel; + /** + * Routing number of the bank account. + */ 'routing_number': string; + /** + * Contains information about the future reusability of this PaymentMethod. + */ 'status_details': PaymentMethodUsBankAccountStatusDetailsModel; }; @@ -4437,11 +11063,21 @@ export type PaymentMethodZipModel = { }; +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export type PaymentMethodModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -4455,15 +11091,24 @@ export type PaymentMethodModel = { 'card'?: PaymentMethodCardModel | undefined; 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'crypto'?: PaymentMethodCryptoModel | undefined; 'custom'?: PaymentMethodCustomModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer': string | CustomerModel; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; 'eps'?: PaymentMethodEpsModel | undefined; 'fpx'?: PaymentMethodFpxModel | undefined; 'giropay'?: PaymentMethodGiropayModel | undefined; 'grabpay'?: PaymentMethodGrabpayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: PaymentMethodIdealModel | undefined; 'interac_present'?: PaymentMethodInteracPresentModel | undefined; @@ -4472,8 +11117,14 @@ export type PaymentMethodModel = { 'konbini'?: PaymentMethodKonbiniModel | undefined; 'kr_card'?: PaymentMethodKrCardModel | undefined; 'link'?: PaymentMethodLinkModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodMbWayModel | undefined; + /** + * 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': { [key: string]: string; }; @@ -4481,6 +11132,9 @@ export type PaymentMethodModel = { 'multibanco'?: PaymentMethodMultibancoModel | undefined; 'naver_pay'?: PaymentMethodNaverPayModel | undefined; 'nz_bank_account'?: PaymentMethodNzBankAccountModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method'; 'oxxo'?: PaymentMethodOxxoModel | undefined; 'p24'?: PaymentMethodP24Model | undefined; @@ -4498,6 +11152,9 @@ export type PaymentMethodModel = { 'sofort'?: PaymentMethodSofortModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -4505,405 +11162,1158 @@ export type PaymentMethodModel = { }; export type InvoiceSettingCustomerRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + */ 'template': string; }; export type InvoiceSettingCustomerSettingModel = { + /** + * Default custom fields to be displayed on invoices for this customer. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * Default footer to be displayed on invoices for this customer. + */ 'footer': string; + /** + * Default options for invoice PDF rendering for this customer. + */ 'rendering_options': InvoiceSettingCustomerRenderingOptionsModel; }; export type DeletedApplicationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; export type ConnectAccountReferenceModel = { + /** + * The connected account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * Type of the account referenced. + */ 'type': 'account' | 'self'; }; export type SubscriptionAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on this 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': ConnectAccountReferenceModel; }; export type SubscriptionsResourceBillingCycleAnchorConfigModel = { + /** + * The day of the month of the billing_cycle_anchor. + */ 'day_of_month': number; + /** + * The hour of the day of the billing_cycle_anchor. + */ 'hour': number; + /** + * The minute of the hour of the billing_cycle_anchor. + */ 'minute': number; + /** + * The month to start full cycle billing periods. + */ 'month': number; + /** + * The second of the minute of the billing_cycle_anchor. + */ 'second': number; }; export type SubscriptionsResourceBillingModeFlexibleModel = { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ 'proration_discounts'?: 'included' | 'itemized' | undefined; }; +/** + * The billing mode of the subscription. + */ export type SubscriptionsResourceBillingModeModel = { + /** + * Configure behavior for flexible billing mode + */ 'flexible': SubscriptionsResourceBillingModeFlexibleModel; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; + /** + * Details on when the current billing_mode was adopted. + */ 'updated_at'?: number | undefined; }; export type SubscriptionBillingThresholdsModel = { + /** + * Monetary threshold that triggers the subscription to create an invoice + */ 'amount_gte': number; + /** + * Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + */ 'reset_billing_cycle_anchor': boolean; }; export type CancellationDetailsModel = { + /** + * Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + */ 'comment': string; + /** + * The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + */ 'feedback': 'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused'; + /** + * Why this subscription was canceled. + */ 'reason': 'cancellation_requested' | 'payment_disputed' | 'payment_failed'; }; +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export type TaxRateFlatAmountModel = { + /** + * Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Three-letter ISO currency code, in lowercase. + */ 'currency': string; }; +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export type TaxRateModel = { + /** + * Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + */ 'active': boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ 'description': string; + /** + * The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + */ 'display_name': string; + /** + * Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + * this percentage reflects the rate actually used to calculate tax based on the product's taxability + * and whether the user is registered to collect taxes in the corresponding jurisdiction. + */ 'effective_percentage': number; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount': TaxRateFlatAmountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * This specifies if the tax rate is inclusive or exclusive. + */ 'inclusive': boolean; + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + */ 'jurisdiction': string; + /** + * The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + */ 'jurisdiction_level': 'city' | 'country' | 'county' | 'district' | 'multiple' | 'state'; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_rate'; + /** + * Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + */ 'percentage': number; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type': 'flat_amount' | 'percentage'; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state': string; + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxIDsOwnerModel = { + /** + * The account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * The Connect Application being referenced when `type` is `application`. + */ 'application'?: string | ApplicationModel | undefined; + /** + * The customer being referenced when `type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; + /** + * Type of owner referenced. + */ 'type': 'account' | 'application' | 'customer' | 'self'; }; export type TaxIdVerificationModel = { + /** + * Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + */ 'status': 'pending' | 'unavailable' | 'unverified' | 'verified'; + /** + * Verified address. + */ 'verified_address': string; + /** + * Verified name. + */ 'verified_name': string; }; +/** + * 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 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) + */ export type TaxIdModel = { + /** + * Two-letter ISO code representing the country of the tax ID. + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer. + */ 'customer': string | CustomerModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; + /** + * The account or customer the tax ID belongs to. + */ 'owner': TaxIDsOwnerModel; + /** + * Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * Value of the tax ID. + */ 'value': string; + /** + * Tax ID verification information. + */ 'verification': TaxIdVerificationModel; }; export type DeletedTaxIdModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; }; export type SubscriptionsResourceSubscriptionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + */ 'account_tax_ids': Array; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionItemBillingThresholdsModel = { + /** + * Usage threshold that triggers the subscription to create an invoice + */ 'usage_gte': number; }; export type CustomUnitAmountModel = { + /** + * The maximum unit amount the customer can specify for this item. + */ 'maximum': number; + /** + * The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + */ 'minimum': number; + /** + * The starting unit amount which can be updated by the customer. + */ 'preset': number; }; export type PriceTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount': number; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal': string; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to': number; }; export type CurrencyOptionModel = { + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount': CustomUnitAmountModel; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal': string; }; export type DeletedProductModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; }; export type RecurringModel = { + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; + /** + * The meter tracking the usage of a metered price + */ 'meter': string; + /** + * Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + */ 'trial_period_days': number; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; export type TransformQuantityModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PriceModel = { + /** + * Whether the price can be used for new purchases. + */ 'active': boolean; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CurrencyOptionModel; } | undefined; + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount': CustomUnitAmountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key': string; + /** + * 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': { [key: string]: string; }; + /** + * A brief description of the price, hidden from customers. + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; + /** + * The ID of the product this price is associated with. + */ 'product': string | ProductModel | DeletedProductModel; + /** + * The recurring components of a price such as `interval` and `usage_type`. + */ 'recurring': RecurringModel; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode': 'graduated' | 'volume'; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_quantity': TransformQuantityModel; + /** + * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + */ 'type': 'one_time' | 'recurring'; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal': string; }; export type ProductMarketingFeatureModel = { + /** + * The marketing feature name. Up to 80 characters long. + */ 'name'?: string | undefined; }; export type PackageDimensionsModel = { + /** + * Height, in inches. + */ 'height': number; + /** + * Length, in inches. + */ 'length': number; + /** + * Weight, in ounces. + */ 'weight': number; + /** + * Width, in inches. + */ 'width': number; }; +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export type TaxCodeModel = { + /** + * A detailed description of which types of products the tax code represents. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A short name for the tax code. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_code'; }; +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export type ProductModel = { + /** + * Whether the product is currently available for purchase. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + */ 'default_price'?: string | PriceModel | undefined; + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ 'images': string[]; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + */ 'marketing_features': ProductMarketingFeatureModel[]; + /** + * 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': { [key: string]: string; }; + /** + * The product's name, meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; + /** + * The dimensions of this product for shipping purposes. + */ 'package_dimensions': PackageDimensionsModel; + /** + * Whether this product is shipped (i.e., physical goods). + */ 'shippable': boolean; + /** + * Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + */ 'statement_descriptor'?: string | undefined; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ 'tax_code': string | TaxCodeModel; + /** + * The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + */ 'type': 'good' | 'service'; + /** + * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + */ 'unit_label'?: string | undefined; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * A URL of a publicly-accessible webpage for this product. + */ 'url': string; }; export type PlanTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount': number; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal': string; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to': number; }; export type TransformUsageModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PlanModel = { + /** + * Whether the plan can be used for new purchases. + */ 'active': boolean; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'amount_decimal': string; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': 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': { [key: string]: string; }; + /** + * The meter tracking the usage of a metered price + */ 'meter': string; + /** + * A brief description of the plan, hidden from customers. + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; + /** + * The product whose pricing this plan determines. + */ 'product': string | ProductModel | DeletedProductModel; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PlanTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode': 'graduated' | 'volume'; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_usage': TransformUsageModel; + /** + * Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + */ 'trial_period_days': number; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ export type SubscriptionItemModel = { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionItemBillingThresholdsModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The end time of this subscription item's current billing period. + */ 'current_period_end': number; + /** + * The start time of this subscription item's current billing period. + */ 'current_period_start': number; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; 'plan': PlanModel; 'price': PriceModel; + /** + * The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The `subscription` this `subscription_item` belongs to. + */ 'subscription': string; + /** + * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + */ 'tax_rates': TaxRateModel[]; }; export type AutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'finalization_requires_location_inputs' | 'finalization_system_error'; + /** + * 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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this invoice. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type InvoicesResourceConfirmationSecretModel = { + /** + * The client_secret of the payment that Stripe creates for the invoice after finalization. + */ 'client_secret': string; + /** + * The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization + */ 'type': string; }; export type InvoicesResourceInvoiceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type DeletedDiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session': string; + /** + * The ID of the customer associated with this discount. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice': string; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code': string | PromotionCodeModel; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription': string; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item': string; }; export type InvoicesResourceFromInvoiceModel = { + /** + * The relation between this invoice and the cloned invoice + */ 'action': string; + /** + * The invoice that was cloned. + */ 'invoice': string | InvoiceModel; }; export type DiscountsResourceDiscountAmountModel = { + /** + * The amount, in cents (or local equivalent), of the discount. + */ 'amount': number; + /** + * The discount that was applied to get this discount amount. + */ 'discount': string | DiscountModel | DeletedDiscountModel; }; export type BillingBillResourceInvoicingLinesCommonCreditedItemsModel = { + /** + * Invoice containing the credited invoice line items + */ 'invoice': string; + /** + * Credited invoice line items + */ 'invoice_line_items': string[]; }; export type BillingBillResourceInvoicingLinesCommonProrationDetailsModel = { + /** + * For a credit proration `line_item`, the original debit line_items to which the credit proration applies. + */ 'credited_items': BillingBillResourceInvoicingLinesCommonCreditedItemsModel; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item': string; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details': BillingBillResourceInvoicingLinesCommonProrationDetailsModel; + /** + * The subscription that the invoice item belongs to + */ 'subscription': string; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item': string; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details': BillingBillResourceInvoicingLinesCommonProrationDetailsModel; + /** + * The subscription that the subscription item belongs to + */ 'subscription': string; + /** + * The subscription item that generated this line item + */ 'subscription_item': string; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel = { + /** + * Details about the invoice item that generated this line item + */ 'invoice_item_details': BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel; + /** + * Details about the subscription item that generated this line item + */ 'subscription_item_details': BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel; + /** + * The type of parent that generated this line item + */ 'type': 'invoice_item_details' | 'subscription_item_details'; }; export type InvoiceLineItemPeriodModel = { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ 'end': number; + /** + * The start of the period. This value is inclusive. + */ 'start': number; }; export type BillingCreditGrantsResourceMonetaryAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount. + */ 'value': number; }; export type BillingCreditGrantsResourceAmountModel = { + /** + * The monetary amount. + */ 'monetary': BillingCreditGrantsResourceMonetaryAmountModel; + /** + * The type of this amount. We currently only support `monetary` billing credits. + */ 'type': 'monetary'; }; export type BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel = { + /** + * The invoice to which the reinstated billing credits were originally applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the reinstated billing credits were originally applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceCreditModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + */ 'credits_application_invoice_voided': BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel; + /** + * The type of credit transaction. + */ 'type': 'credits_application_invoice_voided' | 'credits_granted'; }; export type BillingCreditGrantsResourceApplicablePriceModel = { + /** + * Unique identifier for the object. + */ 'id': string; }; export type BillingCreditGrantsResourceScopeModel = { + /** + * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`. + */ 'price_type'?: 'metered' | undefined; + /** + * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. + */ 'prices'?: BillingCreditGrantsResourceApplicablePriceModel[] | undefined; }; @@ -4912,6 +12322,9 @@ export type BillingCreditGrantsResourceApplicabilityConfigModel = { }; export type BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel = { + /** + * The `frozen_time` that the Test Clock is advancing towards. + */ 'target_frozen_time': number; }; @@ -4919,78 +12332,223 @@ export type BillingClocksResourceStatusDetailsStatusDetailsModel = { 'advancing'?: BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel | undefined; }; +/** + * A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ export type TestHelpersTestClockModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this clock is scheduled to auto delete. + */ 'deletes_after': number; + /** + * Time at which all objects belonging to this clock are frozen. + */ 'frozen_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The custom name supplied at creation. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; + /** + * The status of the Test Clock. + */ 'status': 'advancing' | 'internal_failure' | 'ready'; 'status_details': BillingClocksResourceStatusDetailsStatusDetailsModel; }; +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export type BillingCreditGrantModel = { 'amount': BillingCreditGrantsResourceAmountModel; 'applicability_config': BillingCreditGrantsResourceApplicabilityConfigModel; + /** + * The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + */ 'category': 'paid' | 'promotional'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer receiving the billing credits. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The time when the billing credits become effective-when they're eligible for use. + */ 'effective_at': number; + /** + * The time when the billing credits expire. If not present, the billing credits don't expire. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * A descriptive name shown in dashboard. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_grant'; + /** + * The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + */ 'priority'?: number | undefined; + /** + * ID of the test clock this credit grant belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + */ 'voided_at': number; }; export type BillingCreditGrantsResourceBalanceCreditsAppliedModel = { + /** + * The invoice to which the billing credits were applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the billing credits were applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceDebitModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. + */ 'credits_applied': BillingCreditGrantsResourceBalanceCreditsAppliedModel; + /** + * The type of debit transaction. + */ 'type': 'credits_applied' | 'credits_expired' | 'credits_voided'; }; +/** + * A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + */ export type BillingCreditBalanceTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Credit details for this credit balance transaction. Only present if type is `credit`. + */ 'credit': BillingCreditGrantsResourceBalanceCreditModel; + /** + * The credit grant associated with this credit balance transaction. + */ 'credit_grant': string | BillingCreditGrantModel; + /** + * Debit details for this credit balance transaction. Only present if type is `debit`. + */ 'debit': BillingCreditGrantsResourceBalanceDebitModel; + /** + * The effective time of this credit balance transaction. + */ 'effective_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_transaction'; + /** + * ID of the test clock this credit balance transaction belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * The type of credit balance transaction (credit or debit). + */ 'type': 'credit' | 'debit'; }; export type InvoicesResourcePretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount'; }; export type BillingBillResourceInvoicingPricingPricingPriceDetailsModel = { + /** + * The ID of the price this item is associated with. + */ 'price': string; + /** + * The ID of the product this item is associated with. + */ 'product': string; }; export type BillingBillResourceInvoicingPricingPricingModel = { 'price_details'?: BillingBillResourceInvoicingPricingPricingPriceDetailsModel | undefined; + /** + * The type of the pricing details. + */ 'type': 'price_details'; + /** + * The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; }; @@ -4999,88 +12557,205 @@ export type BillingBillResourceInvoicingTaxesTaxRateDetailsModel = { }; export type BillingBillResourceInvoicingTaxesTaxModel = { + /** + * The amount of the tax, in cents (or local equivalent). + */ 'amount': number; + /** + * Whether this tax is inclusive or exclusive. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Additional details about the tax rate. Only present when `type` is `tax_rate_details`. + */ 'tax_rate_details': BillingBillResourceInvoicingTaxesTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_available' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount': number; + /** + * The type of tax information. + */ 'type': 'tax_rate_details'; }; +/** + * Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. + * + * Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). + */ export type LineItemModel = { + /** + * The amount, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The amount of discount calculated per discount for this line item. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * If true, discounts will apply to this line item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice that contains this line item. + */ 'invoice': string; + /** + * 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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + */ 'metadata': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'line_item'; + /** + * The parent that generated this line item. + */ 'parent': BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel; 'period': InvoiceLineItemPeriodModel; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + */ 'pretax_credit_amounts': InvoicesResourcePretaxCreditAmountModel[]; + /** + * The pricing information of the line item. + */ 'pricing': BillingBillResourceInvoicingPricingPricingModel; + /** + * The quantity of the subscription, if the line item is a subscription or a proration. + */ 'quantity': number; 'subscription': string | SubscriptionModel; + /** + * The tax information of the line item. + */ 'taxes': BillingBillResourceInvoicingTaxesTaxModel[]; }; export type BillingBillResourceInvoicingParentsInvoiceQuoteParentModel = { + /** + * The quote that generated this invoice + */ 'quote': string; }; export type BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel = { + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + * *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + */ 'metadata': { [key: string]: string; }; + /** + * The subscription that generated this invoice + */ 'subscription': string | SubscriptionModel; + /** + * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + */ 'subscription_proration_date'?: number | undefined; }; export type BillingBillResourceInvoicingParentsInvoiceParentModel = { + /** + * Details about the quote that generated this invoice + */ 'quote_details': BillingBillResourceInvoicingParentsInvoiceQuoteParentModel; + /** + * Details about the subscription that generated this invoice + */ 'subscription_details': BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel; + /** + * The type of parent that generated this invoice + */ 'type': 'quote_details' | 'subscription_details'; }; export type InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel = { + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type InvoicePaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicePaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; }; export type InvoiceInstallmentsCardModel = { + /** + * Whether Installments are enabled for this Invoice. + */ 'enabled': boolean; }; export type InvoicePaymentMethodOptionsCardModel = { 'installments'?: InvoiceInstallmentsCardModel | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel | undefined; + /** + * The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': string; }; export type InvoicePaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; }; @@ -5093,67 +12768,175 @@ export type InvoicePaymentMethodOptionsSepaDebitModel = { }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel = { 'filters'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'ownership' | 'transactions'>; }; export type InvoicePaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicesPaymentMethodOptionsModel = { + /** + * If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + */ 'acss_debit': InvoicePaymentMethodOptionsAcssDebitModel; + /** + * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + */ 'bancontact': InvoicePaymentMethodOptionsBancontactModel; + /** + * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + */ 'card': InvoicePaymentMethodOptionsCardModel; + /** + * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ 'customer_balance': InvoicePaymentMethodOptionsCustomerBalanceModel; + /** + * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + */ 'konbini': InvoicePaymentMethodOptionsKonbiniModel; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + */ 'sepa_debit': InvoicePaymentMethodOptionsSepaDebitModel; + /** + * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + */ 'us_bank_account': InvoicePaymentMethodOptionsUsBankAccountModel; }; export type InvoicesPaymentSettingsModel = { + /** + * 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. + */ 'default_mandate': string; + /** + * Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + */ 'payment_method_options': InvoicesPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types': Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'us_bank_account' | 'wechat_pay'>; }; export type DeletedInvoiceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; }; +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export type PaymentsPrimitivesPaymentRecordsResourceAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. + */ 'value': number; }; +/** + * Information about the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel = { + /** + * ID of the Stripe Customer associated with this payment. + */ 'customer': string; + /** + * The customer's email address. + */ 'email': string; + /** + * The customer's name. + */ 'name': string; + /** + * The customer's phone number. + */ 'phone': string; }; +/** + * A representation of a physical address. + */ export type PaymentsPrimitivesPaymentRecordsResourceAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; +/** + * Billing details used by the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The billing email associated with the method of payment. + */ 'email': string; + /** + * The billing name associated with the method of payment. + */ 'name': string; + /** + * The billing phone number associated with the method of payment. + */ 'phone': string; }; @@ -5164,6 +12947,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; @@ -5175,6 +12961,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel = { + /** + * Type of the apple_pay transaction, one of `apple_pay` or `apple_pay_later`. + */ 'type': string; }; @@ -5184,45 +12973,139 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel = { 'apple_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; 'google_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': string; }; +/** + * Details of the card used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': 'credit' | 'debit' | 'prepaid' | 'unknown'; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * True if this payment was marked as MOTO and out of scope for SCA. + */ 'moto'?: boolean | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceThreeDSecureModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel; }; +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetailsModel = { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ 'display_name': string; + /** + * The custom payment method type associated with this payment. + */ 'type': string; }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel = { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The ACH payment reference for this transaction. + */ 'payment_reference': string; + /** + * The routing number for the bank account. + */ 'routing_number': string; }; +/** + * Details about the Payment Method used in this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = { 'ach_credit_transfer'?: PaymentMethodDetailsAchCreditTransferModel | undefined; 'ach_debit'?: PaymentMethodDetailsAchDebitModel | undefined; @@ -5236,6 +13119,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'bacs_debit'?: PaymentMethodDetailsBacsDebitModel | undefined; 'bancontact'?: PaymentMethodDetailsBancontactModel | undefined; 'billie'?: PaymentMethodDetailsBillieModel | undefined; + /** + * The billing details associated with the method of payment. + */ 'billing_details': PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel; 'blik'?: PaymentMethodDetailsBlikModel | undefined; 'boleto'?: PaymentMethodDetailsBoletoModel | undefined; @@ -5265,6 +13151,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'p24'?: PaymentMethodDetailsP24Model | undefined; 'pay_by_bank'?: PaymentMethodDetailsPayByBankModel | undefined; 'payco'?: PaymentMethodDetailsPaycoModel | undefined; + /** + * ID of the Stripe PaymentMethod used to make this payment. + */ 'payment_method': string; 'paynow'?: PaymentMethodDetailsPaynowModel | undefined; 'paypal'?: PaymentMethodDetailsPaypalModel | undefined; @@ -5279,6 +13168,11 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'stripe_account'?: PaymentMethodDetailsStripeAccountModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -5286,21 +13180,50 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel = { + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + */ 'payment_reference': string; }; +/** + * Processor information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel = { 'custom'?: PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel | undefined; + /** + * The processor used for this payment attempt. + */ 'type': 'custom'; }; +/** + * The customer's shipping information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The shipping recipient's name. + */ 'name': string; + /** + * The shipping recipient's phone number. + */ 'phone': string; }; +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export type PaymentRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -5309,319 +13232,971 @@ export type PaymentRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentRecord. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details': PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence': 'off_session' | 'on_session'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the latest Payment Attempt Record attached to this Payment Record. + */ 'latest_payment_attempt_record': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Shipping information for this payment. + */ 'shipping_details': PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel; }; export type InvoicesPaymentsInvoicePaymentAssociatedPaymentModel = { + /** + * ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead. + */ 'charge'?: string | ChargeModel | undefined; + /** + * ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * ID of the PaymentRecord associated with this payment when `type` is `payment_record`. + */ 'payment_record'?: string | PaymentRecordModel | undefined; + /** + * Type of payment object associated with this invoice payment. + */ 'type': 'charge' | 'payment_intent' | 'payment_record'; }; export type InvoicesPaymentsInvoicePaymentStatusTransitionsModel = { + /** + * The time that the payment was canceled. + */ 'canceled_at': number; + /** + * The time that the payment succeeded. + */ 'paid_at': number; }; +/** + * Invoice Payments represent payments made against invoices. Invoice Payments can + * be accessed in two ways: + * 1. By expanding the `payments` field on the [Invoice](https://stripe.com/docs/api#invoice) resource. + * 2. By using the Invoice Payment retrieve and list endpoints. + * + * Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices. + * This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and + * monitor the allocation details of the payments. + */ export type InvoicePaymentModel = { + /** + * Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + */ 'amount_paid': number; + /** + * Amount intended to be paid toward this invoice, in cents (or local equivalent) + */ 'amount_requested': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was paid. + */ 'invoice': string | InvoiceModel | DeletedInvoiceModel; + /** + * Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_payment'; 'payment': InvoicesPaymentsInvoicePaymentAssociatedPaymentModel; + /** + * The status of the payment, one of `open`, `paid`, or `canceled`. + */ 'status': string; 'status_transitions': InvoicesPaymentsInvoicePaymentStatusTransitionsModel; }; export type InvoiceRenderingPdfModel = { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. + */ 'page_size': 'a4' | 'auto' | 'letter'; }; export type InvoicesResourceInvoiceRenderingModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * Invoice pdf rendering options + */ 'pdf': InvoiceRenderingPdfModel; + /** + * ID of the rendering template that the invoice is formatted by. + */ 'template': string; + /** + * Version of the rendering template that the invoice is using. + */ 'template_version': number; }; export type ShippingRateDeliveryEstimateBoundModel = { + /** + * A unit of time. + */ 'unit': 'business_day' | 'day' | 'hour' | 'month' | 'week'; + /** + * Must be greater than 0. + */ 'value': number; }; export type ShippingRateDeliveryEstimateModel = { + /** + * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + */ 'maximum': ShippingRateDeliveryEstimateBoundModel; + /** + * The lower bound of the estimated range. If empty, represents no lower bound. + */ 'minimum': ShippingRateDeliveryEstimateBoundModel; }; export type ShippingRateCurrencyOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; }; export type ShippingRateFixedAmountModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * 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; + /** + * Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: ShippingRateCurrencyOptionModel; } | undefined; }; +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export type ShippingRateModel = { + /** + * Whether the shipping rate can be used for new purchases. Defaults to `true`. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'delivery_estimate': ShippingRateDeliveryEstimateModel; + /** + * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'display_name': string; 'fixed_amount'?: ShippingRateFixedAmountModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'shipping_rate'; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + */ 'tax_code': string | TaxCodeModel; + /** + * The type of calculation to use on the shipping rate. + */ 'type': 'fixed_amount'; }; export type LineItemsTaxAmountModel = { + /** + * Amount of tax applied for this rate. + */ 'amount': number; 'rate': TaxRateModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount': number; }; export type InvoicesResourceShippingCostModel = { + /** + * Total shipping cost before any taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this invoice. + */ 'shipping_rate': string | ShippingRateModel; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type InvoicesResourceStatusTransitionsModel = { + /** + * The time that the invoice draft was finalized. + */ 'finalized_at': number; + /** + * The time that the invoice was marked uncollectible. + */ 'marked_uncollectible_at': number; + /** + * The time that the invoice was paid. + */ 'paid_at': number; + /** + * The time that the invoice was voided. + */ 'voided_at': number; }; export type InvoiceItemThresholdReasonModel = { + /** + * The IDs of the line items that triggered the threshold invoice. + */ 'line_item_ids': string[]; + /** + * The quantity threshold boundary that applied to the given line item. + */ 'usage_gte': number; }; export type InvoiceThresholdReasonModel = { + /** + * The total invoice amount threshold boundary if it triggered the threshold invoice. + */ 'amount_gte': number; + /** + * Indicates which line items triggered a threshold invoice. + */ 'item_reasons': InvoiceItemThresholdReasonModel[]; }; +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export type InvoiceModel = { + /** + * The country of the business associated with this invoice, most often the business creating the invoice. + */ 'account_country': string; + /** + * The public name of the business associated with this invoice, most often the business creating the invoice. + */ 'account_name': string; + /** + * The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + */ 'account_tax_ids': Array; + /** + * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + */ 'amount_due': number; + /** + * Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. + */ 'amount_overpaid': number; + /** + * The amount, in cents (or local equivalent), that was paid. + */ 'amount_paid': number; + /** + * The difference between amount_due and amount_paid, in cents (or local equivalent). + */ 'amount_remaining': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * ID of the Connect Application that created the invoice. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + */ 'attempt_count': number; + /** + * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + */ 'attempted': boolean; + /** + * Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + */ 'auto_advance'?: boolean | undefined; 'automatic_tax': AutomaticTaxModel; + /** + * The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + */ 'automatically_finalizes_at': number; + /** + * Indicates the reason why the invoice was created. + * + * * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * * `subscription_create`: A new subscription was created. + * * `subscription_cycle`: A subscription advanced into a new period. + * * `subscription_threshold`: A subscription reached a billing threshold. + * * `subscription_update`: A subscription was updated. + * * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. + */ 'billing_reason': 'automatic_pending_invoice_item_invoice' | 'manual' | 'quote_accept' | 'subscription' | 'subscription_create' | 'subscription_cycle' | 'subscription_threshold' | 'subscription_update' | 'upcoming'; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. + */ 'confirmation_secret'?: InvoicesResourceConfirmationSecretModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * The ID of the customer who will be billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_address': AddressModel; + /** + * The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_email': string; + /** + * The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_name': string; + /** + * The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_phone': string; + /** + * The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_shipping': ShippingModel; + /** + * The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_ids'?: InvoicesResourceInvoiceTaxIdModel[] | undefined; + /** + * 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. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + */ 'default_source': string | PaymentSourceModel; + /** + * The tax rates applied to this invoice, if any. + */ 'default_tax_rates': TaxRateModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + */ 'description': string; + /** + * The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ 'due_date': number; + /** + * The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + */ 'effective_at': number; + /** + * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'ending_balance': number; + /** + * Footer displayed on the invoice. + */ 'footer': string; + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ 'from_invoice': InvoicesResourceFromInvoiceModel; + /** + * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + */ 'hosted_invoice_url'?: string | undefined; + /** + * Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`. + */ 'id'?: string | undefined; + /** + * The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'invoice_pdf'?: string | undefined; 'issuer': ConnectAccountReferenceModel; + /** + * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + */ 'last_finalization_error': ApiErrorsModel; + /** + * The ID of the most recent non-draft revision of this invoice + */ 'latest_revision': string | InvoiceModel; + /** + * The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + */ 'lines': { + /** + * Details about each object. + */ 'data': LineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ 'next_payment_attempt': number; + /** + * A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; + /** + * 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': string | AccountModel; + /** + * The parent that generated this invoice + */ 'parent': BillingBillResourceInvoicingParentsInvoiceParentModel; 'payment_settings': InvoicesPaymentSettingsModel; + /** + * Payments for this invoice + */ 'payments'?: { + /** + * Details about each object. + */ 'data': InvoicePaymentModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_end': number; + /** + * Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_start': number; + /** + * Total amount of all post-payment credit notes issued for this invoice. + */ 'post_payment_credit_notes_amount': number; + /** + * Total amount of all pre-payment credit notes issued for this invoice. + */ 'pre_payment_credit_notes_amount': number; + /** + * This is the transaction number that appears on email receipts sent for this invoice. + */ 'receipt_number': string; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ 'rendering': InvoicesResourceInvoiceRenderingModel; + /** + * The details of the cost of shipping, including the ShippingRate applied on the invoice. + */ 'shipping_cost': InvoicesResourceShippingCostModel; + /** + * Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + */ 'shipping_details': ShippingModel; + /** + * Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + */ 'starting_balance': number; + /** + * Extra information about an invoice for the customer's credit card statement. + */ 'statement_descriptor': string; + /** + * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + */ 'status': 'draft' | 'open' | 'paid' | 'uncollectible' | 'void'; 'status_transitions': InvoicesResourceStatusTransitionsModel; 'subscription'?: string | SubscriptionModel | undefined; + /** + * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + */ 'subtotal_excluding_tax': number; + /** + * ID of the test clock this invoice belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; 'threshold_reason'?: InvoiceThresholdReasonModel | undefined; + /** + * Total after discounts and taxes. + */ 'total': number; + /** + * The aggregate amounts calculated per discount across all line items. + */ 'total_discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + */ 'total_excluding_tax': number; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + */ 'total_pretax_credit_amounts': InvoicesResourcePretaxCreditAmountModel[]; + /** + * The aggregate tax information of all line items. + */ 'total_taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ 'webhooks_delivered_at': number; }; +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export type SubscriptionsResourcePauseCollectionModel = { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ 'behavior': 'keep_as_draft' | 'mark_uncollectible' | 'void'; + /** + * The time after which the subscription will resume collecting payments. + */ 'resumes_at': number; }; export type InvoiceMandateOptionsCardModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; }; export type SubscriptionPaymentMethodOptionsCardModel = { 'mandate_options'?: InvoiceMandateOptionsCardModel | undefined; + /** + * Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; export type SubscriptionsResourcePaymentMethodOptionsModel = { + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + */ 'acss_debit': InvoicePaymentMethodOptionsAcssDebitModel; + /** + * This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + */ 'bancontact': InvoicePaymentMethodOptionsBancontactModel; + /** + * This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + */ 'card': SubscriptionPaymentMethodOptionsCardModel; + /** + * This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + */ 'customer_balance': InvoicePaymentMethodOptionsCustomerBalanceModel; + /** + * This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + */ 'konbini': InvoicePaymentMethodOptionsKonbiniModel; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + */ 'sepa_debit': InvoicePaymentMethodOptionsSepaDebitModel; + /** + * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + */ 'us_bank_account': InvoicePaymentMethodOptionsUsBankAccountModel; }; export type SubscriptionsResourcePaymentSettingsModel = { + /** + * Payment-method-specific configuration to provide to invoices created by the subscription. + */ 'payment_method_options': SubscriptionsResourcePaymentMethodOptionsModel; + /** + * The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types': Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'us_bank_account' | 'wechat_pay'>; + /** + * Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. + */ 'save_default_payment_method': 'off' | 'on_subscription'; }; export type SubscriptionPendingInvoiceItemIntervalModel = { + /** + * Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + */ 'interval_count': number; }; +/** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ export type SubscriptionsResourcePendingUpdateModel = { + /** + * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ 'billing_cycle_anchor': number; + /** + * The point after which the changes reflected by this update will be discarded and no longer applied. + */ 'expires_at': number; + /** + * List of subscription items, each with an attached plan, that will be set if the update is applied. + */ 'subscription_items': SubscriptionItemModel[]; + /** + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + */ 'trial_end': number; + /** + * Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + */ 'trial_from_plan': boolean; }; export type SubscriptionScheduleCurrentPhaseModel = { + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; }; export type SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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': ConnectAccountReferenceModel; }; export type InvoiceSettingSubscriptionScheduleSettingModel = { + /** + * The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + */ 'account_tax_ids': Array; + /** + * 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; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionTransferDataModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount_percent': number; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; export type SubscriptionSchedulesResourceDefaultSettingsModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent': number; 'automatic_tax'?: SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor': 'automatic' | 'phase_start'; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * 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; 'invoice_settings': InvoiceSettingSubscriptionScheduleSettingModel; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; }; export type DiscountsResourceStackableDiscountModel = { + /** + * ID of the coupon to create a new discount for. + */ 'coupon': string | CouponModel; + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ 'discount': string | DiscountModel; + /** + * ID of the promotion code to create a new discount for. + */ 'promotion_code': string | PromotionCodeModel; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEndModel = { + /** + * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the end of the invoice item period. + */ 'type': 'min_item_period_end' | 'phase_end' | 'timestamp'; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStartModel = { + /** + * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the start of the invoice item period. + */ 'type': 'max_item_period_start' | 'phase_start' | 'timestamp'; }; @@ -5631,426 +14206,1314 @@ export type SubscriptionScheduleAddInvoiceItemPeriodModel = { }; export type DeletedPriceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; }; +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export type SubscriptionScheduleAddInvoiceItemModel = { + /** + * The stackable discounts that will be applied to the item. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * 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': { [key: string]: string; }; 'period': SubscriptionScheduleAddInvoiceItemPeriodModel; + /** + * ID of the price used to generate the invoice item. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * The quantity of the invoice item. + */ 'quantity': number; + /** + * The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; export type SchedulesPhaseAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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': ConnectAccountReferenceModel; }; export type InvoiceSettingSubscriptionSchedulePhaseSettingModel = { + /** + * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + */ 'account_tax_ids': Array; + /** + * 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': ConnectAccountReferenceModel; }; export type DeletedPlanModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; }; +/** + * A phase item describes the price and quantity of a phase. + */ export type SubscriptionScheduleConfigurationItemModel = { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionItemBillingThresholdsModel; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + */ 'metadata': { [key: string]: string; }; + /** + * ID of the plan to which the customer should be subscribed. + */ 'plan': string | PlanModel | DeletedPlanModel; + /** + * ID of the price to which the customer should be subscribed. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * Quantity of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; +/** + * A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ export type SubscriptionSchedulePhaseConfigurationModel = { + /** + * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + */ 'add_invoice_items': SubscriptionScheduleAddInvoiceItemModel[]; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent': number; 'automatic_tax'?: SchedulesPhaseAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor': 'automatic' | 'phase_start'; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * 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; + /** + * ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * The default tax rates to apply to the subscription during this phase of the subscription schedule. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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; + /** + * The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The invoice settings applicable during this phase. + */ 'invoice_settings': InvoiceSettingSubscriptionSchedulePhaseSettingModel; + /** + * Subscription items to configure the subscription to during this phase of the subscription schedule. + */ 'items': SubscriptionScheduleConfigurationItemModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + */ 'metadata': { [key: string]: string; }; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of': string | AccountModel; + /** + * When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; + /** + * When the trial ends within the phase. + */ 'trial_end': number; }; +/** + * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) + */ export type SubscriptionScheduleModel = { + /** + * ID of the Connect Application that created the schedule. + */ 'application': string | ApplicationModel | DeletedApplicationModel; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ 'completed_at': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + */ 'current_phase': SubscriptionScheduleCurrentPhaseModel; + /** + * ID of the customer who owns the subscription schedule. + */ 'customer': string | CustomerModel | DeletedCustomerModel; 'default_settings': SubscriptionSchedulesResourceDefaultSettingsModel; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + */ 'end_behavior': 'cancel' | 'none' | 'release' | 'renew'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_schedule'; + /** + * Configuration for the subscription schedule's phases. + */ 'phases': SubscriptionSchedulePhaseConfigurationModel[]; + /** + * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ 'released_at': number; + /** + * ID of the subscription once managed by the subscription schedule (if it is released). + */ 'released_subscription': string; + /** + * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ 'status': 'active' | 'canceled' | 'completed' | 'not_started' | 'released'; + /** + * ID of the subscription managed by the subscription schedule. + */ 'subscription': string | SubscriptionModel; + /** + * ID of the test clock this subscription schedule belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; }; +/** + * Defines how a subscription behaves when a free trial ends. + */ export type SubscriptionsTrialsResourceEndBehaviorModel = { + /** + * Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + */ 'missing_payment_method': 'cancel' | 'create_invoice' | 'pause'; }; +/** + * Configures how this subscription behaves during the trial period. + */ export type SubscriptionsTrialsResourceTrialSettingsModel = { 'end_behavior': SubscriptionsTrialsResourceEndBehaviorModel; }; +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export type SubscriptionModel = { + /** + * ID of the Connect Application that created the subscription. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent': number; 'automatic_tax': SubscriptionAutomaticTaxModel; + /** + * The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + */ 'billing_cycle_anchor': number; + /** + * The fixed values used to calculate the `billing_cycle_anchor`. + */ 'billing_cycle_anchor_config': SubscriptionsResourceBillingCycleAnchorConfigModel; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * A date in the future at which the subscription will automatically get canceled + */ 'cancel_at': number; + /** + * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + */ 'cancel_at_period_end': boolean; + /** + * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + */ 'canceled_at': number; + /** + * Details about why this subscription was cancelled + */ 'cancellation_details': CancellationDetailsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer who owns the subscription. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + */ 'days_until_due': number; + /** + * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_payment_method': string | PaymentMethodModel; + /** + * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_source': string | PaymentSourceModel; + /** + * The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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; + /** + * The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * If the subscription has ended, the date the subscription ended. + */ 'ended_at': number; + /** + * Unique identifier for the object. + */ 'id': string; 'invoice_settings': SubscriptionsResourceSubscriptionInvoiceSettingsModel; + /** + * List of subscription items, each with an attached price. + */ 'items': { + /** + * Details about each object. + */ 'data': SubscriptionItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * The most recent invoice this subscription has generated. + */ 'latest_invoice': string | InvoiceModel; + /** + * 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': { [key: string]: string; }; + /** + * Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + */ 'next_pending_invoice_item_invoice': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription'; + /** + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'pause_collection': SubscriptionsResourcePauseCollectionModel; + /** + * Payment settings passed on to invoices created by the subscription. + */ 'payment_settings': SubscriptionsResourcePaymentSettingsModel; + /** + * Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + */ 'pending_invoice_item_interval': SubscriptionPendingInvoiceItemIntervalModel; + /** + * You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + */ 'pending_setup_intent': string | SetupIntentModel; + /** + * If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + */ 'pending_update': SubscriptionsResourcePendingUpdateModel; + /** + * The schedule attached to the subscription + */ 'schedule': string | SubscriptionScheduleModel; + /** + * Date when the subscription was first created. The date might differ from the `created` date due to backdating. + */ 'start_date': number; + /** + * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + * + * If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + */ 'status': 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'paused' | 'trialing' | 'unpaid'; + /** + * ID of the test clock this subscription belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; + /** + * If the subscription has a trial, the end of that trial. + */ 'trial_end': number; + /** + * Settings related to subscription trials. + */ 'trial_settings': SubscriptionsTrialsResourceTrialSettingsModel; + /** + * If the subscription has a trial, the beginning of that trial. + */ 'trial_start': number; }; export type CustomerTaxLocationModel = { + /** + * The identified tax country of the customer. + */ 'country': string; + /** + * The data source used to infer the customer's location. + */ 'source': 'billing_address' | 'ip_address' | 'payment_method' | 'shipping_destination'; + /** + * The identified tax state, county, province, or region of the customer. + */ 'state': string; }; export type CustomerTaxModel = { + /** + * Surfaces if automatic tax computation is possible given the current customer location information. + */ 'automatic_tax': 'failed' | 'not_collecting' | 'supported' | 'unrecognized_location'; + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ 'ip_address': string; + /** + * The identified tax location of the customer. + */ 'location': CustomerTaxLocationModel; + /** + * The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; }; +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export type CustomerModel = { + /** + * The customer's address. + */ 'address'?: AddressModel | undefined; + /** + * The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance). + */ 'balance'?: number | undefined; + /** + * The customer's business name. + */ 'business_name'?: string | undefined; + /** + * The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + */ 'cash_balance'?: CashBalanceModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + */ 'currency'?: string | undefined; + /** + * ID of the default payment source for the customer. + * + * If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ 'default_source': string | PaymentSourceModel; + /** + * Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + * + * If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + * + * If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + */ 'delinquent'?: boolean | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Describes the current discount active on the customer, if there is one. + */ 'discount'?: DiscountModel | undefined; + /** + * The customer's email address. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The customer's individual name. + */ 'individual_name'?: string | undefined; + /** + * The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + */ 'invoice_credit_balance'?: { [key: string]: number; } | undefined; + /** + * The prefix for the customer used to generate unique invoice numbers. + */ 'invoice_prefix'?: string | undefined; 'invoice_settings'?: InvoiceSettingCustomerSettingModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The customer's full name or business name. + */ 'name'?: string | undefined; + /** + * The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + */ 'next_invoice_sequence'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; + /** + * The customer's phone number. + */ 'phone'?: string | undefined; + /** + * The customer's preferred locales (languages), ordered by preference. + */ 'preferred_locales'?: string[] | undefined; + /** + * Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + */ 'shipping': ShippingModel; + /** + * The customer's payment sources, if any. + */ 'sources'?: { + /** + * Details about each object. + */ 'data': PaymentSourceModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The customer's current subscriptions, if any. + */ 'subscriptions'?: { + /** + * Details about each object. + */ 'data': SubscriptionModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'tax'?: CustomerTaxModel | undefined; + /** + * Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + */ 'tax_exempt'?: 'exempt' | 'none' | 'reverse' | undefined; + /** + * The customer's tax IDs. + */ 'tax_ids'?: { + /** + * Details about each object. + */ 'data': TaxIdModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the test clock that this customer belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; }; export type AccountRequirementsErrorModel = { + /** + * The code for the type of error. + */ 'code': 'external_request' | 'information_missing' | 'invalid_address_city_state_postal_code' | 'invalid_address_highway_contract_box' | 'invalid_address_private_mailbox' | 'invalid_business_profile_name' | 'invalid_business_profile_name_denylisted' | 'invalid_company_name_denylisted' | 'invalid_dob_age_over_maximum' | 'invalid_dob_age_under_18' | 'invalid_dob_age_under_minimum' | 'invalid_product_description_length' | 'invalid_product_description_url_match' | 'invalid_representative_country' | 'invalid_signator' | 'invalid_statement_descriptor_business_mismatch' | 'invalid_statement_descriptor_denylisted' | 'invalid_statement_descriptor_length' | 'invalid_statement_descriptor_prefix_denylisted' | 'invalid_statement_descriptor_prefix_mismatch' | 'invalid_street_address' | 'invalid_tax_id' | 'invalid_tax_id_format' | 'invalid_tos_acceptance' | 'invalid_url_denylisted' | 'invalid_url_format' | 'invalid_url_length' | 'invalid_url_web_presence_detected' | 'invalid_url_website_business_information_mismatch' | 'invalid_url_website_empty' | 'invalid_url_website_inaccessible' | 'invalid_url_website_inaccessible_geoblocked' | 'invalid_url_website_inaccessible_password_protected' | 'invalid_url_website_incomplete' | 'invalid_url_website_incomplete_cancellation_policy' | 'invalid_url_website_incomplete_customer_service_details' | 'invalid_url_website_incomplete_legal_restrictions' | 'invalid_url_website_incomplete_refund_policy' | 'invalid_url_website_incomplete_return_policy' | 'invalid_url_website_incomplete_terms_and_conditions' | 'invalid_url_website_incomplete_under_construction' | 'invalid_url_website_other' | 'invalid_value_other' | 'unsupported_business_type' | 'verification_directors_mismatch' | 'verification_document_address_mismatch' | 'verification_document_address_missing' | 'verification_document_corrupt' | 'verification_document_country_not_supported' | 'verification_document_directors_mismatch' | '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_extraneous_directors' | 'verification_failed_address_match' | 'verification_failed_authorizer_authority' | '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_representative_authority' | 'verification_failed_residential_address' | 'verification_failed_tax_id_match' | 'verification_failed_tax_id_not_issued' | 'verification_legal_entity_structure_mismatch' | 'verification_missing_directors' | 'verification_missing_executives' | 'verification_missing_owners' | 'verification_rejected_ownership_exemption_reason' | 'verification_requires_additional_memorandum_of_associations' | 'verification_requires_additional_proof_of_registration' | 'verification_supportability'; + /** + * 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; }; export type ExternalAccountRequirementsModel = { + /** + * 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': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; +/** + * These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](/api#external_accounts) are transfer + * destinations on `Account` objects for connected accounts. + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + */ export type BankAccountModel = { + /** + * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'account'?: string | AccountModel | undefined; + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name': string; + /** + * The type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type': string; + /** + * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + */ 'account_type': string; + /** + * A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + */ 'bank_name': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency': string; + /** + * The ID of the customer that the bank account is associated with. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Whether this bank account is the default external account for its currency. + */ 'default_for_currency'?: boolean | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + */ 'future_requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the bank account number. + */ 'last4': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; + /** + * Information about the requirements for the bank account, including what information needs to be collected. + */ 'requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * The routing transit number for the bank account. + */ 'routing_number': string; + /** + * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + * + * For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + */ 'status': string; }; export type ExternalAccountModel = BankAccountModel | CardModel; export type AccountRequirementsAlternativeModel = { + /** + * Fields that can be provided to satisfy all fields in `original_fields_due`. + */ 'alternative_fields_due': string[]; + /** + * Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + */ 'original_fields_due': string[]; }; export type AccountFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due': string[]; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`. + */ 'disabled_reason': 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountGroupMembershipModel = { + /** + * The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + */ 'payments_pricing': string; }; export type PersonAdditionalTosAcceptanceModel = { + /** + * The Unix timestamp marking when the legal guardian accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the legal guardian accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the legal guardian accepted the service agreement. + */ 'user_agent': string; }; export type PersonAdditionalTosAcceptancesModel = { + /** + * Details on the legal guardian's acceptance of the main Stripe service agreement. + */ 'account': PersonAdditionalTosAcceptanceModel; }; export type LegalEntityDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type PersonFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonRelationshipModel = { + /** + * Whether the person is the authorizer of the account's representative. + */ 'authorizer': boolean; + /** + * Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + */ 'director': boolean; + /** + * Whether the person has significant responsibility to control, manage, or direct the organization. + */ 'executive': boolean; + /** + * Whether the person is the legal guardian of the account's representative. + */ 'legal_guardian': boolean; + /** + * Whether the person is an owner of the account’s legal entity. + */ 'owner': boolean; + /** + * The percent owned by the person of the account's legal entity. + */ 'percent_ownership': number; + /** + * Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + */ 'representative': boolean; + /** + * The person's title (e.g., CEO, Support Engineer). + */ 'title': string; }; export type PersonRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonEthnicityDetailsModel = { + /** + * The persons ethnicity + */ 'ethnicity': Array<'cuban' | 'hispanic_or_latino' | 'mexican' | 'not_hispanic_or_latino' | 'other_hispanic_or_latino' | 'prefer_not_to_answer' | 'puerto_rican'>; + /** + * Please specify your origin, when other is selected. + */ 'ethnicity_other': string; }; export type PersonRaceDetailsModel = { + /** + * The persons race. + */ 'race': Array<'african_american' | 'american_indian_or_alaska_native' | 'asian' | 'asian_indian' | 'black_or_african_american' | 'chinese' | 'ethiopian' | 'filipino' | 'guamanian_or_chamorro' | 'haitian' | 'jamaican' | 'japanese' | 'korean' | 'native_hawaiian' | 'native_hawaiian_or_other_pacific_islander' | 'nigerian' | 'other_asian' | 'other_black_or_african_american' | 'other_pacific_islander' | 'prefer_not_to_answer' | 'samoan' | 'somali' | 'vietnamese' | 'white'>; + /** + * Please specify your race, when other is selected. + */ 'race_other': string; }; export type PersonUsCfpbDataModel = { + /** + * The persons ethnicity details + */ 'ethnicity_details': PersonEthnicityDetailsModel; + /** + * The persons race details + */ 'race_details': PersonRaceDetailsModel; + /** + * The persons self-identified gender + */ 'self_identified_gender': string; }; export type LegalEntityPersonVerificationDocumentModel = { + /** + * The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back': string | FileModel; + /** + * A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + */ 'details': string; + /** + * One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + */ 'details_code': string; + /** + * The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front': string | FileModel; }; export type LegalEntityPersonVerificationModel = { + /** + * A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + */ 'additional_document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + */ 'details'?: string | undefined; + /** + * One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + */ 'details_code'?: string | undefined; 'document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://stripe.com/docs/connect/handling-api-verification) to handle verification updates. + */ 'status': string; }; +/** + * This is an object representing a person associated with a Stripe account. + * + * A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + * + * See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + */ export type PersonModel = { + /** + * The account the person is associated with. + */ 'account'?: string | undefined; 'additional_tos_acceptances'?: PersonAdditionalTosAcceptancesModel | undefined; 'address'?: AddressModel | undefined; + /** + * The Kana variation of the person's address (Japan only). + */ 'address_kana'?: LegalEntityJapanAddressModel | undefined; + /** + * The Kanji variation of the person's address (Japan only). + */ 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'dob'?: LegalEntityDobModel | undefined; + /** + * The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'email'?: string | undefined; + /** + * The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name'?: string | undefined; + /** + * The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kanji'?: string | undefined; + /** + * A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'full_name_aliases'?: string[] | undefined; + /** + * Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + */ 'future_requirements'?: PersonFutureRequirementsModel | undefined; + /** + * The person's gender. + */ 'gender'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + */ 'id_number_provided'?: boolean | undefined; + /** + * Whether the person's `id_number_secondary` was provided. + */ 'id_number_secondary_provided'?: boolean | undefined; + /** + * The person's last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name'?: string | undefined; + /** + * The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kanji'?: string | undefined; + /** + * The person's maiden name. + */ 'maiden_name'?: string | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The country where the person is a national. + */ 'nationality'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; + /** + * The person's phone number. + */ 'phone'?: string | undefined; + /** + * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + */ 'political_exposure'?: 'existing' | 'none' | undefined; 'registered_address'?: AddressModel | undefined; 'relationship'?: PersonRelationshipModel | undefined; + /** + * Information about the requirements for this person, including what information needs to be collected, and by when. + */ 'requirements'?: PersonRequirementsModel | undefined; + /** + * Whether the last four digits of the person's Social Security number have been provided (U.S. only). + */ 'ssn_last_4_provided'?: boolean | undefined; + /** + * Demographic data related to the person. + */ 'us_cfpb_data'?: PersonUsCfpbDataModel | undefined; 'verification'?: LegalEntityPersonVerificationModel | undefined; }; export type AccountRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due': string[]; + /** + * If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason': 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountBacsDebitPaymentsSettingsModel = { + /** + * The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + */ 'display_name': string; + /** + * The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + */ 'service_user_number': string; }; export type AccountBrandingSettingsModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + */ 'icon': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + */ 'logo': string | FileModel; + /** + * A CSS hex color value representing the primary branding color for this account + */ 'primary_color': string; + /** + * A CSS hex color value representing the secondary branding color for this account + */ 'secondary_color': string; }; export type CardIssuingAccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -6059,57 +15522,135 @@ export type AccountCardIssuingSettingsModel = { }; export type AccountDeclineChargeOnModel = { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + */ 'avs_failure': boolean; + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + */ 'cvc_failure': boolean; }; export type AccountCardPaymentsSettingsModel = { 'decline_on'?: AccountDeclineChargeOnModel | undefined; + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix': string; + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kana': string; + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kanji': string; }; export type AccountDashboardSettingsModel = { + /** + * The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + */ 'display_name': string; + /** + * The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + */ 'timezone': string; }; export type AccountInvoicesSettingsModel = { + /** + * The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + */ 'default_account_tax_ids': Array; + /** + * Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page. + */ 'hosted_payment_method_save': 'always' | 'never' | 'offer'; }; export type AccountPaymentsSettingsModel = { + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + */ 'statement_descriptor': string; + /** + * The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kana': string; + /** + * The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kanji': string; + /** + * The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_prefix_kana': string; + /** + * The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_prefix_kanji': string; }; export type TransferScheduleModel = { + /** + * The number of days charges for the account will be held before being paid out. + */ 'delay_days': number; + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval': string; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_anchor'?: number | undefined; + /** + * The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + */ 'weekly_anchor'?: string | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type AccountPayoutSettingsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances': boolean; 'schedule': TransferScheduleModel; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor': string; }; export type AccountSepaDebitPaymentsSettingsModel = { + /** + * SEPA creditor identifier that identifies the company making the payment. + */ 'creditor_id'?: string | undefined; }; export type AccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -6131,129 +15672,341 @@ export type AccountSettingsModel = { }; export type AccountTosAcceptanceModel = { + /** + * The Unix timestamp marking when the account representative accepted their service agreement + */ 'date'?: number | undefined; + /** + * The IP address from which the account representative accepted their service agreement + */ 'ip'?: string | undefined; + /** + * The user's service agreement type + */ 'service_agreement'?: string | undefined; + /** + * The user agent of the browser from which the account representative accepted their service agreement + */ 'user_agent'?: string | undefined; }; +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export type AccountModel = { + /** + * Business information about the account. + */ 'business_profile'?: AccountBusinessProfileModel | undefined; + /** + * The business type. + */ 'business_type'?: 'company' | 'government_entity' | 'individual' | 'non_profit' | undefined; 'capabilities'?: AccountCapabilitiesModel | undefined; + /** + * Whether the account can process charges. + */ 'charges_enabled'?: boolean | undefined; 'company'?: LegalEntityCompanyModel | undefined; 'controller'?: AccountUnificationAccountControllerModel | undefined; + /** + * The account's country. + */ 'country'?: string | undefined; + /** + * Time at which the account was connected. Measured in seconds since the Unix epoch. + */ 'created'?: number | undefined; + /** + * Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + */ 'default_currency'?: string | undefined; + /** + * Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + */ 'details_submitted'?: boolean | undefined; + /** + * An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + */ 'email'?: string | undefined; + /** + * External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + */ 'external_accounts'?: { + /** + * The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. + */ 'data': ExternalAccountModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'future_requirements'?: AccountFutureRequirementsModel | undefined; + /** + * The groups associated with the account. + */ 'groups'?: AccountGroupMembershipModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'individual'?: PersonModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; + /** + * Whether the funds in this account can be paid out. + */ 'payouts_enabled'?: boolean | undefined; 'requirements'?: AccountRequirementsModel | undefined; + /** + * Options for customizing how the account functions within Stripe. + */ 'settings'?: AccountSettingsModel | undefined; 'tos_acceptance'?: AccountTosAcceptanceModel | undefined; + /** + * The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + */ 'type'?: 'custom' | 'express' | 'none' | 'standard' | undefined; }; +/** + * Occurs whenever a user authorizes an application. Sent to the related application only. + */ export type AccountApplicationAuthorizedModel = { 'object': ApplicationModel; }; +/** + * Occurs whenever a user deauthorizes an application. Sent to the related application only. + */ export type AccountApplicationDeauthorizedModel = { 'object': ApplicationModel; }; +/** + * Occurs whenever an external account is created. + */ export type AccountExternalAccountCreatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an external account is deleted. + */ export type AccountExternalAccountDeletedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an external account is updated. + */ export type AccountExternalAccountUpdatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an account status or property has changed. + */ export type AccountUpdatedModel = { 'object': AccountModel; }; export type AccountCapabilityFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due': string[]; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + */ 'disabled_reason': 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountCapabilityRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. + */ 'currently_due': string[]; + /** + * Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason': 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; +/** + * Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. + * + * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) + */ export type AccountLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The timestamp at which this account link will expire. + */ 'expires_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_link'; + /** + * The URL for the account link. + */ 'url': string; }; export type ConnectEmbeddedAccountFeaturesClaimModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; }; export type ConnectEmbeddedAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedAccountFeaturesClaimModel; }; export type ConnectEmbeddedPayoutsFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'edit_payout_schedule': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; + /** + * Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'standard_payouts': boolean; }; export type ConnectEmbeddedPayoutsConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPayoutsFeaturesModel; }; export type ConnectEmbeddedDisputesListFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedDisputesListConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedDisputesListFeaturesModel; }; @@ -6263,86 +16016,182 @@ export type ConnectEmbeddedBaseFeaturesModel = { }; export type ConnectEmbeddedBaseConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedBaseFeaturesModel; }; export type ConnectEmbeddedFinancialAccountFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow sending money. + */ 'send_money': boolean; + /** + * Whether to allow transferring balance. + */ 'transfer_balance': boolean; }; export type ConnectEmbeddedFinancialAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountFeaturesModel; }; export type ConnectEmbeddedFinancialAccountTransactionsFeaturesModel = { + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; }; export type ConnectEmbeddedFinancialAccountTransactionsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountTransactionsFeaturesModel; }; export type ConnectEmbeddedInstantPayoutsPromotionFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; }; export type ConnectEmbeddedInstantPayoutsPromotionConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedInstantPayoutsPromotionFeaturesModel; }; export type ConnectEmbeddedIssuingCardFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardFeaturesModel; }; export type ConnectEmbeddedIssuingCardsListFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardsListConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardsListFeaturesModel; }; export type ConnectEmbeddedPaymentsFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentsFeaturesModel; }; export type ConnectEmbeddedPaymentDisputesFeaturesModel = { + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentDisputesConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentDisputesFeaturesModel; }; @@ -6369,264 +16218,661 @@ export type ConnectEmbeddedAccountSessionCreateComponentsModel = { 'tax_settings': ConnectEmbeddedBaseConfigClaimModel; }; +/** + * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. + * + * We recommend that you create an AccountSession each time you need to display an embedded component + * to your user. Do not save AccountSessions to your database as they expire relatively + * quickly, and cannot be used more than once. + * + * Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + */ export type AccountSessionModel = { + /** + * The ID of the account the AccountSession was created for + */ 'account': string; + /** + * The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + * + * The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + */ 'client_secret': string; 'components': ConnectEmbeddedAccountSessionCreateComponentsModel; + /** + * The timestamp at which this AccountSession will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_session'; }; export type ApplePayDomainModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'domain_name': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; +/** + * Occurs whenever an application fee is created on a charge. + */ export type ApplicationFeeCreatedModel = { 'object': ApplicationFeeModel; }; +/** + * Occurs whenever an application fee refund is updated. + */ export type ApplicationFeeRefundUpdatedModel = { 'object': FeeRefundModel; }; +/** + * Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds). This includes partial refunds. + */ export type ApplicationFeeRefundedModel = { 'object': ApplicationFeeModel; }; export type SecretServiceResourceScopeModel = { + /** + * The secret scope type. + */ 'type': 'account' | 'user'; + /** + * The user ID, if type is set to "user" + */ 'user'?: string | undefined; }; +/** + * Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) + */ export type AppsSecretModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If true, indicates that this secret has been deleted + */ 'deleted'?: boolean | undefined; + /** + * The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A name for the secret that's unique within the scope. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apps.secret'; + /** + * The plaintext secret value to be stored. + */ 'payload'?: string | undefined; 'scope': SecretServiceResourceScopeModel; }; export type BalanceAmountBySourceTypeModel = { + /** + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). + */ 'bank_account'?: number | undefined; + /** + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). + */ 'card'?: number | undefined; + /** + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. + */ 'fpx'?: number | undefined; }; export type BalanceAmountModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceNetAvailableModel = { + /** + * Net balance amount, subtracting fees from platform-set pricing. + */ 'amount': number; + /** + * ID of the external account for this net balance (not expandable). + */ 'destination': string; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceAmountNetModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; + /** + * Breakdown of balance by destination. + */ 'net_available'?: BalanceNetAvailableModel[] | undefined; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceDetailModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; }; export type BalanceDetailUngatedModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; + /** + * Funds that are pending + */ 'pending': BalanceAmountModel[]; }; +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export type BalanceModel = { + /** + * Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + */ 'available': BalanceAmountModel[]; + /** + * Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + */ 'connect_reserved'?: BalanceAmountModel[] | undefined; + /** + * Funds that you can pay out using Instant Payouts. + */ 'instant_available'?: BalanceAmountNetModel[] | undefined; 'issuing'?: BalanceDetailModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance'; + /** + * Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + */ 'pending': BalanceAmountModel[]; 'refund_and_dispute_prefunding'?: BalanceDetailUngatedModel | undefined; }; +/** + * Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. + */ export type BalanceAvailableModel = { 'object': BalanceModel; }; export type BalanceSettingsResourcePayoutScheduleModel = { + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval': 'daily' | 'manual' | 'monthly' | 'weekly'; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type BalanceSettingsResourcePayoutsModel = { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](/payouts/minimum-balances-for-automatic-payouts). + */ 'minimum_balance_by_currency': { [key: string]: number; }; + /** + * Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details. + */ 'schedule': BalanceSettingsResourcePayoutScheduleModel; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor': string; + /** + * Whether the funds in this account can be paid out. + */ 'status': 'disabled' | 'enabled'; }; export type BalanceSettingsResourceSettlementTimingModel = { + /** + * The number of days charge funds are held before becoming available. + */ 'delay_days': number; + /** + * The number of days charge funds are held before becoming available. If present, overrides the default, or minimum available, for the account. + */ 'delay_days_override'?: number | undefined; }; export type BalanceSettingsResourcePaymentsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances': boolean; + /** + * Settings specific to the account's payouts. + */ 'payouts': BalanceSettingsResourcePayoutsModel; 'settlement_timing': BalanceSettingsResourceSettlementTimingModel; }; +/** + * Options for customizing account balances and payout settings for a Stripe platform’s connected accounts. + */ export type BalanceSettingsModel = { + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_settings'; 'payments': BalanceSettingsResourcePaymentsModel; }; +/** + * Occurs whenever a balance settings status or property has changed. + */ export type BalanceSettingsUpdatedModel = { 'object': BalanceSettingsModel; }; export type BankConnectionsResourceAccountNumberDetailsModel = { + /** + * When the account number is expected to expire, if applicable. + */ 'expected_expiry_date': number; + /** + * The type of account number associated with the account. + */ 'identifier_type': 'account_number' | 'tokenized_account_number'; + /** + * Whether the account number is currently active and usable for transactions. + */ 'status': 'deactivated' | 'transactable'; + /** + * The payment networks that the account number can be used for. + */ 'supported_networks': 'ach'[]; }; export type BankConnectionsResourceAccountholderModel = { + /** + * The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; + /** + * Type of account holder that this account belongs to. + */ 'type': 'account' | 'customer'; }; export type BankConnectionsResourceBalanceApiResourceCashBalanceModel = { + /** + * The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'available': { [key: string]: number; }; }; export type BankConnectionsResourceBalanceApiResourceCreditBalanceModel = { + /** + * The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'used': { [key: string]: number; }; }; export type BankConnectionsResourceBalanceModel = { + /** + * The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ 'as_of': number; 'cash'?: BankConnectionsResourceBalanceApiResourceCashBalanceModel | undefined; 'credit'?: BankConnectionsResourceBalanceApiResourceCreditBalanceModel | undefined; + /** + * The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'current': { [key: string]: number; }; + /** + * The `type` of the balance. An additional hash is included on the balance with a name matching this value. + */ 'type': 'cash' | 'credit'; }; export type BankConnectionsResourceBalanceRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceLinkAccountSessionFiltersModel = { + /** + * Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + */ 'account_subcategories': Array<'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'savings'>; + /** + * List of countries from which to filter accounts. + */ 'countries': string[]; }; export type BankConnectionsResourceOwnershipRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionRefreshModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionResourceStatusTransitionsModel = { + /** + * Time at which this transaction posted. Measured in seconds since the Unix epoch. + */ 'posted_at': number; + /** + * Time at which this transaction was voided. Measured in seconds since the Unix epoch. + */ 'void_at': number; }; export type ThresholdsResourceUsageAlertFilterModel = { + /** + * Limit the scope of the alert to this customer ID + */ 'customer': string | CustomerModel; 'type': 'customer'; }; export type BillingMeterResourceCustomerMappingSettingsModel = { + /** + * The key in the meter event payload to use for mapping the event to a customer. + */ 'event_payload_key': string; + /** + * The method for mapping a meter event to a customer. + */ 'type': 'by_id'; }; export type BillingMeterResourceAggregationSettingsModel = { + /** + * Specifies how events are aggregated. + */ 'formula': 'count' | 'last' | 'sum'; }; export type BillingMeterResourceBillingMeterStatusTransitionsModel = { + /** + * The time the meter was deactivated, if any. Measured in seconds since Unix epoch. + */ 'deactivated_at': number; }; export type BillingMeterResourceBillingMeterValueModel = { + /** + * The key in the meter event payload to use as the value for this meter. + */ 'event_payload_key': string; }; +/** + * Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. + * + * Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) + */ export type BillingMeterModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'customer_mapping': BillingMeterResourceCustomerMappingSettingsModel; 'default_aggregation': BillingMeterResourceAggregationSettingsModel; + /** + * The meter's name. + */ 'display_name': string; + /** + * The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + */ 'event_name': string; + /** + * The time window which meter events have been pre-aggregated for, if any. + */ 'event_time_window': 'day' | 'hour'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter'; + /** + * The meter's status. + */ 'status': 'active' | 'inactive'; 'status_transitions': BillingMeterResourceBillingMeterStatusTransitionsModel; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; 'value_settings': BillingMeterResourceBillingMeterValueModel; }; +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export type ThresholdsResourceUsageThresholdConfigModel = { + /** + * The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. + */ 'filters': ThresholdsResourceUsageAlertFilterModel[]; + /** + * The value at which this alert will trigger. + */ 'gte': number; + /** + * The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + */ 'meter': string | BillingMeterModel; + /** + * Defines how the alert will behave. + */ 'recurrence': 'one_time'; }; +/** + * A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + */ export type BillingAlertModel = { + /** + * Defines the type of the alert. + */ 'alert_type': 'usage_threshold'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.alert'; + /** + * Status of the alert. This can be active, inactive or archived. + */ 'status': 'active' | 'archived' | 'inactive'; + /** + * Title of the alert. + */ 'title': string; + /** + * Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + */ 'usage_threshold': ThresholdsResourceUsageThresholdConfigModel; }; export type BillingAlertTriggered_1Model = { 'alert': BillingAlertModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of customer for which the alert triggered + */ 'customer': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.alert_triggered'; + /** + * The value triggering the alert + */ 'value': number; }; +/** + * Occurs whenever your custom alert threshold is met. + */ export type BillingAlertTriggeredModel = { 'object': BillingAlertTriggered_1Model; }; @@ -6636,144 +16882,342 @@ export type CreditBalanceModel = { 'ledger_balance': BillingCreditGrantsResourceAmountModel; }; +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export type BillingCreditBalanceSummaryModel = { + /** + * The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + */ 'balances': CreditBalanceModel[]; + /** + * The customer the balance is for. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_summary'; }; +/** + * Occurs when a credit balance transaction is created + */ export type BillingCreditBalanceTransactionCreatedModel = { 'object': BillingCreditBalanceTransactionModel; }; +/** + * Occurs when a credit grant is created + */ export type BillingCreditGrantCreatedModel = { 'object': BillingCreditGrantModel; }; +/** + * Occurs when a credit grant is updated + */ export type BillingCreditGrantUpdatedModel = { 'object': BillingCreditGrantModel; }; +/** + * Occurs when a meter is created + */ export type BillingMeterCreatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is deactivated + */ export type BillingMeterDeactivatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is reactivated + */ export type BillingMeterReactivatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is updated + */ export type BillingMeterUpdatedModel = { 'object': BillingMeterModel; }; +/** + * Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. + */ export type BillingMeterEventModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * A unique identifier for the event. + */ 'identifier': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event'; + /** + * The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + */ 'payload': { [key: string]: string; }; + /** + * The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + */ 'timestamp': number; }; export type BillingMeterResourceBillingMeterEventAdjustmentCancelModel = { + /** + * Unique identifier for the event. + */ 'identifier': string; }; +/** + * A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. + */ export type BillingMeterEventAdjustmentModel = { + /** + * Specifies which event to cancel. + */ 'cancel': BillingMeterResourceBillingMeterEventAdjustmentCancelModel; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_adjustment'; + /** + * The meter event adjustment's status. + */ 'status': 'complete' | 'pending'; + /** + * Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + */ 'type': 'cancel'; }; +/** + * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much + * usage was accrued by a customer for that period. + * + * Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. + */ export type BillingMeterEventSummaryModel = { + /** + * Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + */ 'aggregated_value': number; + /** + * End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + */ 'end_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The meter associated with this event summary. + */ 'meter': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_summary'; + /** + * Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + */ 'start_time': number; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel = { + /** + * The subscription that generated this invoice item + */ 'subscription': string; + /** + * The subscription item that generated this invoice item + */ 'subscription_item'?: string | undefined; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemParentModel = { + /** + * Details about the subscription that generated this invoice item + */ 'subscription_details': BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel; + /** + * The type of parent that generated this invoice item + */ 'type': 'subscription_details'; }; export type PortalBusinessProfileModel = { + /** + * The messaging shown to customers in the portal. + */ 'headline': string; + /** + * A link to the business’s publicly available privacy policy. + */ 'privacy_policy_url': string; + /** + * A link to the business’s publicly available terms of service. + */ 'terms_of_service_url': string; }; export type PortalCustomerUpdateModel = { + /** + * The types of customer updates that are supported. When empty, customers are not updateable. + */ 'allowed_updates': Array<'address' | 'email' | 'name' | 'phone' | 'shipping' | 'tax_id'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalInvoiceListModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalPaymentMethodUpdateModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The [Payment Method Configuration](/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set, the default payment method configuration is used. + */ 'payment_method_configuration': string; }; export type PortalSubscriptionCancellationReasonModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Which cancellation reasons will be given as options to the customer. + */ 'options': Array<'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused'>; }; export type PortalSubscriptionCancelModel = { 'cancellation_reason': PortalSubscriptionCancellationReasonModel; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Whether to cancel subscriptions immediately or at the end of the billing period. + */ 'mode': 'at_period_end' | 'immediately'; + /** + * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; }; export type PortalSubscriptionUpdateProductAdjustableQuantityModel = { + /** + * If true, the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity that can be set for the product. + */ 'maximum': number; + /** + * The minimum quantity that can be set for the product. + */ 'minimum': number; }; export type PortalSubscriptionUpdateProductModel = { 'adjustable_quantity': PortalSubscriptionUpdateProductAdjustableQuantityModel; + /** + * The list of price IDs which, when subscribed to, a subscription can be updated. + */ 'prices': string[]; + /** + * The product ID. + */ 'product': string; }; export type PortalResourceScheduleUpdateAtPeriodEndConditionModel = { + /** + * The type of condition. + */ 'type': 'decreasing_item_amount' | 'shortening_interval'; }; export type PortalResourceScheduleUpdateAtPeriodEndModel = { + /** + * List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + */ 'conditions': PortalResourceScheduleUpdateAtPeriodEndConditionModel[]; }; export type PortalSubscriptionUpdateModel = { + /** + * The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. + */ 'default_allowed_updates': Array<'price' | 'promotion_code' | 'quantity'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The list of up to 10 products that support subscription updates. + */ 'products'?: PortalSubscriptionUpdateProductModel[] | undefined; + /** + * Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; 'schedule_at_period_end': PortalResourceScheduleUpdateAtPeriodEndModel; + /** + * Determines how handle updates to trialing subscriptions. Valid values are `end_trial` and `continue_trial`. Defaults to a value of `end_trial` if you don't set it during creation. + */ 'trial_update_behavior': 'continue_trial' | 'end_trial'; }; @@ -6786,381 +17230,928 @@ export type PortalFeaturesModel = { }; export type PortalLoginPageModel = { + /** + * If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ 'enabled': boolean; + /** + * A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. + */ 'url': string; }; +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export type BillingPortalConfigurationModel = { + /** + * Whether the configuration is active and can be used to create portal sessions. + */ 'active': boolean; + /** + * ID of the Connect Application that created the configuration. + */ 'application': string | ApplicationModel | DeletedApplicationModel; 'business_profile': PortalBusinessProfileModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + */ 'default_return_url': string; 'features': PortalFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'login_page': PortalLoginPageModel; + /** + * 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': { [key: string]: string; }; + /** + * The name of the configuration. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.configuration'; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; +/** + * Occurs whenever a portal configuration is created. + */ export type BillingPortalConfigurationCreatedModel = { 'object': BillingPortalConfigurationModel; }; +/** + * Occurs whenever a portal configuration is updated. + */ export type BillingPortalConfigurationUpdatedModel = { 'object': BillingPortalConfigurationModel; }; export type PortalFlowsAfterCompletionHostedConfirmationModel = { + /** + * A custom message to display to the customer after the flow is completed. + */ 'custom_message': string; }; export type PortalFlowsAfterCompletionRedirectModel = { + /** + * The URL the customer will be redirected to after the flow is completed. + */ 'return_url': string; }; export type PortalFlowsFlowAfterCompletionModel = { + /** + * Configuration when `after_completion.type=hosted_confirmation`. + */ 'hosted_confirmation': PortalFlowsAfterCompletionHostedConfirmationModel; + /** + * Configuration when `after_completion.type=redirect`. + */ 'redirect': PortalFlowsAfterCompletionRedirectModel; + /** + * The specified type of behavior after the flow is completed. + */ 'type': 'hosted_confirmation' | 'portal_homepage' | 'redirect'; }; export type PortalFlowsCouponOfferModel = { + /** + * The ID of the coupon to be offered. + */ 'coupon': string; }; export type PortalFlowsRetentionModel = { + /** + * Configuration when `retention.type=coupon_offer`. + */ 'coupon_offer': PortalFlowsCouponOfferModel; + /** + * Type of retention strategy that will be used. + */ 'type': 'coupon_offer'; }; export type PortalFlowsFlowSubscriptionCancelModel = { + /** + * Specify a retention strategy to be used in the cancellation flow. + */ 'retention': PortalFlowsRetentionModel; + /** + * The ID of the subscription to be canceled. + */ 'subscription': string; }; export type PortalFlowsFlowSubscriptionUpdateModel = { + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsSubscriptionUpdateConfirmDiscountModel = { + /** + * The ID of the coupon to apply to this subscription update. + */ 'coupon': string; + /** + * The ID of a promotion code to apply to this subscription update. + */ 'promotion_code': string; }; export type PortalFlowsSubscriptionUpdateConfirmItemModel = { + /** + * The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + */ 'id': string; + /** + * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + */ 'price': string; + /** + * [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + */ 'quantity'?: number | undefined; }; export type PortalFlowsFlowSubscriptionUpdateConfirmModel = { + /** + * The coupon or promotion code to apply to this subscription update. + */ 'discounts': PortalFlowsSubscriptionUpdateConfirmDiscountModel[]; + /** + * The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + */ 'items': PortalFlowsSubscriptionUpdateConfirmItemModel[]; + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsFlowModel = { 'after_completion': PortalFlowsFlowAfterCompletionModel; + /** + * Configuration when `flow.type=subscription_cancel`. + */ 'subscription_cancel': PortalFlowsFlowSubscriptionCancelModel; + /** + * Configuration when `flow.type=subscription_update`. + */ 'subscription_update': PortalFlowsFlowSubscriptionUpdateModel; + /** + * Configuration when `flow.type=subscription_update_confirm`. + */ 'subscription_update_confirm': PortalFlowsFlowSubscriptionUpdateConfirmModel; + /** + * Type of flow that the customer will go through. + */ 'type': 'payment_method_update' | 'subscription_cancel' | 'subscription_update' | 'subscription_update_confirm'; }; +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export type BillingPortalSessionModel = { + /** + * The configuration used by this session, describing the features available. + */ 'configuration': string | BillingPortalConfigurationModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the customer for this session. + */ 'customer': string; + /** + * Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + */ 'flow': PortalFlowsFlowModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + */ 'locale': 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-SG' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.session'; + /** + * The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + */ 'on_behalf_of': string; + /** + * The URL to redirect customers to when they click on the portal's link to return to your website. + */ 'return_url': string; + /** + * The short-lived URL of the session that gives customers access to the customer portal. + */ 'url': string; }; +/** + * Occurs whenever a portal session is created. + */ export type BillingPortalSessionCreatedModel = { 'object': BillingPortalSessionModel; }; +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export type CapabilityModel = { + /** + * The account for which the capability enables functionality. + */ 'account': string | AccountModel; 'future_requirements'?: AccountCapabilityFutureRequirementsModel | undefined; + /** + * The identifier for the capability. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'capability'; + /** + * Whether the capability has been requested. + */ 'requested': boolean; + /** + * Time at which the capability was requested. Measured in seconds since the Unix epoch. + */ 'requested_at': number; 'requirements'?: AccountCapabilityRequirementsModel | undefined; + /** + * The status of the capability. + */ 'status': 'active' | 'inactive' | 'pending' | 'unrequested'; }; +/** + * Occurs whenever a capability has new requirements or a new status. + */ export type CapabilityUpdatedModel = { 'object': CapabilityModel; }; +/** + * Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance. + */ export type CashBalanceFundsAvailableModel = { 'object': CashBalanceModel; }; +/** + * Occurs whenever a previously uncaptured charge is captured. + */ export type ChargeCapturedModel = { 'object': ChargeModel; }; +/** + * Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`. + */ export type ChargeDisputeClosedModel = { 'object': DisputeModel; }; +/** + * Occurs whenever a customer disputes a charge with their bank. + */ export type ChargeDisputeCreatedModel = { 'object': DisputeModel; }; +/** + * Occurs when funds are reinstated to your account after a dispute is closed. This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments). + */ export type ChargeDisputeFundsReinstatedModel = { 'object': DisputeModel; }; +/** + * Occurs when funds are removed from your account due to a dispute. + */ export type ChargeDisputeFundsWithdrawnModel = { 'object': DisputeModel; }; +/** + * Occurs when the dispute is updated (usually with evidence). + */ export type ChargeDisputeUpdatedModel = { 'object': DisputeModel; }; +/** + * Occurs whenever an uncaptured charge expires. + */ export type ChargeExpiredModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a failed charge attempt occurs. + */ export type ChargeFailedModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a pending charge is created. + */ export type ChargePendingModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead. + */ export type ChargeRefundUpdatedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund. + */ export type ChargeRefundedModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a charge is successful. + */ export type ChargeSucceededModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture. + */ export type ChargeUpdatedModel = { 'object': ChargeModel; }; export type PaymentPagesCheckoutSessionAdaptivePricingModel = { + /** + * If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionAfterExpirationRecoveryModel = { + /** + * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + */ 'allow_promotion_codes': boolean; + /** + * If `true`, a recovery url will be generated to recover this Checkout Session if it + * expires before a transaction is completed. It will be attached to the + * Checkout Session object upon expiration. + */ 'enabled': boolean; + /** + * The timestamp at which the recovery URL will expire. + */ 'expires_at': number; + /** + * URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + */ 'url': string; }; export type PaymentPagesCheckoutSessionAfterExpirationModel = { + /** + * When set, configuration used to recover the Checkout Session on expiry. + */ 'recovery': PaymentPagesCheckoutSessionAfterExpirationRecoveryModel; }; export type PaymentPagesCheckoutSessionAutomaticTaxModel = { + /** + * Indicates whether automatic tax is enabled for the session + */ '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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this session. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type PaymentPagesCheckoutSessionBrandingSettingsIconModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the icon. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsLogoModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the logo. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsModel = { + /** + * A hex color value starting with `#` representing the background color for the Checkout Session. + */ 'background_color': string; + /** + * The border style for the Checkout Session. Must be one of `rounded`, `rectangular`, or `pill`. + */ 'border_style': 'pill' | 'rectangular' | 'rounded'; + /** + * A hex color value starting with `#` representing the button color for the Checkout Session. + */ 'button_color': string; + /** + * The display name shown on the Checkout Session. + */ 'display_name': string; + /** + * The font family for the Checkout Session. Must be one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). + */ 'font_family': string; + /** + * The icon for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'icon': PaymentPagesCheckoutSessionBrandingSettingsIconModel; + /** + * The logo for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'logo': PaymentPagesCheckoutSessionBrandingSettingsLogoModel; }; export type PaymentPagesCheckoutSessionCheckoutAddressDetailsModel = { 'address': AddressModel; + /** + * Customer name. + */ 'name': string; }; export type PaymentPagesCheckoutSessionCollectedInformationModel = { + /** + * Customer’s business name for this Checkout Session + */ 'business_name': string; + /** + * Customer’s individual name for this Checkout Session + */ 'individual_name': string; + /** + * Shipping information for this Checkout Session. + */ 'shipping_details': PaymentPagesCheckoutSessionCheckoutAddressDetailsModel; }; export type PaymentPagesCheckoutSessionConsentModel = { + /** + * If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + */ 'promotions': 'opt_in' | 'opt_out'; + /** + * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + */ 'terms_of_service': 'accepted'; }; export type PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentPagesCheckoutSessionConsentCollectionModel = { + /** + * If set to `hidden`, it will hide legal text related to the reuse of a payment method. + */ 'payment_method_reuse_agreement': PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + * Session will determine whether to display an option to opt into promotional communication + * from the merchant depending on the customer's locale. Only available to US merchants. + */ 'promotions': 'auto' | 'none'; + /** + * If set to `required`, it requires customers to accept the terms of service before being able to pay. + */ 'terms_of_service': 'none' | 'required'; }; export type PaymentPagesCheckoutSessionCurrencyConversionModel = { + /** + * Total of all items in source currency before discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total of all items in source currency after discounts and taxes are applied. + */ 'amount_total': number; + /** + * Exchange rate used to convert source currency amounts to customer currency amounts + */ 'fx_rate': string; + /** + * Creation currency of the CheckoutSession before localization + */ 'source_currency': string; }; export type PaymentPagesCheckoutSessionCustomFieldsOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value': string; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentPagesCheckoutSessionCustomFieldsOptionModel[]; + /** + * The option selected by the customer. This will be the `value` for the option. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom': string; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentPagesCheckoutSessionCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; + /** + * The value entered by the customer, containing only digits. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; + /** + * The value entered by the customer. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsModel = { 'dropdown'?: PaymentPagesCheckoutSessionCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentPagesCheckoutSessionCustomFieldsLabelModel; 'numeric'?: PaymentPagesCheckoutSessionCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentPagesCheckoutSessionCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentPagesCheckoutSessionCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentPagesCheckoutSessionCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance': PaymentPagesCheckoutSessionCustomTextPositionModel; }; export type PaymentPagesCheckoutSessionTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomerDetailsModel = { + /** + * The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'address': AddressModel; + /** + * The customer's business name after a completed Checkout Session. + */ 'business_name': string; + /** + * The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + */ 'email': string; + /** + * The customer's individual name after a completed Checkout Session. + */ 'individual_name': string; + /** + * The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'name': string; + /** + * The customer's phone number after a completed Checkout Session. + */ 'phone': string; + /** + * The customer’s tax exempt status after a completed Checkout Session. + */ 'tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The customer’s tax IDs after a completed Checkout Session. + */ 'tax_ids': PaymentPagesCheckoutSessionTaxIdModel[]; }; export type PaymentPagesCheckoutSessionDiscountModel = { + /** + * Coupon attached to the Checkout Session. + */ 'coupon': string | CouponModel; + /** + * Promotion code attached to the Checkout Session. + */ 'promotion_code': string | PromotionCodeModel; }; export type InvoiceSettingCheckoutRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * ID of the invoice rendering template to be used for the generated invoice. + */ 'template': string; }; export type PaymentPagesCheckoutSessionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids': Array; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Footer displayed on the invoice. + */ 'footer': string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer': ConnectAccountReferenceModel; + /** + * 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': { [key: string]: string; }; + /** + * Options for invoice PDF rendering. + */ 'rendering_options': InvoiceSettingCheckoutRenderingOptionsModel; }; export type PaymentPagesCheckoutSessionInvoiceCreationModel = { + /** + * Indicates whether invoice creation is enabled for the Checkout Session. + */ 'enabled': boolean; 'invoice_data': PaymentPagesCheckoutSessionInvoiceSettingsModel; }; export type LineItemsDiscountAmountModel = { + /** + * The amount discounted. + */ 'amount': number; 'discount': DiscountModel; }; +/** + * A line item. + */ export type ItemModel = { + /** + * Total discount amount applied. If no discounts were applied, defaults to 0. + */ 'amount_discount': number; + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total after discounts and taxes. + */ 'amount_total': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + */ 'description': string; + /** + * The discounts applied to the line item. + */ 'discounts'?: LineItemsDiscountAmountModel[] | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'item'; + /** + * The price used to generate the line item. + */ 'price': PriceModel; + /** + * The quantity of products being purchased. + */ 'quantity': number; + /** + * The taxes applied to the line item. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentPagesCheckoutSessionIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; @@ -7170,8 +18161,17 @@ export type PaymentPagesCheckoutSessionNameCollectionModel = { }; export type PaymentPagesCheckoutSessionOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. + */ 'maximum': number; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum': number; }; @@ -7182,106 +18182,234 @@ export type PaymentPagesCheckoutSessionOptionalItemModel = { }; export type PaymentLinksResourceCompletionBehaviorConfirmationPageModel = { + /** + * The custom message that is displayed to the customer after the purchase is complete. + */ 'custom_message': string; }; export type PaymentLinksResourceCompletionBehaviorRedirectModel = { + /** + * The URL the customer will be redirected to after the purchase is complete. + */ 'url': string; }; export type PaymentLinksResourceAfterCompletionModel = { 'hosted_confirmation'?: PaymentLinksResourceCompletionBehaviorConfirmationPageModel | undefined; 'redirect'?: PaymentLinksResourceCompletionBehaviorRedirectModel | undefined; + /** + * The specified behavior after the purchase is complete. + */ 'type': 'hosted_confirmation' | 'redirect'; }; export type PaymentLinksResourceAutomaticTaxModel = { + /** + * 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': ConnectAccountReferenceModel; }; export type PaymentLinksResourcePaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentLinksResourceConsentCollectionModel = { + /** + * Settings related to the payment method reuse text shown in the Checkout UI. + */ 'payment_method_reuse_agreement': PaymentLinksResourcePaymentMethodReuseAgreementModel; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. + */ 'promotions': 'auto' | 'none'; + /** + * If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + */ 'terms_of_service': 'none' | 'required'; }; export type PaymentLinksResourceCustomFieldsDropdownOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentLinksResourceCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value': string; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentLinksResourceCustomFieldsDropdownOptionModel[]; }; export type PaymentLinksResourceCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom': string; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentLinksResourceCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; }; export type PaymentLinksResourceCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; }; export type PaymentLinksResourceCustomFieldsModel = { 'dropdown'?: PaymentLinksResourceCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentLinksResourceCustomFieldsLabelModel; 'numeric'?: PaymentLinksResourceCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentLinksResourceCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentLinksResourceCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentLinksResourceCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance': PaymentLinksResourceCustomTextPositionModel; }; export type PaymentLinksResourceInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids': Array; + /** + * A list of up to 4 custom fields to be displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Footer to be displayed on the invoice. + */ 'footer': string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer': ConnectAccountReferenceModel; + /** + * 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': { [key: string]: string; }; + /** + * Options for invoice PDF rendering. + */ 'rendering_options': InvoiceSettingCheckoutRenderingOptionsModel; }; export type PaymentLinksResourceInvoiceCreationModel = { + /** + * Enable creating an invoice on successful payment. + */ 'enabled': boolean; + /** + * Configuration for the invoice. Default invoice values will be used if unspecified. + */ 'invoice_data': PaymentLinksResourceInvoiceSettingsModel; }; export type PaymentLinksResourceBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentLinksResourceIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; @@ -7291,8 +18419,17 @@ export type PaymentLinksResourceNameCollectionModel = { }; export type PaymentLinksResourceOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. + */ 'maximum': number; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum': number; }; @@ -7303,23 +18440,53 @@ export type PaymentLinksResourceOptionalItemModel = { }; export type PaymentLinksResourcePaymentIntentDataModel = { + /** + * Indicates when the funds will be captured from the customer's account. + */ 'capture_method': 'automatic' | 'automatic_async' | 'manual'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + */ 'metadata': { [key: string]: string; }; + /** + * Indicates that you intend to make future payments with the payment method collected during checkout. + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. + */ 'statement_descriptor': string; + /** + * For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. + */ 'statement_descriptor_suffix': string; + /** + * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'transfer_group': string; }; export type PaymentLinksResourcePhoneNumberCollectionModel = { + /** + * If `true`, a phone number will be collected during checkout. + */ 'enabled': boolean; }; export type PaymentLinksResourceCompletedSessionsModel = { + /** + * The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. + */ 'count': number; + /** + * The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + */ 'limit': number; }; @@ -7328,11 +18495,20 @@ export type PaymentLinksResourceRestrictionsModel = { }; export type PaymentLinksResourceShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentLinksResourceShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The ID of the Shipping Rate to use for this shipping option. + */ 'shipping_rate': string | ShippingRateModel; }; @@ -7341,304 +18517,907 @@ export type PaymentLinksResourceSubscriptionDataInvoiceSettingsModel = { }; export type PaymentLinksResourceSubscriptionDataModel = { + /** + * 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; 'invoice_settings': PaymentLinksResourceSubscriptionDataInvoiceSettingsModel; + /** + * 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. + */ 'metadata': { [key: string]: string; }; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days': number; + /** + * Settings related to subscription trials. + */ 'trial_settings': SubscriptionsTrialsResourceTrialSettingsModel; }; export type PaymentLinksResourceTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session. + */ 'enabled': boolean; 'required': 'if_supported' | 'never'; }; export type PaymentLinksResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount': number; + /** + * The connected account receiving the transfer. + */ 'destination': string | AccountModel; }; +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export type PaymentLinkModel = { + /** + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + */ 'active': boolean; 'after_completion': PaymentLinksResourceAfterCompletionModel; + /** + * Whether user redeemable promotion codes are enabled. + */ 'allow_promotion_codes': boolean; + /** + * The ID of the Connect application that created the Payment Link. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + */ 'application_fee_amount': number; + /** + * This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent': number; 'automatic_tax': PaymentLinksResourceAutomaticTaxModel; + /** + * Configuration for collecting the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection': 'auto' | 'required'; + /** + * When set, provides configuration to gather active consent from customers. + */ 'consent_collection': PaymentLinksResourceConsentCollectionModel; + /** + * 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; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentLinksResourceCustomFieldsModel[]; 'custom_text': PaymentLinksResourceCustomTextModel; + /** + * Configuration for Customer creation during checkout. + */ 'customer_creation': 'always' | 'if_required'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The custom message to be displayed to a customer when a payment link is no longer active. + */ 'inactive_message': string; + /** + * Configuration for creating invoice for payment mode payment links. + */ 'invoice_creation': PaymentLinksResourceInvoiceCreationModel; + /** + * The line items representing what is being sold. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; 'name_collection'?: PaymentLinksResourceNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_link'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentLinksResourceOptionalItemModel[] | undefined; + /** + * Indicates the parameters to be passed to PaymentIntent creation during checkout. + */ 'payment_intent_data': PaymentLinksResourcePaymentIntentDataModel; + /** + * Configuration for collecting a payment method during checkout. Defaults to `always`. + */ 'payment_method_collection': 'always' | 'if_required'; + /** + * The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + */ 'payment_method_types': Array<'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' | 'konbini' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'oxxo' | 'p24' | 'pay_by_bank' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; 'phone_number_collection': PaymentLinksResourcePhoneNumberCollectionModel; + /** + * Settings that restrict the usage of a payment link. + */ 'restrictions': PaymentLinksResourceRestrictionsModel; + /** + * Configuration for collecting the customer's shipping address. + */ 'shipping_address_collection': PaymentLinksResourceShippingAddressCollectionModel; + /** + * The shipping rate options applied to the session. + */ 'shipping_options': PaymentLinksResourceShippingOptionModel[]; + /** + * Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + */ 'submit_type': 'auto' | 'book' | 'donate' | 'pay' | 'subscribe'; + /** + * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ 'subscription_data': PaymentLinksResourceSubscriptionDataModel; 'tax_id_collection': PaymentLinksResourceTaxIdCollectionModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ 'transfer_data': PaymentLinksResourceTransferDataModel; + /** + * The public URL that can be shared with customers. + */ 'url': string; }; export type CheckoutAcssDebitMandateOptionsModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type CheckoutAcssDebitPaymentMethodOptionsModel = { + /** + * Currency supported by the bank account. Returned when the Session is in `setup` mode. + */ 'currency'?: 'cad' | 'usd' | undefined; 'mandate_options'?: CheckoutAcssDebitMandateOptionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type CheckoutAffirmPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAfterpayClearpayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlipayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlmaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutAmazonPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutAuBecsDebitPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutBacsDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutBancontactPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutBilliePaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutBoletoPaymentMethodOptionsModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutCardInstallmentsOptionsModel = { + /** + * Indicates if installments are enabled + */ 'enabled'?: boolean | undefined; }; export type PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel = { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + */ 'brands_blocked'?: Array<'american_express' | 'discover_global_network' | 'mastercard' | 'visa'> | undefined; }; export type CheckoutCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; 'installments'?: CheckoutCardInstallmentsOptionsModel | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; 'restrictions'?: PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; }; export type CheckoutCashappPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type CheckoutCustomerBalancePaymentMethodOptionsModel = { 'bank_transfer'?: CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutEpsPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutFpxPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGiropayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGrabPayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutIdealPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutKlarnaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutKonbiniPaymentMethodOptionsModel = { + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKrCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutLinkPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutMobilepayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutMultibancoPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutOxxoPaymentMethodOptionsModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutP24PaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaynowPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaypalPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutPixPaymentMethodOptionsModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds after which Pix payment will expire. + */ 'expires_after_seconds': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutRevolutPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutSatispayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutSepaDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutSofortPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutSwishPaymentMethodOptionsModel = { + /** + * The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + */ 'reference': string; }; export type CheckoutTwintPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutUsBankAccountPaymentMethodOptionsModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | undefined; }; @@ -7687,54 +19466,122 @@ export type CheckoutSessionPaymentMethodOptionsModel = { }; export type PaymentPagesCheckoutSessionPermissionsModel = { + /** + * Determines which entity is allowed to update the shipping details. + * + * Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + * + * When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + */ 'update_shipping_details': 'client_only' | 'server_only'; }; export type PaymentPagesCheckoutSessionPhoneNumberCollectionModel = { + /** + * Indicates whether phone number collection is enabled for the session + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel = { + /** + * Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + */ 'allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + */ 'payment_method_save': 'disabled' | 'enabled'; }; export type PaymentPagesCheckoutSessionShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentPagesCheckoutSessionShippingCostModel = { + /** + * Total shipping cost before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this order. + */ 'shipping_rate': string | ShippingRateModel; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The shipping rate. + */ 'shipping_rate': string | ShippingRateModel; }; export type PaymentPagesCheckoutSessionTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session + */ 'enabled': boolean; + /** + * Indicates whether a tax ID is required on the payment page + */ 'required': 'if_supported' | 'never'; }; export type PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type PaymentPagesCheckoutSessionTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel | undefined; }; export type CheckoutLinkWalletOptionsModel = { + /** + * Describes whether Checkout should display Link. Defaults to `auto`. + */ 'display'?: 'auto' | 'never' | undefined; }; @@ -7742,234 +19589,696 @@ export type CheckoutSessionWalletOptionsModel = { 'link'?: CheckoutLinkWalletOptionsModel | undefined; }; +/** + * A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + * new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and redirect to its URL + * to begin Checkout. + * + * Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) + */ export type CheckoutSessionModel = { + /** + * Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + */ 'adaptive_pricing': PaymentPagesCheckoutSessionAdaptivePricingModel; + /** + * When set, provides configuration for actions to take if this Checkout Session expires. + */ 'after_expiration': PaymentPagesCheckoutSessionAfterExpirationModel; + /** + * Enables user redeemable promotion codes. + */ 'allow_promotion_codes': boolean; + /** + * Total of all items before discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total of all items after discounts and taxes are applied. + */ 'amount_total': number; 'automatic_tax': PaymentPagesCheckoutSessionAutomaticTaxModel; + /** + * Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection': 'auto' | 'required'; 'branding_settings'?: PaymentPagesCheckoutSessionBrandingSettingsModel | undefined; + /** + * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + */ 'cancel_url': string; + /** + * A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * Session with your internal systems. + */ 'client_reference_id': string; + /** + * The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout. + * For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + */ 'client_secret': string; + /** + * Information about the customer collected within the Checkout Session. + */ 'collected_information': PaymentPagesCheckoutSessionCollectedInformationModel; + /** + * Results of `consent_collection` for this session. + */ 'consent': PaymentPagesCheckoutSessionConsentModel; + /** + * When set, provides configuration for the Checkout Session to gather active consent from customers. + */ 'consent_collection': PaymentPagesCheckoutSessionConsentCollectionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. + */ 'currency_conversion': PaymentPagesCheckoutSessionCurrencyConversionModel; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentPagesCheckoutSessionCustomFieldsModel[]; 'custom_text': PaymentPagesCheckoutSessionCustomTextModel; + /** + * The ID of the customer for this Session. + * For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + * will create a new customer object based on information provided + * during the payment flow unless an existing customer was provided when + * the Session was created. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + */ 'customer_creation': 'always' | 'if_required'; + /** + * The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + */ 'customer_details': PaymentPagesCheckoutSessionCustomerDetailsModel; + /** + * If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once the payment flow is + * complete, use the `customer` attribute. + */ 'customer_email': string; + /** + * List of coupons and promotion codes attached to the Checkout Session. + */ 'discounts': PaymentPagesCheckoutSessionDiscountModel[]; + /** + * A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + */ 'excluded_payment_method_types'?: string[] | undefined; + /** + * The timestamp at which the Checkout Session will expire. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice created by the Checkout Session, if it exists. + */ 'invoice': string | InvoiceModel; + /** + * Details on the state of invoice creation for the Checkout Session. + */ 'invoice_creation': PaymentPagesCheckoutSessionInvoiceCreationModel; + /** + * The line items purchased by the customer. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + */ 'locale': 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-GB' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW'; + /** + * 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': { [key: string]: string; }; + /** + * The mode of the Checkout Session. + */ 'mode': 'payment' | 'setup' | 'subscription'; 'name_collection'?: PaymentPagesCheckoutSessionNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'checkout.session'; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentPagesCheckoutSessionOptionalItemModel[] | undefined; + /** + * Where the user is coming from. This informs the optimizations that are applied to the session. + */ 'origin_context': 'mobile_app' | 'web'; + /** + * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'payment_intent': string | PaymentIntentModel; + /** + * The ID of the Payment Link that created this Session. + */ 'payment_link': string | PaymentLinkModel; + /** + * Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + */ 'payment_method_collection': 'always' | 'if_required'; + /** + * Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + */ 'payment_method_options': CheckoutSessionPaymentMethodOptionsModel; + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ 'payment_method_types': string[]; + /** + * The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + * You can use this value to decide when to fulfill your customer's order. + */ 'payment_status': 'no_payment_required' | 'paid' | 'unpaid'; + /** + * This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + * + * For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. + */ 'permissions': PaymentPagesCheckoutSessionPermissionsModel; 'phone_number_collection'?: PaymentPagesCheckoutSessionPhoneNumberCollectionModel | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * The ID of the original expired Checkout Session that triggered the recovery flow. + */ 'recovered_from': string; + /** + * This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + */ 'redirect_on_completion'?: 'always' | 'if_required' | 'never' | undefined; + /** + * Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + */ 'return_url'?: string | undefined; + /** + * Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + */ 'saved_payment_method_options': PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel; + /** + * The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'setup_intent': string | SetupIntentModel; + /** + * When set, provides configuration for Checkout to collect a shipping address from a customer. + */ 'shipping_address_collection': PaymentPagesCheckoutSessionShippingAddressCollectionModel; + /** + * The details of the customer cost of shipping, including the customer chosen ShippingRate. + */ 'shipping_cost': PaymentPagesCheckoutSessionShippingCostModel; + /** + * The shipping rate options applied to this Session. + */ 'shipping_options': PaymentPagesCheckoutSessionShippingOptionModel[]; + /** + * The status of the Checkout Session, one of `open`, `complete`, or `expired`. + */ 'status': 'complete' | 'expired' | 'open'; + /** + * Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + */ 'submit_type': 'auto' | 'book' | 'donate' | 'pay' | 'subscribe'; + /** + * The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode. + */ 'subscription': string | SubscriptionModel; + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ 'success_url': string; 'tax_id_collection'?: PaymentPagesCheckoutSessionTaxIdCollectionModel | undefined; + /** + * Tax and discount details for the computed total amount. + */ 'total_details': PaymentPagesCheckoutSessionTotalDetailsModel; + /** + * The UI mode of the Session. Defaults to `hosted`. + */ 'ui_mode': 'custom' | 'embedded' | 'hosted'; + /** + * The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ 'url': string; + /** + * Wallet-specific configuration for this Checkout Session. + */ 'wallet_options': CheckoutSessionWalletOptionsModel; }; +/** + * Occurs when a payment intent using a delayed payment method fails. + */ export type CheckoutSessionAsyncPaymentFailedModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a payment intent using a delayed payment method finally succeeds. + */ export type CheckoutSessionAsyncPaymentSucceededModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a Checkout Session has been successfully completed. + */ export type CheckoutSessionCompletedModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a Checkout Session is expired. + */ export type CheckoutSessionExpiredModel = { 'object': CheckoutSessionModel; }; export type ClimateRemovalsBeneficiaryModel = { + /** + * Publicly displayable name for the end beneficiary of carbon removal. + */ 'public_name': string; }; export type ClimateRemovalsLocationModel = { + /** + * The city where the supplier is located. + */ 'city': string; + /** + * Two-letter ISO code representing the country where the supplier is located. + */ 'country': string; + /** + * The geographic latitude where the supplier is located. + */ 'latitude': number; + /** + * The geographic longitude where the supplier is located. + */ 'longitude': number; + /** + * The state/county/province/region where the supplier is located. + */ 'region': string; }; +/** + * A supplier of carbon removal. + */ export type ClimateSupplierModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Link to a webpage to learn more about the supplier. + */ 'info_url': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The locations in which this supplier operates. + */ 'locations': ClimateRemovalsLocationModel[]; + /** + * Name of this carbon removal supplier. + */ 'name': string; + /** + * String representing the object’s type. Objects of the same type share the same value. + */ 'object': 'climate.supplier'; + /** + * The scientific pathway used for carbon removal. + */ 'removal_pathway': 'biomass_carbon_removal_and_storage' | 'direct_air_capture' | 'enhanced_weathering'; }; +/** + * The delivery of a specified quantity of carbon for an order. + */ export type ClimateRemovalsOrderDeliveriesModel = { + /** + * Time at which the delivery occurred. Measured in seconds since the Unix epoch. + */ 'delivered_at': number; + /** + * Specific location of this delivery. + */ 'location': ClimateRemovalsLocationModel; + /** + * Quantity of carbon removal supplied by this delivery. + */ 'metric_tons': string; + /** + * Once retired, a URL to the registry entry for the tons from this delivery. + */ 'registry_url': string; 'supplier': ClimateSupplierModel; }; export type ClimateRemovalsProductsPriceModel = { + /** + * Fees for one metric ton of carbon removal in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + */ 'amount_total': number; }; +/** + * A Climate product represents a type of carbon removal unit available for reservation. + * You can retrieve it to see the current price and availability. + */ export type ClimateProductModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Current prices for a metric ton of carbon removal in a currency's smallest unit. + */ 'current_prices_per_metric_ton': { [key: string]: ClimateRemovalsProductsPriceModel; }; + /** + * The year in which the carbon removal is expected to be delivered. + */ 'delivery_year': number; + /** + * Unique identifier for the object. For convenience, Climate product IDs are human-readable strings + * that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + * for a list of available carbon removal products. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The quantity of metric tons available for reservation. + */ 'metric_tons_available': string; + /** + * The Climate product's name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.product'; + /** + * The carbon removal suppliers that fulfill orders for this Climate product. + */ 'suppliers': ClimateSupplierModel[]; }; +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export type ClimateOrderModel = { + /** + * Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Total amount of the carbon removal in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total amount of the order including fees in the currency's smallest unit. + */ 'amount_total': number; 'beneficiary'?: ClimateRemovalsBeneficiaryModel | undefined; + /** + * Time at which the order was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Reason for the cancellation of this order. + */ 'cancellation_reason': 'expired' | 'product_unavailable' | 'requested'; + /** + * For delivered orders, a URL to a delivery certificate for the order. + */ 'certificate': string; + /** + * Time at which the order was confirmed. Measured in seconds since the Unix epoch. + */ 'confirmed_at': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + */ 'currency': string; + /** + * Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. + */ 'delayed_at': number; + /** + * Time at which the order was delivered. Measured in seconds since the Unix epoch. + */ 'delivered_at': number; + /** + * Details about the delivery of carbon removal for this order. + */ 'delivery_details': ClimateRemovalsOrderDeliveriesModel[]; + /** + * The year this order is expected to be delivered. + */ 'expected_delivery_year': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * Quantity of carbon removal that is included in this order. + */ 'metric_tons': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.order'; + /** + * Unique ID for the Climate `Product` this order is purchasing. + */ 'product': string | ClimateProductModel; + /** + * Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + */ 'product_substituted_at': number; + /** + * The current status of this order. + */ 'status': 'awaiting_funds' | 'canceled' | 'confirmed' | 'delivered' | 'open'; }; +/** + * Occurs when a Climate order is canceled. + */ export type ClimateOrderCanceledModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is created. + */ export type ClimateOrderCreatedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is delayed. + */ export type ClimateOrderDelayedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is delivered. + */ export type ClimateOrderDeliveredModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order's product is substituted for another. + */ export type ClimateOrderProductSubstitutedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate product is created. + */ export type ClimateProductCreatedModel = { 'object': ClimateProductModel; }; +/** + * Occurs when a Climate product is updated. + */ export type ClimateProductPricingUpdatedModel = { 'object': ClimateProductModel; }; +/** + * This hash contains details about the online acceptance. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel = { + /** + * The IP address from which the Mandate was accepted by the customer. + */ 'ip_address': string; + /** + * The user agent of the browser from which the Mandate was accepted by the customer. + */ 'user_agent': string; }; +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel = { + /** + * If this is a Mandate accepted online, this hash contains details about the online acceptance. + */ 'online': ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel; + /** + * The type of customer acceptance information included with the Mandate. + */ 'type': string; }; +/** + * Data used for generating a Mandate. + */ export type ConfirmationTokensResourceMandateDataModel = { 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel; }; +/** + * Installment configuration for payments. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel = { 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; +/** + * This hash contains the card payment method options. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel = { + /** + * The `cvc_update` Token collected from the Payment Element. + */ 'cvc_token': string; 'installments'?: ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel | undefined; }; +/** + * Payment-method-specific configuration + */ export type ConfirmationTokensResourcePaymentMethodOptionsModel = { + /** + * This hash contains the card payment method options. + */ 'card': ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel; }; +/** + * Details of the PaymentMethod collected by Payment Element + */ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -7984,6 +20293,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; 'crypto'?: PaymentMethodCryptoModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer': string | CustomerModel; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; 'eps'?: PaymentMethodEpsModel | undefined; @@ -8017,6 +20329,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'sofort'?: PaymentMethodSofortModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -8025,29 +20340,94 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { export type ConfirmationTokensResourceShippingModel = { 'address': AddressModel; + /** + * Recipient name. + */ 'name': string; + /** + * Recipient phone (including extension). + */ 'phone': string; }; +/** + * ConfirmationTokens help transport client side data collected by Stripe JS over + * to your server for confirming a PaymentIntent or SetupIntent. If the confirmation + * is successful, values present on the ConfirmationToken are written onto the Intent. + * + * To learn more about how to use ConfirmationToken, visit the related guides: + * - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) + * - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). + */ export type ConfirmationTokenModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Data used for generating a Mandate. + */ 'mandate_data'?: ConfirmationTokensResourceMandateDataModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'confirmation_token'; + /** + * ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'payment_intent': string; + /** + * Payment-method-specific configuration for this ConfirmationToken. + */ 'payment_method_options': ConfirmationTokensResourcePaymentMethodOptionsModel; + /** + * Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + */ 'payment_method_preview': ConfirmationTokensResourcePaymentMethodPreviewModel; + /** + * Return URL used to confirm the Intent. + */ 'return_url': string; + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'setup_intent': string; + /** + * Shipping information collected on this ConfirmationToken. + */ 'shipping': ConfirmationTokensResourceShippingModel; + /** + * Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + */ 'use_stripe_sdk': boolean; }; export type CountrySpecVerificationFieldDetailsModel = { + /** + * Additional fields which are only required for some users. + */ 'additional': string[]; + /** + * Fields which every account must eventually provide. + */ 'minimum': string[]; }; @@ -8056,275 +20436,742 @@ export type CountrySpecVerificationFieldsModel = { 'individual': CountrySpecVerificationFieldDetailsModel; }; +/** + * Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. + * + * You can also view the information from this API call as [an online + * guide](/docs/connect/required-verification-information). + */ export type CountrySpecModel = { + /** + * The default currency for this country. This applies to both payment methods and bank accounts. + */ 'default_currency': string; + /** + * Unique identifier for the object. Represented as the ISO country code for this country. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'country_spec'; + /** + * Currencies that can be accepted in the specific country (for transfers). + */ 'supported_bank_account_currencies': { [key: string]: string[]; }; + /** + * Currencies that can be accepted in the specified country (for payments). + */ 'supported_payment_currencies': string[]; + /** + * Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + */ 'supported_payment_methods': string[]; + /** + * Countries that can accept transfers from the specified country. + */ 'supported_transfer_countries': string[]; 'verification_fields': CountrySpecVerificationFieldsModel; }; +/** + * Occurs whenever a coupon is created. + */ export type CouponCreatedModel = { 'object': CouponModel; }; +/** + * Occurs whenever a coupon is deleted. + */ export type CouponDeletedModel = { 'object': CouponModel; }; +/** + * Occurs whenever a coupon is updated. + */ export type CouponUpdatedModel = { 'object': CouponModel; }; +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export type CustomerBalanceTransactionModel = { + /** + * The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + */ 'amount': number; + /** + * The ID of the checkout session (if any) that created the transaction. + */ 'checkout_session': string | CheckoutSessionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the credit note (if any) related to the transaction. + */ 'credit_note': string | CreditNoteModel; + /** + * 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; + /** + * The ID of the customer the transaction belongs to. + */ 'customer': string | CustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + */ 'ending_balance': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice (if any) related to the transaction. + */ 'invoice': string | InvoiceModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_balance_transaction'; + /** + * Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + */ 'type': 'adjustment' | 'applied_to_invoice' | 'checkout_session_subscription_payment' | 'checkout_session_subscription_payment_canceled' | 'credit_note' | 'initial' | 'invoice_overpaid' | 'invoice_too_large' | 'invoice_too_small' | 'migration' | 'unapplied_from_invoice' | 'unspent_receiver_credit'; }; export type CreditNotesPretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount'; }; +/** + * The credit note line item object + */ export type CreditNoteLineItemModel = { + /** + * The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + */ 'amount': number; + /** + * Description of the item being credited. + */ 'description': string; + /** + * The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + */ 'discount_amount': number; + /** + * The amount of discount calculated per discount for this line item + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice line item being credited + */ 'invoice_line_item'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note_line_item'; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * The number of units of product being credited. + */ 'quantity': number; + /** + * The tax rates which apply to the line item. + */ 'tax_rates': TaxRateModel[]; + /** + * The tax information of the line item. + */ 'taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + */ 'type': 'custom_line_item' | 'invoice_line_item'; + /** + * The cost of each unit of product being credited. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; }; export type CreditNotesPaymentRecordRefundModel = { + /** + * ID of the payment record. + */ 'payment_record': string; + /** + * ID of the refund group. + */ 'refund_group': string; }; export type CreditNoteRefundModel = { + /** + * Amount of the refund that applies to this credit note, in cents (or local equivalent). + */ 'amount_refunded': number; + /** + * The PaymentRecord refund details associated with this credit note refund. + */ 'payment_record_refund': CreditNotesPaymentRecordRefundModel; + /** + * ID of the refund. + */ 'refund': string | RefundModel; + /** + * Type of the refund, one of `refund` or `payment_record_refund`. + */ 'type': 'payment_record_refund' | 'refund'; }; +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export type CreditNoteModel = { + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + */ 'amount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Customer balance transaction related to this credit note. + */ 'customer_balance_transaction': string | CustomerBalanceTransactionModel; + /** + * The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + */ 'discount_amount': number; + /** + * The aggregate amounts calculated per discount for all line items. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + */ 'effective_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice. + */ 'invoice': string | InvoiceModel; + /** + * Line items that make up the credit note + */ 'lines': { + /** + * Details about each object. + */ 'data': CreditNoteLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Customer-facing text that appears on the credit note PDF. + */ 'memo': string; + /** + * 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': { [key: string]: string; }; + /** + * A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note'; + /** + * Amount that was credited outside of Stripe. + */ 'out_of_band_amount': number; + /** + * The link to download the PDF of the credit note. + */ 'pdf': string; + /** + * The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. + */ 'post_payment_amount': number; + /** + * The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. + */ 'pre_payment_amount': number; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + */ 'reason': 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory'; + /** + * Refunds related to this credit note. + */ 'refunds': CreditNoteRefundModel[]; + /** + * The details of the cost of shipping, including the ShippingRate applied to the invoice. + */ 'shipping_cost': InvoicesResourceShippingCostModel; + /** + * Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + */ 'status': 'issued' | 'void'; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + */ 'subtotal_excluding_tax': number; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + */ 'total': number; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + */ 'total_excluding_tax': number; + /** + * The aggregate tax information for all line items. + */ 'total_taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + */ 'type': 'mixed' | 'post_payment' | 'pre_payment'; + /** + * The time that the credit note was voided. + */ 'voided_at': number; }; +/** + * Occurs whenever a credit note is created. + */ export type CreditNoteCreatedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a credit note is updated. + */ export type CreditNoteUpdatedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a credit note is voided. + */ export type CreditNoteVoidedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a new customer is created. + */ export type CustomerCreatedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a customer is deleted. + */ export type CustomerDeletedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a coupon is attached to a customer. + */ export type CustomerDiscountCreatedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a coupon is removed from a customer. + */ export type CustomerDiscountDeletedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a customer is switched from one coupon to another. + */ export type CustomerDiscountUpdatedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a new source is created for a customer. + */ export type CustomerSourceCreatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever a source is removed from a customer. + */ export type CustomerSourceDeletedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won't occur. + */ export type CustomerSourceExpiringModel = { 'object': CardModel | SourceModel; }; +/** + * Occurs whenever a source's details are changed. + */ export type CustomerSourceUpdatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever a customer is signed up for a new plan. + */ export type CustomerSubscriptionCreatedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription ends. + */ export type CustomerSubscriptionDeletedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription is paused. Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused. + */ export type CustomerSubscriptionPausedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated. + */ export type CustomerSubscriptionPendingUpdateAppliedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription's pending update expires before the related invoice is paid. + */ export type CustomerSubscriptionPendingUpdateExpiredModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription is no longer paused. Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed. + */ export type CustomerSubscriptionResumedModel = { 'object': SubscriptionModel; }; +/** + * Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`). + */ export type CustomerSubscriptionTrialWillEndModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). + */ export type CustomerSubscriptionUpdatedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a tax ID is created for a customer. + */ export type CustomerTaxIdCreatedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever a tax ID is deleted from a customer. + */ export type CustomerTaxIdDeletedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever a customer's tax ID is updated. + */ export type CustomerTaxIdUpdatedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever any property of a customer changes. + */ export type CustomerUpdatedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a new customer cash balance transactions is created. + */ export type CustomerCashBalanceTransactionCreatedModel = { 'object': CustomerCashBalanceTransactionModel; }; +/** + * This hash contains whether the buy button is enabled. + */ export type CustomerSessionResourceComponentsResourceBuyButtonModel = { + /** + * Whether the buy button is enabled. + */ 'enabled': boolean; }; +/** + * This hash contains the features the customer sheet supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether the customer sheet displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; }; +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetModel = { + /** + * Whether the customer sheet is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the customer sheet supports certain features. + */ 'features': CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel; }; +/** + * This hash contains the features the mobile payment element supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether or not the mobile payment element shows saved payment methods. + */ 'payment_method_redisplay': 'disabled' | 'enabled'; + /** + * Controls whether the mobile payment element displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new payment method. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save': 'disabled' | 'enabled'; + /** + * Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". + * + * If not specified, defaults to `nil` (no override value). + */ 'payment_method_save_allow_redisplay_override': 'always' | 'limited' | 'unspecified'; }; +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementModel = { + /** + * Whether the mobile payment element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the mobile payment element supports certain features. + */ 'features': CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel; }; +/** + * This hash contains the features the Payment Element supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + */ 'payment_method_redisplay': 'disabled' | 'enabled'; + /** + * Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. + */ 'payment_method_redisplay_limit': number; + /** + * Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save': 'disabled' | 'enabled'; + /** + * When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + * + * When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + */ 'payment_method_save_usage': 'off_session' | 'on_session'; }; +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementModel = { + /** + * Whether the Payment Element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the Payment Element supports certain features. + */ 'features': CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel; }; +/** + * This hash contains whether the pricing table is enabled. + */ export type CustomerSessionResourceComponentsResourcePricingTableModel = { + /** + * Whether the pricing table is enabled. + */ 'enabled': boolean; }; +/** + * Configuration for the components supported by this Customer Session. + */ export type CustomerSessionResourceComponentsModel = { 'buy_button': CustomerSessionResourceComponentsResourceBuyButtonModel; 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheetModel; @@ -8333,467 +21180,1400 @@ export type CustomerSessionResourceComponentsModel = { 'pricing_table': CustomerSessionResourceComponentsResourcePricingTableModel; }; +/** + * A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access + * control over a Customer. + * + * Related guides: [Customer Session with the Payment Element](/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), + * [Customer Session with the Pricing Table](/payments/checkout/pricing-table#customer-session), + * [Customer Session with the Buy Button](/payment-links/buy-button#pass-an-existing-customer). + */ export type CustomerSessionModel = { + /** + * The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. + * + * The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret': string; 'components'?: CustomerSessionResourceComponentsModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The Customer the Customer Session was created for. + */ 'customer': string | CustomerModel; + /** + * The timestamp at which this Customer Session will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_session'; }; export type DeletedAccountModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; }; export type DeletedApplePayDomainModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; export type DeletedCouponModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; }; export type DeletedInvoiceitemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; }; export type DeletedPersonModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; }; export type DeletedProductFeatureModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; export type DeletedRadarValueListModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type DeletedRadarValueListItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; }; export type DeletedSubscriptionItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; }; export type DeletedTerminalConfigurationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; }; export type DeletedTerminalLocationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; }; export type DeletedTerminalReaderModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; }; export type DeletedTestHelpersTestClockModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; }; export type DeletedWebhookEndpointModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; }; +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type EntitlementsFeatureModel = { + /** + * Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + */ 'active': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ 'metadata': { [key: string]: string; }; + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.feature'; }; +/** + * An active entitlement describes access to a feature for a customer. + */ export type EntitlementsActiveEntitlementModel = { + /** + * The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + */ 'feature': string | EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.active_entitlement'; }; +/** + * A summary of a customer's active entitlements. + */ export type EntitlementsActiveEntitlementSummaryModel = { + /** + * The customer that is entitled to this feature. + */ 'customer': string; + /** + * The list of entitlements this customer has. + */ 'entitlements': { 'data': EntitlementsActiveEntitlementModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.active_entitlement_summary'; }; +/** + * Occurs whenever a customer's entitlements change. + */ export type EntitlementsActiveEntitlementSummaryUpdatedModel = { 'object': EntitlementsActiveEntitlementSummaryModel; }; export type EphemeralKeyModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which the key will expire. Measured in seconds since the Unix epoch. + */ 'expires': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'ephemeral_key'; + /** + * The key's secret. You can use this value to make authorized requests to the Stripe API. + */ 'secret'?: string | undefined; }; +/** + * An error response from the Stripe API + */ export type ErrorModel = { 'error': ApiErrorsModel; }; export type NotificationEventDataModel = { + /** + * Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. + */ 'object': {}; + /** + * Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. + */ 'previous_attributes'?: {} | undefined; }; export type NotificationEventRequestModel = { + /** + * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + */ 'id': string; + /** + * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + */ 'idempotency_key': string; }; +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export type EventModel = { + /** + * The connected account that originates the event. + */ 'account'?: string | undefined; + /** + * The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. + */ 'api_version': string; + /** + * Authentication context needed to fetch the event or related object. + */ 'context'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'data': NotificationEventDataModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'event'; + /** + * Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + */ 'pending_webhooks': number; + /** + * Information on the API request that triggers the event. + */ 'request': NotificationEventRequestModel; + /** + * Description of the event (for example, `invoice.created` or `charge.refunded`). + */ 'type': 'account.application.authorized' | 'account.application.deauthorized' | 'account.external_account.created' | 'account.external_account.deleted' | 'account.external_account.updated' | 'account.updated' | 'application_fee.created' | 'application_fee.refund.updated' | 'application_fee.refunded' | 'balance.available' | 'balance_settings.updated' | 'billing.alert.triggered' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' | 'billing_portal.session.created' | 'capability.updated' | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' | 'charge.dispute.funds_reinstated' | 'charge.dispute.funds_withdrawn' | 'charge.dispute.updated' | 'charge.expired' | 'charge.failed' | 'charge.pending' | 'charge.refund.updated' | 'charge.refunded' | 'charge.succeeded' | 'charge.updated' | 'checkout.session.async_payment_failed' | 'checkout.session.async_payment_succeeded' | 'checkout.session.completed' | 'checkout.session.expired' | 'climate.order.canceled' | 'climate.order.created' | 'climate.order.delayed' | 'climate.order.delivered' | 'climate.order.product_substituted' | 'climate.product.created' | 'climate.product.pricing_updated' | 'coupon.created' | 'coupon.deleted' | 'coupon.updated' | 'credit_note.created' | 'credit_note.updated' | 'credit_note.voided' | 'customer.created' | 'customer.deleted' | 'customer.discount.created' | 'customer.discount.deleted' | 'customer.discount.updated' | 'customer.source.created' | 'customer.source.deleted' | 'customer.source.expiring' | 'customer.source.updated' | 'customer.subscription.created' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' | 'customer.subscription.pending_update_expired' | 'customer.subscription.resumed' | 'customer.subscription.trial_will_end' | 'customer.subscription.updated' | 'customer.tax_id.created' | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' | 'customer_cash_balance_transaction.created' | 'entitlements.active_entitlement_summary.updated' | 'file.created' | 'financial_connections.account.account_numbers_updated' | 'financial_connections.account.created' | 'financial_connections.account.deactivated' | 'financial_connections.account.disconnected' | 'financial_connections.account.reactivated' | 'financial_connections.account.refreshed_balance' | 'financial_connections.account.refreshed_ownership' | 'financial_connections.account.refreshed_transactions' | 'financial_connections.account.upcoming_account_number_expiry' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' | 'identity.verification_session.redacted' | 'identity.verification_session.requires_input' | 'identity.verification_session.verified' | 'invoice.created' | 'invoice.deleted' | 'invoice.finalization_failed' | 'invoice.finalized' | 'invoice.marked_uncollectible' | 'invoice.overdue' | 'invoice.overpaid' | 'invoice.paid' | 'invoice.payment_action_required' | 'invoice.payment_attempt_required' | 'invoice.payment_failed' | 'invoice.payment_succeeded' | 'invoice.sent' | 'invoice.upcoming' | 'invoice.updated' | 'invoice.voided' | 'invoice.will_be_due' | 'invoice_payment.paid' | 'invoiceitem.created' | 'invoiceitem.deleted' | 'issuing_authorization.created' | 'issuing_authorization.request' | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' | 'issuing_dispute.created' | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.funds_rescinded' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' | 'issuing_personalization_design.activated' | 'issuing_personalization_design.deactivated' | 'issuing_personalization_design.rejected' | 'issuing_personalization_design.updated' | 'issuing_token.created' | 'issuing_token.updated' | 'issuing_transaction.created' | 'issuing_transaction.purchase_details_receipt_updated' | 'issuing_transaction.updated' | 'mandate.updated' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' | 'payment_intent.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' | 'payment_link.created' | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' | 'payment_method.updated' | 'payout.canceled' | 'payout.created' | 'payout.failed' | 'payout.paid' | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' | 'person.updated' | 'plan.created' | 'plan.deleted' | 'plan.updated' | 'price.created' | 'price.deleted' | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated' | 'promotion_code.created' | 'promotion_code.updated' | 'quote.accepted' | 'quote.canceled' | 'quote.created' | 'quote.finalized' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' | 'refund.created' | 'refund.failed' | 'refund.updated' | 'reporting.report_run.failed' | 'reporting.report_run.succeeded' | 'reporting.report_type.updated' | 'review.closed' | 'review.opened' | 'setup_intent.canceled' | 'setup_intent.created' | 'setup_intent.requires_action' | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' | 'source.canceled' | 'source.chargeable' | 'source.failed' | 'source.mandate_notification' | 'source.refund_attributes_required' | 'source.transaction.created' | 'source.transaction.updated' | 'subscription_schedule.aborted' | 'subscription_schedule.canceled' | 'subscription_schedule.completed' | 'subscription_schedule.created' | 'subscription_schedule.expiring' | 'subscription_schedule.released' | 'subscription_schedule.updated' | 'tax.settings.updated' | 'tax_rate.created' | 'tax_rate.updated' | 'terminal.reader.action_failed' | 'terminal.reader.action_succeeded' | 'terminal.reader.action_updated' | 'test_helpers.test_clock.advancing' | 'test_helpers.test_clock.created' | 'test_helpers.test_clock.deleted' | 'test_helpers.test_clock.internal_failure' | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' | 'transfer.reversed' | 'transfer.updated' | 'treasury.credit_reversal.created' | 'treasury.credit_reversal.posted' | 'treasury.debit_reversal.completed' | 'treasury.debit_reversal.created' | 'treasury.debit_reversal.initial_credit_granted' | 'treasury.financial_account.closed' | 'treasury.financial_account.created' | 'treasury.financial_account.features_status_updated' | 'treasury.inbound_transfer.canceled' | 'treasury.inbound_transfer.created' | 'treasury.inbound_transfer.failed' | 'treasury.inbound_transfer.succeeded' | 'treasury.outbound_payment.canceled' | 'treasury.outbound_payment.created' | 'treasury.outbound_payment.expected_arrival_date_updated' | 'treasury.outbound_payment.failed' | 'treasury.outbound_payment.posted' | 'treasury.outbound_payment.returned' | 'treasury.outbound_payment.tracking_details_updated' | 'treasury.outbound_transfer.canceled' | 'treasury.outbound_transfer.created' | 'treasury.outbound_transfer.expected_arrival_date_updated' | 'treasury.outbound_transfer.failed' | 'treasury.outbound_transfer.posted' | 'treasury.outbound_transfer.returned' | 'treasury.outbound_transfer.tracking_details_updated' | 'treasury.received_credit.created' | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created'; }; +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export type ExchangeRateModel = { + /** + * Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'exchange_rate'; + /** + * Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + */ 'rates': { [key: string]: number; }; }; +/** + * Occurs whenever a new Stripe-generated file is available for your account. + */ export type FileCreatedModel = { 'object': FileModel; }; +/** + * Describes an owner of an account. + */ export type FinancialConnectionsAccountOwnerModel = { + /** + * The email address of the owner. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The full name of the owner. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_owner'; + /** + * The ownership object that this owner belongs to. + */ 'ownership': string; + /** + * The raw phone number of the owner. + */ 'phone': string; + /** + * The raw physical address of the owner. + */ 'raw_address': string; + /** + * The timestamp of the refresh that updated this owner. + */ 'refreshed_at': number; }; +/** + * Describes a snapshot of the owners of an account at a particular point in time. + */ export type FinancialConnectionsAccountOwnershipModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_ownership'; + /** + * A paginated list of owners for this account. + */ 'owners': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountOwnerModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; +/** + * A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ export type FinancialConnectionsAccountModel = { + /** + * The account holder that this account belongs to. + */ 'account_holder': BankConnectionsResourceAccountholderModel; + /** + * Details about the account numbers. + */ 'account_numbers': BankConnectionsResourceAccountNumberDetailsModel[]; + /** + * The most recent information about the account's balance. + */ 'balance': BankConnectionsResourceBalanceModel; + /** + * The state of the most recent attempt to refresh the account balance. + */ 'balance_refresh': BankConnectionsResourceBalanceRefreshModel; + /** + * The type of the account. Account category is further divided in `subcategory`. + */ 'category': 'cash' | 'credit' | 'investment' | 'other'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * A human-readable name that has been assigned to this account, either by the account holder or by the institution. + */ 'display_name': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the institution that holds this account. + */ 'institution_name': string; + /** + * The last 4 digits of the account number. If present, this will be 4 numeric characters. + */ 'last4': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account'; + /** + * The most recent information about the account's owners. + */ 'ownership': string | FinancialConnectionsAccountOwnershipModel; + /** + * The state of the most recent attempt to refresh the account owners. + */ 'ownership_refresh': BankConnectionsResourceOwnershipRefreshModel; + /** + * The list of permissions granted by this account. + */ 'permissions': Array<'balances' | 'ownership' | 'payment_method' | 'transactions'>; + /** + * The status of the link to the account. + */ 'status': 'active' | 'disconnected' | 'inactive'; + /** + * If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + */ 'subcategory': 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings'; + /** + * The list of data refresh subscriptions requested on this account. + */ 'subscriptions': 'transactions'[]; + /** + * The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + */ 'supported_payment_method_types': Array<'link' | 'us_bank_account'>; + /** + * The state of the most recent attempt to refresh the account transactions. + */ 'transaction_refresh': BankConnectionsResourceTransactionRefreshModel; }; +/** + * Occurs when a Financial Connections account's account numbers are updated. + */ export type FinancialConnectionsAccountAccountNumbersUpdatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a new Financial Connections account is created. + */ export type FinancialConnectionsAccountCreatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account's status is updated from `active` to `inactive`. + */ export type FinancialConnectionsAccountDeactivatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account is disconnected. + */ export type FinancialConnectionsAccountDisconnectedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account's status is updated from `inactive` to `active`. + */ export type FinancialConnectionsAccountReactivatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedBalanceModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedOwnershipModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedTransactionsModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s tokenized account number is about to expire. + */ export type FinancialConnectionsAccountUpcomingAccountNumberExpiryModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ export type FinancialConnectionsSessionModel = { + /** + * The account holder for whom accounts are collected in this session. + */ 'account_holder': BankConnectionsResourceAccountholderModel; + /** + * The accounts that were collected as part of this Session. + */ 'accounts': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * A value that will be passed to the client to launch the authentication flow. + */ 'client_secret': string; 'filters'?: BankConnectionsResourceLinkAccountSessionFiltersModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.session'; + /** + * Permissions requested for accounts collected during this session. + */ 'permissions': Array<'balances' | 'ownership' | 'payment_method' | 'transactions'>; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'ownership' | 'transactions'>; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; }; +/** + * A Transaction represents a real transaction that affects a Financial Connections Account balance. + */ export type FinancialConnectionsTransactionModel = { + /** + * The ID of the Financial Connections Account this transaction belongs to. + */ 'account': string; + /** + * The amount of this transaction, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * The description of this transaction. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.transaction'; + /** + * The status of the transaction. + */ 'status': 'pending' | 'posted' | 'void'; 'status_transitions': BankConnectionsResourceTransactionResourceStatusTransitionsModel; + /** + * Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + */ 'transacted_at': number; + /** + * The token of the transaction refresh that last updated or created this transaction. + */ 'transaction_refresh': string; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; export type FinancialReportingFinanceReportRunRunParametersModel = { + /** + * The set of output columns requested for inclusion in the report run. + */ 'columns'?: string[] | undefined; + /** + * Connected account ID by which to filter the report run. + */ 'connected_account'?: string | undefined; + /** + * Currency of objects to be included in the report run. + */ 'currency'?: string | undefined; + /** + * Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. + */ 'interval_end'?: number | undefined; + /** + * Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. + */ 'interval_start'?: number | undefined; + /** + * Payout ID by which to filter the report run. + */ 'payout'?: string | undefined; + /** + * Category of balance transactions to be included in the report run. + */ 'reporting_category'?: string | undefined; + /** + * Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + */ 'timezone'?: string | undefined; }; +/** + * Metadata about the forwarded request. + */ export type ForwardedRequestContextModel = { + /** + * The time it took in milliseconds for the destination endpoint to respond. + */ 'destination_duration': number; + /** + * The IP address of the destination. + */ 'destination_ip_address': string; }; +/** + * Header data. + */ export type ForwardedRequestHeaderModel = { + /** + * The header name. + */ 'name': string; + /** + * The header value. + */ 'value': string; }; +/** + * Details about the request forwarded to the destination endpoint. + */ export type ForwardedRequestDetailsModel = { + /** + * The body payload to send to the destination endpoint. + */ 'body': string; + /** + * The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP method used to call the destination endpoint. + */ 'http_method': 'POST'; }; +/** + * Details about the response from the destination endpoint. + */ export type ForwardedResponseDetailsModel = { + /** + * The response body from the destination endpoint to Stripe. + */ 'body': string; + /** + * HTTP headers that the destination endpoint returned. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP status code that the destination endpoint returned. + */ 'status': number; }; +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export type ForwardingRequestModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'forwarding.request'; + /** + * The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + */ 'payment_method': string; + /** + * The field kinds to be replaced in the forwarded request. + */ 'replacements': Array<'card_cvc' | 'card_expiry' | 'card_number' | 'cardholder_name' | 'request_signature'>; + /** + * Context about the request from Stripe's servers to the destination endpoint. + */ 'request_context': ForwardedRequestContextModel; + /** + * The request that was sent to the destination endpoint. We redact any sensitive fields. + */ 'request_details': ForwardedRequestDetailsModel; + /** + * The response that the destination endpoint returned to us. We redact any sensitive fields. + */ 'response_details': ForwardedResponseDetailsModel; + /** + * The destination URL for the forwarded request. Must be supported by the config. + */ 'url': string; }; export type FundingInstructionsBankTransferModel = { + /** + * The country of the bank account to fund + */ 'country': string; + /** + * A list of financial addresses that can be used to fund a particular balance + */ 'financial_addresses': FundingInstructionsBankTransferFinancialAddressModel[]; + /** + * The bank_transfer type + */ 'type': 'eu_bank_transfer' | 'jp_bank_transfer'; }; +/** + * Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) + */ export type FundingInstructionsModel = { 'bank_transfer': FundingInstructionsBankTransferModel; + /** + * 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; + /** + * The `funding_type` of the returned instructions + */ 'funding_type': 'bank_transfer'; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'funding_instructions'; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportDateOfBirthModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportExpirationDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportIssuedDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataIdNumberReportDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataVerifiedOutputsDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; export type GelatoDocumentReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'document_expired' | 'document_type_not_supported' | 'document_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a document check + */ export type GelatoDocumentReportModel = { + /** + * Address as it appears in the document. + */ 'address': AddressModel; + /** + * Date of birth as it appears in the document. + */ 'dob'?: GelatoDataDocumentReportDateOfBirthModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoDocumentReportErrorModel; + /** + * Expiration date of the document. + */ 'expiration_date'?: GelatoDataDocumentReportExpirationDateModel | undefined; + /** + * Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. + */ 'files': string[]; + /** + * First name as it appears in the document. + */ 'first_name': string; + /** + * Issued date of the document. + */ 'issued_date': GelatoDataDocumentReportIssuedDateModel; + /** + * Issuing country of the document. + */ 'issuing_country': string; + /** + * Last name as it appears in the document. + */ 'last_name': string; + /** + * Document ID number. + */ 'number'?: string | undefined; + /** + * Sex of the person in the document. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * Status of this `document` check. + */ 'status': 'unverified' | 'verified'; + /** + * Type of the document. + */ 'type': 'driving_license' | 'id_card' | 'passport'; + /** + * Place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * Sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; export type GelatoEmailReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'email_unverified_other' | 'email_verification_declined'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a email check + */ export type GelatoEmailReportModel = { + /** + * Email to be verified. + */ 'email': string; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoEmailReportErrorModel; + /** + * Status of this `email` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoIdNumberReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from an id_number check + */ export type GelatoIdNumberReportModel = { + /** + * Date of birth. + */ 'dob'?: GelatoDataIdNumberReportDateModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoIdNumberReportErrorModel; + /** + * First name. + */ 'first_name': string; + /** + * ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. + */ 'id_number'?: string | undefined; + /** + * Type of ID number. + */ 'id_number_type': 'br_cpf' | 'sg_nric' | 'us_ssn'; + /** + * Last name. + */ 'last_name': string; + /** + * Status of this `id_number` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoPhoneReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'phone_unverified_other' | 'phone_verification_declined'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a phone check + */ export type GelatoPhoneReportModel = { + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoPhoneReportErrorModel; + /** + * Phone to be verified. + */ 'phone': string; + /** + * Status of this `phone` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoProvidedDetailsModel = { + /** + * Email of user being verified + */ 'email'?: string | undefined; + /** + * Phone number of user being verified + */ 'phone'?: string | undefined; }; export type GelatoRelatedPersonModel = { + /** + * Token referencing the associated Account of the related Person resource. + */ 'account': string; + /** + * Token referencing the related Person resource. + */ 'person': string; }; export type GelatoReportDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; @@ -8802,25 +22582,61 @@ export type GelatoReportIdNumberOptionsModel = { }; export type GelatoSelfieReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a selfie check + */ export type GelatoSelfieReportModel = { + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. + */ 'document': string; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoSelfieReportErrorModel; + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. + */ 'selfie': string; + /** + * Status of this `selfie` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoSessionDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; export type GelatoSessionEmailOptionsModel = { + /** + * Request one time password verification of `provided_details.email`. + */ 'require_verification'?: boolean | undefined; }; @@ -8828,17 +22644,35 @@ export type GelatoSessionIdNumberOptionsModel = { }; +/** + * Shows last VerificationSession error + */ export type GelatoSessionLastErrorModel = { + /** + * A short machine-readable string giving the reason for the verification or user-session failure. + */ 'code': 'abandoned' | 'consent_declined' | 'country_not_supported' | 'device_not_supported' | 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | 'email_unverified_other' | 'email_verification_declined' | 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | 'phone_unverified_other' | 'phone_verification_declined' | 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | 'under_supported_age'; + /** + * A message that explains the reason for verification or user-session failure. + */ 'reason': string; }; export type GelatoSessionMatchingOptionsModel = { + /** + * Strictness of the DOB matching policy to apply. + */ 'dob'?: 'none' | 'similar' | undefined; + /** + * Strictness of the name matching policy to apply. + */ 'name'?: 'none' | 'similar' | undefined; }; export type GelatoSessionPhoneOptionsModel = { + /** + * Request one time password verification of `provided_details.phone`. + */ 'require_verification'?: boolean | undefined; }; @@ -8856,383 +22690,889 @@ export type GelatoVerificationSessionOptionsModel = { }; export type GelatoVerifiedOutputsModel = { + /** + * The user's verified address. + */ 'address': AddressModel; + /** + * The user’s verified date of birth. + */ 'dob'?: GelatoDataVerifiedOutputsDateModel | undefined; + /** + * The user's verified email address + */ 'email': string; + /** + * The user's verified first name. + */ 'first_name': string; + /** + * The user's verified id number. + */ 'id_number'?: string | undefined; + /** + * The user's verified id number type. + */ 'id_number_type': 'br_cpf' | 'sg_nric' | 'us_ssn'; + /** + * The user's verified last name. + */ 'last_name': string; + /** + * The user's verified phone number + */ 'phone': string; + /** + * The user's verified sex. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * The user's verified place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * The user's verified sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export type IdentityVerificationReportModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'document'?: GelatoDocumentReportModel | undefined; 'email'?: GelatoEmailReportModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'id_number'?: GelatoIdNumberReportModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_report'; 'options'?: GelatoVerificationReportOptionsModel | undefined; 'phone'?: GelatoPhoneReportModel | undefined; 'selfie'?: GelatoSelfieReportModel | undefined; + /** + * Type of report. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * ID of the VerificationSession that created this report. + */ 'verification_session': string; }; export type VerificationSessionRedactionModel = { + /** + * Indicates whether this object and its related objects have been redacted or not. + */ 'status': 'processing' | 'redacted'; }; +/** + * A VerificationSession guides you through the process of collecting and verifying the identities + * of your users. It contains details about the type of verification, such as what [verification + * check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for + * each verification in your system. + * + * A VerificationSession transitions through [multiple + * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through + * the verification flow. The VerificationSession contains the user's verified data after + * verification checks are complete. + * + * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) + */ export type IdentityVerificationSessionModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id': string; + /** + * The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + */ 'client_secret': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * If present, this property tells you the last error encountered when processing the verification. + */ 'last_error': GelatoSessionLastErrorModel; + /** + * ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + */ 'last_verification_report': string | IdentityVerificationReportModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_session'; + /** + * A set of options for the session’s verification checks. + */ 'options': GelatoVerificationSessionOptionsModel; + /** + * Details provided about the user being verified. These details may be shown to the user. + */ 'provided_details'?: GelatoProvidedDetailsModel | undefined; + /** + * Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + */ 'redaction': VerificationSessionRedactionModel; + /** + * Customer ID + */ 'related_customer': string; 'related_person'?: GelatoRelatedPersonModel | undefined; + /** + * Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + */ 'status': 'canceled' | 'processing' | 'requires_input' | 'verified'; + /** + * The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + */ 'url': string; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * The user’s verified data. + */ 'verified_outputs'?: GelatoVerifiedOutputsModel | undefined; }; +/** + * Occurs whenever a VerificationSession is canceled + */ export type IdentityVerificationSessionCanceledModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession is created + */ export type IdentityVerificationSessionCreatedModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to processing + */ export type IdentityVerificationSessionProcessingModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession is redacted. + */ export type IdentityVerificationSessionRedactedModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to require user input + */ export type IdentityVerificationSessionRequiresInputModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to verified + */ export type IdentityVerificationSessionVerifiedModel = { 'object': IdentityVerificationSessionModel; }; export type TreasurySharedResourceBillingDetailsModel = { 'address': AddressModel; + /** + * Email address. + */ 'email': string; + /** + * Full name. + */ 'name': string; }; export type InboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type InboundTransfersModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; + /** + * The type of the payment method used in the InboundTransfer. + */ 'type': 'us_bank_account'; 'us_bank_account'?: InboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks). + */ export type InvoiceCreatedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice is deleted. Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview). + */ export type InvoiceDeletedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice cannot be finalized. See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details. + */ export type InvoiceFinalizationFailedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice is finalized and updated to be an open invoice. + */ export type InvoiceFinalizedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice is marked uncollectible. + */ export type InvoiceMarkedUncollectibleModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days after an invoice becomes due—where X is determined by Automations + */ export type InvoiceOverdueModel = { 'object': InvoiceModel; }; +/** + * Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + */ export type InvoiceOverpaidModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. + */ export type InvoicePaidModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt requires further user action to complete. + */ export type InvoicePaymentActionRequiredModel = { 'object': InvoiceModel; }; +/** + * Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe. + */ export type InvoicePaymentAttemptRequiredModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method. + */ export type InvoicePaymentFailedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt succeeds. + */ export type InvoicePaymentSucceededModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice email is sent out. + */ export type InvoiceSentModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). Note: The received `Invoice` object will not have an invoice ID. + */ export type InvoiceUpcomingModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice changes (e.g., the invoice amount). + */ export type InvoiceUpdatedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice is voided. + */ export type InvoiceVoidedModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days before an invoice becomes due—where X is determined by Automations + */ export type InvoiceWillBeDueModel = { 'object': InvoiceModel; }; +/** + * Occurs when an InvoicePayment is successfully paid. + */ export type InvoicePaymentPaidModel = { 'object': InvoicePaymentModel; }; +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export type InvoiceRenderingTemplateModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * A brief description of the template, hidden from customers + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_rendering_template'; + /** + * The status of the template, one of `active` or `archived`. + */ 'status': 'active' | 'archived'; + /** + * Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + */ 'version': number; }; export type InvoiceSettingQuoteSettingModel = { + /** + * 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; 'issuer': ConnectAccountReferenceModel; }; export type ProrationDetailsModel = { + /** + * Discount amounts applied when the proration was created. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; }; +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export type InvoiceitemModel = { + /** + * Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + */ 'amount': number; + /** + * 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; + /** + * The ID of the customer who will be billed when this invoice item is billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'date': number; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * If true, discounts will apply to this invoice item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice this invoice item belongs to. + */ 'invoice': string | InvoiceModel; + /** + * 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': { [key: string]: string; }; + /** + * The amount after discounts, but before credits and taxes. This field is `null` for `discountable=true` items. + */ 'net_amount'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; + /** + * The parent that generated this invoice item. + */ 'parent': BillingBillResourceInvoiceItemParentsInvoiceItemParentModel; 'period': InvoiceLineItemPeriodModel; + /** + * The pricing information of the invoice item. + */ 'pricing': BillingBillResourceInvoicingPricingPricingModel; + /** + * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + */ 'proration': boolean; 'proration_details'?: ProrationDetailsModel | undefined; + /** + * Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + */ 'quantity': number; + /** + * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + */ 'tax_rates': TaxRateModel[]; + /** + * ID of the test clock this invoice item belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; }; +/** + * Occurs whenever an invoice item is created. + */ export type InvoiceitemCreatedModel = { 'object': InvoiceitemModel; }; +/** + * Occurs whenever an invoice item is deleted. + */ export type InvoiceitemDeletedModel = { 'object': InvoiceitemModel; }; +/** + * Occurs whenever an authorization is created. + */ export type IssuingAuthorizationCreatedModel = { 'object': IssuingAuthorizationModel; }; +/** + * Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling). + */ export type IssuingAuthorizationRequestModel = { 'object': IssuingAuthorizationModel; }; +/** + * Occurs whenever an authorization is updated. + */ export type IssuingAuthorizationUpdatedModel = { 'object': IssuingAuthorizationModel; }; +/** + * Occurs whenever a card is created. + */ export type IssuingCardCreatedModel = { 'object': IssuingCardModel; }; +/** + * Occurs whenever a card is updated. + */ export type IssuingCardUpdatedModel = { 'object': IssuingCardModel; }; +/** + * Occurs whenever a cardholder is created. + */ export type IssuingCardholderCreatedModel = { 'object': IssuingCardholderModel; }; +/** + * Occurs whenever a cardholder is updated. + */ export type IssuingCardholderUpdatedModel = { 'object': IssuingCardholderModel; }; +/** + * Occurs whenever a dispute is won, lost or expired. + */ export type IssuingDisputeClosedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is created. + */ export type IssuingDisputeCreatedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever funds are reinstated to your account for an Issuing dispute. + */ export type IssuingDisputeFundsReinstatedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever funds are deducted from your account for an Issuing dispute. + */ export type IssuingDisputeFundsRescindedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is submitted. + */ export type IssuingDisputeSubmittedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is updated. + */ export type IssuingDisputeUpdatedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it. + */ export type IssuingPersonalizationDesignActivatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it. + */ export type IssuingPersonalizationDesignDeactivatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is rejected by design review. + */ export type IssuingPersonalizationDesignRejectedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is updated. + */ export type IssuingPersonalizationDesignUpdatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever an issuing digital wallet token is created. + */ export type IssuingTokenCreatedModel = { 'object': IssuingTokenModel; }; +/** + * Occurs whenever an issuing digital wallet token is updated. + */ export type IssuingTokenUpdatedModel = { 'object': IssuingTokenModel; }; +/** + * Occurs whenever an issuing transaction is created. + */ export type IssuingTransactionCreatedModel = { 'object': IssuingTransactionModel; }; +/** + * Occurs whenever an issuing transaction is updated with receipt data. + */ export type IssuingTransactionPurchaseDetailsReceiptUpdatedModel = { 'object': IssuingTransactionModel; }; +/** + * Occurs whenever an issuing transaction is updated. + */ export type IssuingTransactionUpdatedModel = { 'object': IssuingTransactionModel; }; +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export type LoginLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'login_link'; + /** + * The URL for the login link. + */ 'url': string; }; +/** + * Occurs whenever a Mandate is updated. + */ export type MandateUpdatedModel = { 'object': MandateModel; }; export type OutboundPaymentsPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundPaymentsPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type OutboundPaymentsPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundPaymentsPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundPayment. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundPaymentsPaymentMethodDetailsUsBankAccountModel | undefined; }; export type OutboundTransfersPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type OutboundTransfersPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundTransfersPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundTransfer. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. + * Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment + * method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record + * can have guaranteed funds. + */ export type PaymentAttemptRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -9241,21 +23581,60 @@ export type PaymentAttemptRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentAttemptRecord. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details': PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence': 'off_session' | 'on_session'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_attempt_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel; + /** + * ID of the Payment Record this Payment Attempt Record belongs to. + */ 'payment_record': string; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Indicates who reported the payment. + */ 'reported_by': 'self' | 'stripe'; + /** + * Shipping information for this payment. + */ 'shipping_details': PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel; }; @@ -9268,85 +23647,179 @@ export type PaymentFlowsInstallmentOptionsModel = { 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; +/** + * Occurs when a PaymentIntent has funds to be captured. Check the `amount_capturable` property on the PaymentIntent to determine the amount that can be captured. You may capture the PaymentIntent with an `amount_to_capture` value up to the specified amount. [Learn more about capturing PaymentIntents.](https://docs.stripe.com/api/payment_intents/capture) + */ export type PaymentIntentAmountCapturableUpdatedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent is canceled. + */ export type PaymentIntentCanceledModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a new PaymentIntent is created. + */ export type PaymentIntentCreatedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes. + */ export type PaymentIntentPartiallyFundedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. + */ export type PaymentIntentPaymentFailedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has started processing. + */ export type PaymentIntentProcessingModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent transitions to requires_action state + */ export type PaymentIntentRequiresActionModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has successfully completed payment. + */ export type PaymentIntentSucceededModel = { 'object': PaymentIntentModel; }; export type PaymentIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; 'installments'?: PaymentFlowsInstallmentOptionsModel | undefined; + /** + * 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 | undefined; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; +/** + * Occurs when a payment link is created. + */ export type PaymentLinkCreatedModel = { 'object': PaymentLinkModel; }; +/** + * Occurs when a payment link is updated. + */ export type PaymentLinkUpdatedModel = { 'object': PaymentLinkModel; }; +/** + * Occurs whenever a new payment method is attached to a customer. + */ export type PaymentMethodAttachedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method's details are automatically updated by the network. + */ export type PaymentMethodAutomaticallyUpdatedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method is detached from a customer. + */ export type PaymentMethodDetachedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update). + */ export type PaymentMethodUpdatedModel = { 'object': PaymentMethodModel; }; export type PaymentMethodConfigResourceDisplayPreferenceModel = { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ 'overridable': boolean; + /** + * The account's display preference. + */ 'preference': 'none' | 'off' | 'on'; + /** + * The effective display preference value. + */ 'value': 'off' | 'on'; }; export type PaymentMethodConfigResourcePaymentMethodPropertiesModel = { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ 'available': boolean; 'display_preference': PaymentMethodConfigResourceDisplayPreferenceModel; }; +/** + * PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. + * + * There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): + * + * **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + * + * **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + * + * Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. + * + * Related guides: + * - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) + * - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + * - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) + */ export type PaymentMethodConfigurationModel = { 'acss_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Whether the configuration can be used for new payments. + */ 'active': boolean; 'affirm'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'afterpay_clearpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -9354,6 +23827,9 @@ export type PaymentMethodConfigurationModel = { 'alma'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'amazon_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'apple_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the Connect application associated with the configuration. + */ 'application': string; 'au_becs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'bacs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -9371,8 +23847,14 @@ export type PaymentMethodConfigurationModel = { 'giropay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'google_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'grabpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The default configuration is used whenever a payment method configuration is not specified. + */ 'is_default': boolean; 'jcb'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kakao_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -9380,16 +23862,28 @@ export type PaymentMethodConfigurationModel = { 'konbini'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kr_card'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'link'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'mobilepay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'multibanco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The configuration's name. + */ 'name': string; 'naver_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'nz_bank_account'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_configuration'; 'oxxo'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'p24'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the configuration's parent configuration. + */ 'parent': string; 'pay_by_bank'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'payco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -9409,630 +23903,1560 @@ export type PaymentMethodConfigurationModel = { 'zip'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; }; +/** + * Contains additional details about the status of a payment method for a specific payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusDetailsModel = { + /** + * The error message associated with the status of the payment method on the domain. + */ 'error_message': string; }; +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusModel = { + /** + * The status of the payment method on the domain. + */ 'status': 'active' | 'inactive'; 'status_details'?: PaymentMethodDomainResourcePaymentMethodStatusDetailsModel | undefined; }; +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export type PaymentMethodDomainModel = { 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The domain name that this payment method domain object represents. + */ 'domain_name': string; + /** + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + */ 'enabled': boolean; 'google_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Unique identifier for the object. + */ 'id': string; 'klarna': PaymentMethodDomainResourcePaymentMethodStatusModel; 'link': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_domain'; 'paypal': PaymentMethodDomainResourcePaymentMethodStatusModel; }; +/** + * Occurs whenever a payout is canceled. + */ export type PayoutCanceledModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is created. + */ export type PayoutCreatedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout attempt fails. + */ export type PayoutFailedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is *expected* to be available in the destination account. If the payout fails, a `payout.failed` notification is also sent, at a later time. + */ export type PayoutPaidModel = { 'object': PayoutModel; }; +/** + * Occurs whenever balance transactions paid out in an automatic payout can be queried. + */ export type PayoutReconciliationCompletedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is updated. + */ export type PayoutUpdatedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a person associated with an account is created. + */ export type PersonCreatedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a person associated with an account is deleted. + */ export type PersonDeletedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a person associated with an account is updated. + */ export type PersonUpdatedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a plan is created. + */ export type PlanCreatedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a plan is deleted. + */ export type PlanDeletedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a plan is updated. + */ export type PlanUpdatedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a price is created. + */ export type PriceCreatedModel = { 'object': PriceModel; }; +/** + * Occurs whenever a price is deleted. + */ export type PriceDeletedModel = { 'object': PriceModel; }; +/** + * Occurs whenever a price is updated. + */ export type PriceUpdatedModel = { 'object': PriceModel; }; +/** + * Occurs whenever a product is created. + */ export type ProductCreatedModel = { 'object': ProductModel; }; +/** + * Occurs whenever a product is deleted. + */ export type ProductDeletedModel = { 'object': ProductModel; }; +/** + * Occurs whenever a product is updated. + */ export type ProductUpdatedModel = { 'object': ProductModel; }; +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type ProductFeatureModel = { 'entitlement_feature': EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; +/** + * Occurs whenever a promotion code is created. + */ export type PromotionCodeCreatedModel = { 'object': PromotionCodeModel; }; +/** + * Occurs whenever a promotion code is updated. + */ export type PromotionCodeUpdatedModel = { 'object': PromotionCodeModel; }; export type QuotesResourceAutomaticTaxModel = { + /** + * Automatically calculate taxes + */ '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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this quote. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type QuotesResourceTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type QuotesResourceTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: QuotesResourceTotalDetailsResourceBreakdownModel | undefined; }; export type QuotesResourceRecurringModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceUpfrontModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceComputedModel = { + /** + * The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + */ 'recurring': QuotesResourceRecurringModel; 'upfront': QuotesResourceUpfrontModel; }; export type QuotesResourceFromQuoteModel = { + /** + * Whether this quote is a revision of a different quote. + */ 'is_revision': boolean; + /** + * The quote that was cloned. + */ 'quote': string | QuoteModel; }; export type QuotesResourceStatusTransitionsModel = { + /** + * The time that the quote was accepted. Measured in seconds since Unix epoch. + */ 'accepted_at': number; + /** + * The time that the quote was canceled. Measured in seconds since Unix epoch. + */ 'canceled_at': number; + /** + * The time that the quote was finalized. Measured in seconds since Unix epoch. + */ 'finalized_at': number; }; +/** + * The billing mode of the quote. + */ export type QuotesResourceSubscriptionDataBillingModeModel = { 'flexible'?: SubscriptionsResourceBillingModeFlexibleModel | undefined; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; }; export type QuotesResourceSubscriptionDataSubscriptionDataModel = { 'billing_mode': QuotesResourceSubscriptionDataBillingModeModel; + /** + * 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; + /** + * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + */ 'effective_date': number; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ 'metadata': { [key: string]: string; }; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days': number; }; export type QuotesResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ 'amount': number; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + */ 'amount_percent': number; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export type QuoteModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * ID of the Connect Application that created the quote. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + */ 'application_fee_amount': number; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + */ 'application_fee_percent': number; 'automatic_tax': QuotesResourceAutomaticTaxModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; 'computed': QuotesResourceComputedModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The tax rates applied to this quote. + */ 'default_tax_rates'?: Array | undefined; + /** + * A description that will be displayed on the quote PDF. + */ 'description': string; + /** + * The discounts applied to this quote. + */ 'discounts': Array; + /** + * The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * A footer that will be displayed on the quote PDF. + */ 'footer': string; + /** + * Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + */ 'from_quote': QuotesResourceFromQuoteModel; + /** + * A header that will be displayed on the quote PDF. + */ 'header': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was created from this quote. + */ 'invoice': string | InvoiceModel | DeletedInvoiceModel; 'invoice_settings': InvoiceSettingQuoteSettingModel; + /** + * A list of items the customer is being quoted for. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; + /** + * A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The status of the quote. + */ 'status': 'accepted' | 'canceled' | 'draft' | 'open'; 'status_transitions': QuotesResourceStatusTransitionsModel; + /** + * The subscription that was created or updated from this quote. + */ 'subscription': string | SubscriptionModel; 'subscription_data': QuotesResourceSubscriptionDataSubscriptionDataModel; + /** + * The subscription schedule that was created or updated from this quote. + */ 'subscription_schedule': string | SubscriptionScheduleModel; + /** + * ID of the test clock this quote belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; 'total_details': QuotesResourceTotalDetailsModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + */ 'transfer_data': QuotesResourceTransferDataModel; }; +/** + * Occurs whenever a quote is accepted. + */ export type QuoteAcceptedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is canceled. + */ export type QuoteCanceledModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is created. + */ export type QuoteCreatedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is finalized. + */ export type QuoteFinalizedModel = { 'object': QuoteModel; }; +/** + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + */ export type RadarEarlyFraudWarningModel = { + /** + * An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + */ 'actionable': boolean; + /** + * ID of the charge this early fraud warning is for, optionally expanded. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + */ 'fraud_type': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.early_fraud_warning'; + /** + * ID of the Payment Intent this early fraud warning is for, optionally expanded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; }; +/** + * Occurs whenever an early fraud warning is created. + */ export type RadarEarlyFraudWarningCreatedModel = { 'object': RadarEarlyFraudWarningModel; }; +/** + * Occurs whenever an early fraud warning is updated. + */ export type RadarEarlyFraudWarningUpdatedModel = { 'object': RadarEarlyFraudWarningModel; }; +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListItemModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who added this item to the value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; + /** + * The value of the item. + */ 'value': string; + /** + * The identifier of the value list this item belongs to. + */ 'value_list': string; }; +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListModel = { + /** + * The name of the value list for use in rules. + */ 'alias': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who created this value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. + */ 'item_type': 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'sepa_debit_fingerprint' | 'string' | 'us_bank_account_fingerprint'; + /** + * List of items contained within this value list. + */ 'list_items': { + /** + * Details about each object. + */ 'data': RadarValueListItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The name of the value list. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type ReceivedPaymentMethodDetailsFinancialAccountModel = { + /** + * The FinancialAccount ID. + */ 'id': string; + /** + * The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + */ 'network': 'stripe'; }; +/** + * Occurs whenever a refund is created. + */ export type RefundCreatedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a refund has failed. + */ export type RefundFailedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a refund is updated. + */ export type RefundUpdatedModel = { 'object': RefundModel; }; +/** + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ 'error': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * `true` if the report is run on live mode data and `false` if it is run on test mode data. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_run'; 'parameters': FinancialReportingFinanceReportRunRunParametersModel; + /** + * The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + */ 'report_type': string; + /** + * The file object representing the result of the report run (populated when + * `status=succeeded`). + */ 'result': FileModel; + /** + * Status of this report run. This will be `pending` when the run is initially created. + * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + */ 'status': string; + /** + * Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ 'succeeded_at': number; }; +/** + * Occurs whenever a requested `ReportRun` failed to complete. + */ export type ReportingReportRunFailedModel = { 'object': ReportingReportRunModel; }; +/** + * Occurs whenever a requested `ReportRun` completed successfully. + */ export type ReportingReportRunSucceededModel = { 'object': ReportingReportRunModel; }; +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportTypeModel = { + /** + * Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_end': number; + /** + * Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_start': number; + /** + * List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + */ 'default_columns': string[]; + /** + * The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Human-readable name of the Report Type + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_type'; + /** + * When this Report Type was latest updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + */ 'version': number; }; +/** + * Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available). + */ export type ReportingReportTypeUpdatedModel = { 'object': ReportingReportTypeModel; }; +/** + * Occurs whenever a review is closed. The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`. + */ export type ReviewClosedModel = { 'object': ReviewModel; }; +/** + * Occurs whenever a review is opened. + */ export type ReviewOpenedModel = { 'object': ReviewModel; }; export type SigmaScheduledQueryRunErrorModel = { + /** + * Information about the run failure. + */ 'message': string; }; +/** + * If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + * receive a `sigma.scheduled_query_run.created` webhook each time the query + * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + * retrieve the query results. + */ export type ScheduledQueryRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * When the query was run, Sigma contained a snapshot of your Stripe data at this time. + */ 'data_load_time': number; 'error'?: SigmaScheduledQueryRunErrorModel | undefined; + /** + * The file object representing the results of the query. + */ 'file': FileModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'scheduled_query_run'; + /** + * Time at which the result expires and is no longer available for download. + */ 'result_available_until': number; + /** + * SQL for the query. + */ 'sql': string; + /** + * The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + */ 'status': string; + /** + * Title of the query. + */ 'title': string; }; +/** + * Occurs when a SetupIntent is canceled. + */ export type SetupIntentCanceledModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a new SetupIntent is created. + */ export type SetupIntentCreatedModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a SetupIntent is in requires_action state. + */ export type SetupIntentRequiresActionModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a SetupIntent has failed the attempt to setup a payment method. + */ export type SetupIntentSetupFailedModel = { 'object': SetupIntentModel; }; +/** + * Occurs when an SetupIntent has successfully setup a payment method. + */ export type SetupIntentSucceededModel = { 'object': SetupIntentModel; }; export type SetupIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; +/** + * Occurs whenever a Sigma scheduled query run finishes. + */ export type SigmaScheduledQueryRunCreatedModel = { 'object': ScheduledQueryRunModel; }; +/** + * Occurs whenever a source is canceled. + */ export type SourceCanceledModel = { 'object': SourceModel; }; +/** + * Occurs whenever a source transitions to chargeable. + */ export type SourceChargeableModel = { 'object': SourceModel; }; +/** + * Occurs whenever a source fails. + */ export type SourceFailedModel = { 'object': SourceModel; }; export type SourceMandateNotificationAcssDebitDataModel = { + /** + * The statement descriptor associate with the debit. + */ 'statement_descriptor'?: string | undefined; }; export type SourceMandateNotificationBacsDebitDataModel = { + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; }; export type SourceMandateNotificationSepaDebitDataModel = { + /** + * SEPA creditor ID. + */ 'creditor_identifier'?: string | undefined; + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; + /** + * Mandate reference associated with the debit. + */ 'mandate_reference'?: string | undefined; }; +/** + * Source mandate notifications should be created when a notification related to + * a source mandate must be sent to the payer. They will trigger a webhook or + * deliver an email to the customer. + */ export type SourceMandateNotification_1Model = { 'acss_debit'?: SourceMandateNotificationAcssDebitDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + */ 'amount': number; 'bacs_debit'?: SourceMandateNotificationBacsDebitDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_mandate_notification'; + /** + * The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + */ 'reason': string; 'sepa_debit'?: SourceMandateNotificationSepaDebitDataModel | undefined; 'source': SourceModel; + /** + * The status of the mandate notification. Valid statuses are `pending` or `submitted`. + */ 'status': string; + /** + * The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + */ 'type': string; }; +/** + * Occurs whenever a source mandate notification method is set to manual. + */ export type SourceMandateNotificationModel = { 'object': SourceMandateNotification_1Model; }; +/** + * Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment. + */ export type SourceRefundAttributesRequiredModel = { 'object': SourceModel; }; export type SourceTransactionAchCreditTransferDataModel = { + /** + * Customer data associated with the transfer. + */ 'customer_data'?: string | undefined; + /** + * Bank account fingerprint associated with the transfer. + */ 'fingerprint'?: string | undefined; + /** + * Last 4 digits of the account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Routing number associated with the transfer. + */ 'routing_number'?: string | undefined; }; export type SourceTransactionChfCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's country address. + */ 'sender_address_country'?: string | undefined; + /** + * Sender's line 1 address. + */ 'sender_address_line1'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; export type SourceTransactionGbpCreditTransferDataModel = { + /** + * Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. + */ 'fingerprint'?: string | undefined; + /** + * The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. + */ 'funding_method'?: string | undefined; + /** + * Last 4 digits of sender account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Sender entered arbitrary information about the transfer. + */ 'reference'?: string | undefined; + /** + * Sender account number associated with the transfer. + */ 'sender_account_number'?: string | undefined; + /** + * Sender name associated with the transfer. + */ 'sender_name'?: string | undefined; + /** + * Sender sort code associated with the transfer. + */ 'sender_sort_code'?: string | undefined; }; export type SourceTransactionPaperCheckDataModel = { + /** + * Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. + */ 'available_at'?: string | undefined; + /** + * Comma-separated list of invoice IDs associated with the paper check. + */ 'invoices'?: string | undefined; }; export type SourceTransactionSepaCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; +/** + * Some payment methods have no required amount that a customer must send. + * Customers can be instructed to send any amount, and it can be made up of + * multiple transactions. As such, sources can have multiple associated + * transactions. + */ export type SourceTransactionModel = { 'ach_credit_transfer'?: SourceTransactionAchCreditTransferDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + */ 'amount': number; 'chf_credit_transfer'?: SourceTransactionChfCreditTransferDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; 'gbp_credit_transfer'?: SourceTransactionGbpCreditTransferDataModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_transaction'; 'paper_check'?: SourceTransactionPaperCheckDataModel | undefined; 'sepa_credit_transfer'?: SourceTransactionSepaCreditTransferDataModel | undefined; + /** + * The ID of the source this transaction is attached to. + */ 'source': string; + /** + * The status of the transaction, one of `succeeded`, `pending`, or `failed`. + */ 'status': string; + /** + * The type of source this transaction is attached to. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'alipay' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; }; +/** + * Occurs whenever a source transaction is created. + */ export type SourceTransactionCreatedModel = { 'object': SourceTransactionModel; }; +/** + * Occurs whenever a source transaction is updated. + */ export type SourceTransactionUpdatedModel = { 'object': SourceTransactionModel; }; +/** + * Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency. + */ export type SubscriptionScheduleAbortedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a subscription schedule is canceled. + */ export type SubscriptionScheduleCanceledModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is completed. + */ export type SubscriptionScheduleCompletedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is created. + */ export type SubscriptionScheduleCreatedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs 7 days before a subscription schedule will expire. + */ export type SubscriptionScheduleExpiringModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is released. + */ export type SubscriptionScheduleReleasedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a subscription schedule is updated. + */ export type SubscriptionScheduleUpdatedModel = { 'object': SubscriptionScheduleModel; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel = { + /** + * The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + */ 'transaction': string; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel = { + /** + * Details on why we couldn't commit the tax transaction. + */ 'reason': 'another_payment_associated_with_calculation' | 'calculation_expired' | 'currency_mismatch' | 'original_transaction_voided' | 'unique_reference_violation'; }; export type TaxProductResourceTaxAssociationTransactionAttemptsModel = { 'committed'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel | undefined; 'errored'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel | undefined; + /** + * The source of the tax transaction attempt. This is either a refund or a payment intent. + */ 'source': string; + /** + * The status of the transaction attempt. This can be `errored` or `committed`. + */ 'status': string; }; +/** + * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input + */ export type TaxAssociationModel = { + /** + * The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + */ 'calculation': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.association'; + /** + * The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + */ 'payment_intent': string; + /** + * Information about the tax transactions linked to this payment intent + */ 'tax_transaction_attempts': TaxProductResourceTaxAssociationTransactionAttemptsModel[]; }; export type TaxProductResourcePostalAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + */ 'state': string; }; export type TaxProductResourceCustomerDetailsResourceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type TaxProductResourceCustomerDetailsModel = { + /** + * The customer's postal address (for example, home or business location). + */ 'address': TaxProductResourcePostalAddressModel; + /** + * The type of customer address provided. + */ 'address_source': 'billing' | 'shipping'; + /** + * The customer's IP address (IPv4 or IPv6). + */ 'ip_address': string; + /** + * The customer's tax IDs (for example, EU VAT numbers). + */ 'tax_ids': TaxProductResourceCustomerDetailsResourceTaxIdModel[]; + /** + * The taxability override used for taxation. + */ 'taxability_override': 'customer_exempt' | 'none' | 'reverse_charge'; }; export type TaxProductResourceJurisdictionModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * A human-readable name for the jurisdiction imposing the tax. + */ 'display_name': string; + /** + * Indicates the level of the jurisdiction imposing the tax. + */ 'level': 'city' | 'country' | 'county' | 'district' | 'state'; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state': string; }; export type TaxProductResourceLineItemTaxRateDetailsModel = { + /** + * A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + */ 'display_name': string; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + */ 'percentage_decimal': string; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxProductResourceLineItemTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; 'jurisdiction': TaxProductResourceJurisdictionModel; + /** + * Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + */ 'sourcing': 'destination' | 'origin'; + /** + * Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + */ 'tax_rate_details': TaxProductResourceLineItemTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; export type TaxCalculationLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product': string; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item. + */ 'reference': string; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to this line item. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; }; @@ -10041,115 +25465,270 @@ export type TaxProductResourceShipFromDetailsModel = { }; export type TaxProductResourceTaxCalculationShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to shipping cost. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; export type TaxProductResourceTaxRateDetailsModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount': TaxRateFlatAmountModel; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. + */ 'percentage_decimal': string; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type': 'flat_amount' | 'percentage'; + /** + * State, county, province, or region. + */ 'state': string; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxProductResourceTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Specifies whether the tax amount is included in the line item amount. + */ 'inclusive': boolean; 'tax_rate_details': TaxProductResourceTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; +/** + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom) + */ export type TaxCalculationModel = { + /** + * Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_total': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer': string; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Timestamp of date at which the tax calculation will expire. + */ 'expires_at': number; + /** + * Unique identifier for the calculation. + */ 'id': string; + /** + * The list of items the customer is purchasing. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxCalculationLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation'; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details': TaxProductResourceShipFromDetailsModel; + /** + * The shipping cost details for the calculation. + */ 'shipping_cost': TaxProductResourceTaxCalculationShippingCostModel; + /** + * The amount of tax to be collected on top of the line item prices. + */ 'tax_amount_exclusive': number; + /** + * The amount of tax already included in the line item prices. + */ 'tax_amount_inclusive': number; + /** + * Breakdown of individual tax amounts that add up to the total. + */ 'tax_breakdown': TaxProductResourceTaxBreakdownModel[]; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel = { + /** + * Place of supply scheme used in an Default standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultInboundGoodsModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel | undefined; + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultModel = { + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsSimplifiedModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsEuStandardModel = { + /** + * Place of supply scheme used in an EU standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'small_seller' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsEuropeModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsEuStandardModel | undefined; + /** + * Type of registration in an EU country. + */ 'type': 'ioss' | 'oss_non_union' | 'oss_union' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel = { + /** + * Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'province': string; }; export type TaxProductRegistrationsResourceCountryOptionsCanadaModel = { 'province_standard'?: TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel | undefined; + /** + * Type of registration in Canada. + */ 'type': 'province_standard' | 'simplified' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsThailandModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction'?: string | undefined; + /** + * The type of the election for the state sales tax registration. + */ 'type': 'local_use_tax' | 'simplified_sellers_use_tax' | 'single_local_use_tax'; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel = { + /** + * Elections for the state sales tax registration. + */ 'elections'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel[] | undefined; }; export type TaxProductRegistrationsResourceCountryOptionsUnitedStatesModel = { 'local_amusement_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel | undefined; 'local_lease_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel | undefined; + /** + * Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'state': string; 'state_sales_tax'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel | undefined; + /** + * Type of registration in the US. + */ 'type': 'local_amusement_tax' | 'local_lease_tax' | 'state_communications_tax' | 'state_retail_delivery_fee' | 'state_sales_tax'; }; @@ -10256,21 +25835,61 @@ export type TaxProductRegistrationsResourceCountryOptionsModel = { 'zw'?: TaxProductRegistrationsResourceCountryOptionsDefaultModel | undefined; }; +/** + * A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). + * + * Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering). + * + * Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api) + */ export type TaxRegistrationModel = { + /** + * Time at which the registration becomes active. Measured in seconds since the Unix epoch. + */ 'active_from': number; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; 'country_options': TaxProductRegistrationsResourceCountryOptionsModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.registration'; + /** + * The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + */ 'status': 'active' | 'expired' | 'scheduled'; }; export type TaxProductResourceTaxSettingsDefaultsModel = { + /** + * The tax calculation provider this account uses. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; + /** + * Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'inferred_by_currency'; + /** + * Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. + */ 'tax_code': string; }; @@ -10283,6 +25902,9 @@ export type TaxProductResourceTaxSettingsStatusDetailsResourceActiveModel = { }; export type TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel = { + /** + * The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. + */ 'missing_fields': string[]; }; @@ -10291,104 +25913,276 @@ export type TaxProductResourceTaxSettingsStatusDetailsModel = { 'pending'?: TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel | undefined; }; +/** + * You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. + * + * Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) + */ export type TaxSettingsModel = { 'defaults': TaxProductResourceTaxSettingsDefaultsModel; + /** + * The place where your business is located. + */ 'head_office': TaxProductResourceTaxSettingsHeadOfficeModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.settings'; + /** + * The status of the Tax `Settings`. + */ 'status': 'active' | 'pending'; 'status_details': TaxProductResourceTaxSettingsStatusDetailsModel; }; +/** + * Occurs whenever tax settings is updated. + */ export type TaxSettingsUpdatedModel = { 'object': TaxSettingsModel; }; export type TaxProductResourceTaxTransactionLineItemResourceReversalModel = { + /** + * The `id` of the line item to reverse in the original transaction. + */ 'original_line_item': string; }; export type TaxTransactionLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product': string; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item in the transaction. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal': TaxProductResourceTaxTransactionLineItemResourceReversalModel; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; + /** + * If `reversal`, this line item reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; export type TaxProductResourceTaxTransactionResourceReversalModel = { + /** + * The `id` of the reversed `Transaction` object. + */ 'original_transaction': string; }; export type TaxProductResourceTaxTransactionShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; +/** + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction) + */ export type TaxTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer': string; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Unique identifier for the transaction. + */ 'id': string; + /** + * The tax collected or refunded, by line item. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxTransactionLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction'; + /** + * The Unix timestamp representing when the tax liability is assumed or reduced. + */ 'posted_at': number; + /** + * A custom unique identifier, such as 'myOrder_123'. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal': TaxProductResourceTaxTransactionResourceReversalModel; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details': TaxProductResourceShipFromDetailsModel; + /** + * The shipping cost details for the transaction. + */ 'shipping_cost': TaxProductResourceTaxTransactionShippingCostModel; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; + /** + * If `reversal`, this transaction reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; +/** + * Occurs whenever a new tax rate is created. + */ export type TaxRateCreatedModel = { 'object': TaxRateModel; }; +/** + * Occurs whenever a tax rate is updated. + */ export type TaxRateUpdatedModel = { 'object': TaxRateModel; }; export type TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel = { + /** + * A File ID representing an image to display on the reader + */ 'splashscreen'?: string | FileModel | undefined; }; export type TerminalConfigurationConfigurationResourceOfflineConfigModel = { + /** + * Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + */ 'enabled': boolean; }; export type TerminalConfigurationConfigurationResourceRebootWindowModel = { + /** + * Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + */ 'end_hour': number; + /** + * Integer between 0 to 23 that represents the start hour of the reboot time window. + */ 'start_hour': number; }; export type TerminalConfigurationConfigurationResourceCurrencySpecificConfigModel = { + /** + * Fixed amounts displayed when collecting a tip + */ 'fixed_amounts'?: number[] | undefined; + /** + * Percentages displayed when collecting a tip + */ 'percentages'?: number[] | undefined; + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ 'smart_tip_threshold'?: number | undefined; }; @@ -10418,22 +26212,55 @@ export type TerminalConfigurationConfigurationResourceTippingModel = { }; export type TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; + /** + * Username for connecting to the WiFi network + */ 'username': string; }; export type TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * A File ID representing a PEM file containing the client certificate + */ 'client_certificate_file': string; + /** + * A File ID representing a PEM file containing the client RSA private key + */ 'private_key_file': string; + /** + * Password for the private key file + */ 'private_key_file_password'?: string | undefined; + /** + * Name of the WiFi network + */ 'ssid': string; }; export type TerminalConfigurationConfigurationResourcePersonalPskWifiModel = { + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; }; @@ -10441,16 +26268,38 @@ export type TerminalConfigurationConfigurationResourceWifiConfigModel = { 'enterprise_eap_peap'?: TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel | undefined; 'enterprise_eap_tls'?: TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel | undefined; 'personal_psk'?: TerminalConfigurationConfigurationResourcePersonalPskWifiModel | undefined; + /** + * Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type. + */ 'type': 'enterprise_eap_peap' | 'enterprise_eap_tls' | 'personal_psk'; }; +/** + * A Configurations object represents how features should be configured for terminal readers. + * For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). + */ export type TerminalConfigurationModel = { 'bbpos_wisepad3'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; 'bbpos_wisepos_e'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether this Configuration is the default for your account + */ 'is_account_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String indicating the name of the Configuration object, set by the user + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; 'offline'?: TerminalConfigurationConfigurationResourceOfflineConfigModel | undefined; 'reboot_window'?: TerminalConfigurationConfigurationResourceRebootWindowModel | undefined; @@ -10460,505 +26309,1335 @@ export type TerminalConfigurationModel = { 'wifi'?: TerminalConfigurationConfigurationResourceWifiConfigModel | undefined; }; +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalConnectionTokenModel = { + /** + * The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + */ 'location'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.connection_token'; + /** + * Your application should pass this token to the Stripe Terminal SDK. + */ 'secret': string; }; +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalLocationModel = { 'address': AddressModel; 'address_kana'?: LegalEntityJapanAddressModel | undefined; 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ 'configuration_overrides'?: string | undefined; + /** + * The display name of the location. + */ 'display_name': string; + /** + * The Kana variation of the display name of the location. + */ 'display_name_kana'?: string | undefined; + /** + * The Kanji variation of the display name of the location. + */ 'display_name_kanji'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; + /** + * The phone number of the location. + */ 'phone'?: string | undefined; }; +/** + * Options associated with the Apple Terms and Conditions link type. + */ export type TerminalOnboardingLinkAppleTermsAndConditionsModel = { + /** + * Whether the link should also support users relinking their Apple account. + */ 'allow_relinking': boolean; + /** + * The business name of the merchant accepting Apple's Terms and Conditions. + */ 'merchant_display_name': string; }; +/** + * Link type options associated with the current onboarding link object. + */ export type TerminalOnboardingLinkLinkOptionsModel = { + /** + * The options associated with the Apple Terms and Conditions link type. + */ 'apple_terms_and_conditions': TerminalOnboardingLinkAppleTermsAndConditionsModel; }; +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export type TerminalOnboardingLinkModel = { 'link_options': TerminalOnboardingLinkLinkOptionsModel; + /** + * The type of link being generated. + */ 'link_type': 'apple_terms_and_conditions'; 'object': 'terminal.onboarding_link'; + /** + * Stripe account ID to generate the link for. + */ 'on_behalf_of': string; + /** + * The link passed back to the user for their onboarding. + */ 'redirect_url': string; }; +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export type TerminalReaderReaderResourceCustomTextModel = { + /** + * Customize the default description for this input + */ 'description': string; + /** + * Customize the default label for this input's skip button + */ 'skip_button': string; + /** + * Customize the default label for this input's submit button + */ 'submit_button': string; + /** + * Customize the default title for this input + */ 'title': string; }; +/** + * Information about a email being collected using a reader + */ export type TerminalReaderReaderResourceEmailModel = { + /** + * The collected email address + */ 'value': string; }; +/** + * Information about a number being collected using a reader + */ export type TerminalReaderReaderResourceNumericModel = { + /** + * The collected number + */ 'value': string; }; +/** + * Information about a phone number being collected using a reader + */ export type TerminalReaderReaderResourcePhoneModel = { + /** + * The collected phone number + */ 'value': string; }; +/** + * Choice to be selected on a Reader + */ export type TerminalReaderReaderResourceChoiceModel = { + /** + * The identifier for the selected choice. Maximum 50 characters. + */ 'id': string; + /** + * The button style for the choice. Can be `primary` or `secondary`. + */ 'style': 'primary' | 'secondary'; + /** + * The text to be selected. Maximum 30 characters. + */ 'text': string; }; +/** + * Information about a selection being collected using a reader + */ export type TerminalReaderReaderResourceSelectionModel = { + /** + * List of possible choices to be selected + */ 'choices': TerminalReaderReaderResourceChoiceModel[]; + /** + * The id of the selected choice + */ 'id': string; + /** + * The text of the selected choice + */ 'text': string; }; +/** + * Information about a signature being collected using a reader + */ export type TerminalReaderReaderResourceSignatureModel = { + /** + * The File ID of a collected signature image + */ 'value': string; }; +/** + * Information about text being collected using a reader + */ export type TerminalReaderReaderResourceTextModel = { + /** + * The collected text value + */ 'value': string; }; +/** + * Information about an input's toggle + */ export type TerminalReaderReaderResourceToggleModel = { + /** + * The toggle's default value. Can be `enabled` or `disabled`. + */ 'default_value': 'disabled' | 'enabled'; + /** + * The toggle's description text. Maximum 50 characters. + */ 'description': string; + /** + * The toggle's title text. Maximum 50 characters. + */ 'title': string; + /** + * The toggle's collected value. Can be `enabled` or `disabled`. + */ 'value': 'disabled' | 'enabled'; }; +/** + * Represents an input to be collected using the reader + */ export type TerminalReaderReaderResourceInputModel = { + /** + * Default text of input being collected. + */ 'custom_text': TerminalReaderReaderResourceCustomTextModel; 'email'?: TerminalReaderReaderResourceEmailModel | undefined; 'numeric'?: TerminalReaderReaderResourceNumericModel | undefined; 'phone'?: TerminalReaderReaderResourcePhoneModel | undefined; + /** + * Indicate that this input is required, disabling the skip button. + */ 'required': boolean; 'selection'?: TerminalReaderReaderResourceSelectionModel | undefined; 'signature'?: TerminalReaderReaderResourceSignatureModel | undefined; + /** + * Indicate that this input was skipped by the user. + */ 'skipped'?: boolean | undefined; 'text'?: TerminalReaderReaderResourceTextModel | undefined; + /** + * List of toggles being collected. Values are present if collection is complete. + */ 'toggles': TerminalReaderReaderResourceToggleModel[]; + /** + * Type of input being collected. + */ 'type': 'email' | 'numeric' | 'phone' | 'selection' | 'signature' | 'text'; }; +/** + * Represents a reader action to collect customer inputs + */ export type TerminalReaderReaderResourceCollectInputsActionModel = { + /** + * List of inputs to be collected. + */ 'inputs': TerminalReaderReaderResourceInputModel[]; + /** + * 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': { [key: string]: string; }; }; +/** + * Represents a per-transaction tipping configuration + */ export type TerminalReaderReaderResourceTippingConfigModel = { + /** + * Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + */ 'amount_eligible'?: number | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceCollectConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to collect a payment method + */ export type TerminalReaderReaderResourceCollectPaymentMethodActionModel = { 'collect_config'?: TerminalReaderReaderResourceCollectConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'payment_method'?: PaymentMethodModel | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceConfirmConfigModel = { + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; }; +/** + * Represents a reader action to confirm a payment + */ export type TerminalReaderReaderResourceConfirmPaymentIntentActionModel = { 'confirm_config'?: TerminalReaderReaderResourceConfirmConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceProcessConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to process a payment intent + */ export type TerminalReaderReaderResourceProcessPaymentIntentActionModel = { + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'process_config'?: TerminalReaderReaderResourceProcessConfigModel | undefined; }; +/** + * Represents a per-setup override of a reader configuration + */ export type TerminalReaderReaderResourceProcessSetupConfigModel = { + /** + * Enable customer-initiated cancellation when processing this SetupIntent. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to process a setup intent + */ export type TerminalReaderReaderResourceProcessSetupIntentActionModel = { + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card'?: string | undefined; 'process_config'?: TerminalReaderReaderResourceProcessSetupConfigModel | undefined; + /** + * Most recent SetupIntent processed by the reader. + */ 'setup_intent': string | SetupIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceRefundPaymentConfigModel = { + /** + * Enable customer-initiated cancellation when refunding this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to refund a payment + */ export type TerminalReaderReaderResourceRefundPaymentActionModel = { + /** + * The amount being refunded. + */ 'amount'?: number | undefined; + /** + * Charge that is being refunded. + */ 'charge'?: string | ChargeModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Payment intent that is being refunded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason for the refund. + */ 'reason'?: 'duplicate' | 'fraudulent' | 'requested_by_customer' | undefined; + /** + * Unique identifier for the refund object. + */ 'refund'?: string | RefundModel | undefined; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + */ 'refund_application_fee'?: boolean | undefined; 'refund_payment_config'?: TerminalReaderReaderResourceRefundPaymentConfigModel | undefined; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + */ 'reverse_transfer'?: boolean | undefined; }; +/** + * Represents a line item to be displayed on the reader + */ export type TerminalReaderReaderResourceLineItemModel = { + /** + * The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Description of the line item. + */ 'description': string; + /** + * The quantity of the line item. + */ 'quantity': number; }; +/** + * Represents a cart to be displayed on the reader + */ export type TerminalReaderReaderResourceCartModel = { + /** + * 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; + /** + * List of line items in the cart. + */ 'line_items': TerminalReaderReaderResourceLineItemModel[]; + /** + * Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'tax': number; + /** + * Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'total': number; }; +/** + * Represents a reader action to set the reader display + */ export type TerminalReaderReaderResourceSetReaderDisplayActionModel = { + /** + * Cart object to be displayed by the reader, including line items, amounts, and currency. + */ 'cart': TerminalReaderReaderResourceCartModel; + /** + * Type of information to be displayed by the reader. Only `cart` is currently supported. + */ 'type': 'cart'; }; +/** + * Represents an action performed by the reader + */ export type TerminalReaderReaderResourceReaderActionModel = { 'collect_inputs'?: TerminalReaderReaderResourceCollectInputsActionModel | undefined; 'collect_payment_method'?: TerminalReaderReaderResourceCollectPaymentMethodActionModel | undefined; 'confirm_payment_intent'?: TerminalReaderReaderResourceConfirmPaymentIntentActionModel | undefined; + /** + * Failure code, only set if status is `failed`. + */ 'failure_code': string; + /** + * Detailed failure message, only set if status is `failed`. + */ 'failure_message': string; 'process_payment_intent'?: TerminalReaderReaderResourceProcessPaymentIntentActionModel | undefined; 'process_setup_intent'?: TerminalReaderReaderResourceProcessSetupIntentActionModel | undefined; 'refund_payment'?: TerminalReaderReaderResourceRefundPaymentActionModel | undefined; 'set_reader_display'?: TerminalReaderReaderResourceSetReaderDisplayActionModel | undefined; + /** + * Status of the action performed by the reader. + */ 'status': 'failed' | 'in_progress' | 'succeeded'; + /** + * Type of action performed by the reader. + */ 'type': 'collect_inputs' | 'collect_payment_method' | 'confirm_payment_intent' | 'process_payment_intent' | 'process_setup_intent' | 'refund_payment' | 'set_reader_display'; }; +/** + * A Reader represents a physical device for accepting payment details. + * + * Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader) + */ export type TerminalReaderModel = { + /** + * The most recent action performed by the reader. + */ 'action': TerminalReaderReaderResourceReaderActionModel; + /** + * The current software version of the reader. + */ 'device_sw_version': string; + /** + * Device type of the reader. + */ 'device_type': 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'mobile_phone_reader' | 'simulated_stripe_s700' | 'simulated_wisepos_e' | 'stripe_m2' | 'stripe_s700' | 'verifone_P400'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The local IP address of the reader. + */ 'ip_address': string; + /** + * Custom label given to the reader for easier identification. + */ 'label': string; + /** + * The last time this reader reported to Stripe backend. + */ 'last_seen_at': 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; + /** + * The location identifier of the reader. + */ 'location': string | TerminalLocationModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; + /** + * Serial number of the reader. + */ 'serial_number': string; + /** + * The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + */ 'status': 'offline' | 'online'; }; +/** + * Occurs whenever an action sent to a Terminal reader failed. + */ export type TerminalReaderActionFailedModel = { 'object': TerminalReaderModel; }; +/** + * Occurs whenever an action sent to a Terminal reader was successful. + */ export type TerminalReaderActionSucceededModel = { 'object': TerminalReaderModel; }; +/** + * Occurs whenever an action sent to a Terminal reader is updated. + */ export type TerminalReaderActionUpdatedModel = { 'object': TerminalReaderModel; }; +/** + * Occurs whenever a test clock starts advancing. + */ export type TestHelpersTestClockAdvancingModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock is created. + */ export type TestHelpersTestClockCreatedModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock is deleted. + */ export type TestHelpersTestClockDeletedModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock fails to advance its frozen time. + */ export type TestHelpersTestClockInternalFailureModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock transitions to a ready status. + */ export type TestHelpersTestClockReadyModel = { 'object': TestHelpersTestClockModel; }; +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export type TokenModel = { 'bank_account'?: BankAccountModel | undefined; 'card'?: CardModel | undefined; + /** + * IP address of the client that generates the token. + */ 'client_ip': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'token'; + /** + * Type of the token: `account`, `bank_account`, `card`, or `pii`. + */ 'type': string; + /** + * Determines if you have already used this token (you can only use tokens once). + */ 'used': boolean; }; +/** + * Occurs whenever a top-up is canceled. + */ export type TopupCanceledModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up is created. + */ export type TopupCreatedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up fails. + */ export type TopupFailedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up is reversed. + */ export type TopupReversedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up succeeds. + */ export type TopupSucceededModel = { 'object': TopupModel; }; +/** + * Occurs whenever a transfer is created. + */ export type TransferCreatedModel = { 'object': TransferModel; }; +/** + * Occurs whenever a transfer is reversed, including partial reversals. + */ export type TransferReversedModel = { 'object': TransferModel; }; +/** + * Occurs whenever a transfer's description or metadata is updated. + */ export type TransferUpdatedModel = { 'object': TransferModel; }; export type TreasuryReceivedCreditsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the CreditReversal changed status to `posted` + */ 'posted_at': number; }; +/** + * Change to a FinancialAccount's balance + */ export type TreasuryTransactionsResourceBalanceImpactModel = { + /** + * The change made to funds the user can spend right now. + */ 'cash': number; + /** + * The change made to funds that are not spendable yet, but will become available at a later time. + */ 'inbound_pending': number; + /** + * The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': number; }; export type TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel = { + /** + * Set if there is an Issuing dispute associated with the DebitReversal. + */ 'issuing_dispute': string; }; export type TreasuryReceivedDebitsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the DebitReversal changed status to `completed`. + */ 'completed_at': number; }; +/** + * You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ export type TreasuryDebitReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Other flows linked to a DebitReversal. + */ 'linked_flows': TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'card'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.debit_reversal'; + /** + * The ReceivedDebit being reversed. + */ 'received_debit': string; + /** + * Status of the DebitReversal + */ 'status': 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryReceivedDebitsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryInboundTransfersResourceFailureDetailsModel = { + /** + * Reason for the failure. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'debit_not_authorized' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'insufficient_funds' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; }; export type TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel = { + /** + * If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. + */ 'received_debit': string; }; export type TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel = { + /** + * Timestamp describing when an InboundTransfer changed status to `canceled`. + */ 'canceled_at'?: number | undefined; + /** + * Timestamp describing when an InboundTransfer changed status to `failed`. + */ 'failed_at': number; + /** + * Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ 'succeeded_at': number; }; +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export type TreasuryInboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the InboundTransfer is able to be canceled. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Details about this InboundTransfer's failure. Only set when status is `failed`. + */ 'failure_details': TreasuryInboundTransfersResourceFailureDetailsModel; + /** + * The FinancialAccount that received the funds. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'linked_flows': TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.inbound_transfer'; + /** + * The origin payment method to be debited for an InboundTransfer. + */ 'origin_payment_method': string; + /** + * Details about the PaymentMethod for an InboundTransfer. + */ 'origin_payment_method_details': InboundTransfersModel; + /** + * Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + */ 'returned': boolean; + /** + * Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + */ 'statement_descriptor': string; + /** + * Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + */ 'status': 'canceled' | 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel = { + /** + * IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. + */ 'ip_address': string; + /** + * `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + */ 'present': boolean; }; export type TreasuryOutboundPaymentsResourceReturnedStatusModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundPayment changed status to `canceled`. + */ 'canceled_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `failed`. + */ 'failed_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `posted`. + */ 'posted_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `returned`. + */ 'returned_at': number; }; export type TreasuryOutboundPaymentsResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundPayment for payments sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'chips': string; + /** + * IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'imad': string; + /** + * OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'omad': string; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundPaymentsResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export type TreasuryOutboundPaymentModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + */ 'customer': string; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + */ 'destination_payment_method': string; + /** + * Details about the PaymentMethod for an OutboundPayment. + */ 'destination_payment_method_details': OutboundPaymentsPaymentMethodDetailsModel; + /** + * Details about the end user. + */ 'end_user_details': TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_payment'; + /** + * Details about a returned OutboundPayment. Only set when the status is `returned`. + */ 'returned_details': TreasuryOutboundPaymentsResourceReturnedStatusModel; + /** + * The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + */ 'statement_descriptor': string; + /** + * Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details': TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceReturnedDetailsModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundTransfer changed status to `canceled` + */ 'canceled_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `failed` + */ 'failed_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `posted` + */ 'posted_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `returned` + */ 'returned_at': number; }; export type TreasuryOutboundTransfersResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'chips': string; + /** + * IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'imad': string; + /** + * OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'omad': string; }; export type TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundTransfersResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export type TreasuryOutboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The PaymentMethod used as the payment instrument for an OutboundTransfer. + */ 'destination_payment_method': string; 'destination_payment_method_details': OutboundTransfersPaymentMethodDetailsModel; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_transfer'; + /** + * Details about a returned OutboundTransfer. Only set when the status is `returned`. + */ 'returned_details': TreasuryOutboundTransfersResourceReturnedDetailsModel; + /** + * Information about the OutboundTransfer to be sent to the recipient account. + */ 'statement_descriptor': string; + /** + * Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundTransfersResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details': TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel = { + /** + * Bank name. + */ 'bank_name': string; + /** + * The last four digits of the bank account number. + */ 'last4': string; + /** + * The routing number for the bank account. + */ 'routing_number': string; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel = { + /** + * Set when `type` is `balance`. + */ 'balance'?: 'payments' | undefined; 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: ReceivedPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + */ 'issuing_card'?: string | undefined; + /** + * Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + */ 'type': 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account'; 'us_bank_account'?: TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -10968,71 +27647,209 @@ export type TreasuryReceivedCreditsResourceSourceFlowsDetailsModel = { 'outbound_payment'?: TreasuryOutboundPaymentModel | undefined; 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'payout'?: PayoutModel | undefined; + /** + * The type of the source flow that originated the ReceivedCredit. + */ 'type': 'credit_reversal' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'payout'; }; export type TreasuryReceivedCreditsResourceLinkedFlowsModel = { + /** + * The CreditReversal created as a result of this ReceivedCredit being reversed. + */ 'credit_reversal': string; + /** + * Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization': string; + /** + * Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. + */ 'issuing_transaction': string; + /** + * ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. + */ 'source_flow': string; + /** + * The expandable object of the source flow. + */ 'source_flow_details'?: TreasuryReceivedCreditsResourceSourceFlowsDetailsModel | undefined; + /** + * The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). + */ 'source_flow_type': string; }; export type TreasuryReceivedCreditsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedCredit can be reversed. + */ 'deadline': number; + /** + * Set if a ReceivedCredit cannot be reversed. + */ 'restricted_reason': 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted'; }; +/** + * ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ export type TreasuryReceivedCreditModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + */ 'failure_code': 'account_closed' | 'account_frozen' | 'international_transaction' | 'other'; + /** + * The FinancialAccount that received the funds. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details': TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel; 'linked_flows': TreasuryReceivedCreditsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The rails used to send the funds. + */ 'network': 'ach' | 'card' | 'stripe' | 'us_domestic_wire'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_credit'; + /** + * Details describing when a ReceivedCredit may be reversed. + */ 'reversal_details': TreasuryReceivedCreditsResourceReversalDetailsModel; + /** + * Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryReceivedDebitsResourceLinkedFlowsModel = { + /** + * The DebitReversal created as a result of this ReceivedDebit being reversed. + */ 'debit_reversal': string; + /** + * Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. + */ 'inbound_transfer': string; + /** + * Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization': string; + /** + * Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. + */ 'issuing_transaction': string; + /** + * Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + */ 'payout': string; }; export type TreasuryReceivedDebitsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedDebit can be reversed. + */ 'deadline': number; + /** + * Set if a ReceivedDebit can't be reversed. + */ 'restricted_reason': 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted'; }; +/** + * ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ export type TreasuryReceivedDebitModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + */ 'failure_code': 'account_closed' | 'account_frozen' | 'insufficient_funds' | 'international_transaction' | 'other'; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details'?: TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel | undefined; 'linked_flows': TreasuryReceivedDebitsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The network used for the ReceivedDebit. + */ 'network': 'ach' | 'card' | 'stripe'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_debit'; + /** + * Details describing when a ReceivedDebit might be reversed. + */ 'reversal_details': TreasuryReceivedDebitsResourceReversalDetailsModel; + /** + * Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; @@ -11045,327 +27862,785 @@ export type TreasuryTransactionsResourceFlowDetailsModel = { 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'received_credit'?: TreasuryReceivedCreditModel | undefined; 'received_debit'?: TreasuryReceivedDebitModel | undefined; + /** + * Type of the flow that created the Transaction. Set to the same value as `flow_type`. + */ 'type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; }; +/** + * TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ export type TreasuryTransactionEntryModel = { 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * When the TransactionEntry will impact the FinancialAccount's balance. + */ 'effective_at': number; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * Token of the flow associated with the TransactionEntry. + */ 'flow': string; + /** + * Details of the flow associated with the TransactionEntry. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow associated with the TransactionEntry. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction_entry'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; + /** + * The specific money movement that generated the TransactionEntry. + */ 'type': 'credit_reversal' | 'credit_reversal_posting' | 'debit_reversal' | 'inbound_transfer' | 'inbound_transfer_return' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'other' | 'outbound_payment' | 'outbound_payment_cancellation' | 'outbound_payment_failure' | 'outbound_payment_posting' | 'outbound_payment_return' | 'outbound_transfer' | 'outbound_transfer_cancellation' | 'outbound_transfer_failure' | 'outbound_transfer_posting' | 'outbound_transfer_return' | 'received_credit' | 'received_debit'; }; export type TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel = { + /** + * Timestamp describing when the Transaction changed status to `posted`. + */ 'posted_at': number; + /** + * Timestamp describing when the Transaction changed status to `void`. + */ 'void_at': number; }; +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export type TreasuryTransactionModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ 'entries'?: { + /** + * Details about each object. + */ 'data': TreasuryTransactionEntryModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * ID of the flow that created the Transaction. + */ 'flow': string; + /** + * Details of the flow that created the Transaction. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow that created the Transaction. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction'; + /** + * Status of the Transaction. + */ 'status': 'open' | 'posted' | 'void'; 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel; }; +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export type TreasuryCreditReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'stripe'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.credit_reversal'; + /** + * The ReceivedCredit being reversed. + */ 'received_credit': string; + /** + * Status of the CreditReversal + */ 'status': 'canceled' | 'posted' | 'processing'; 'status_transitions': TreasuryReceivedCreditsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; +/** + * Occurs whenever an CreditReversal is submitted and created. + */ export type TreasuryCreditReversalCreatedModel = { 'object': TreasuryCreditReversalModel; }; +/** + * Occurs whenever an CreditReversal post is posted. + */ export type TreasuryCreditReversalPostedModel = { 'object': TreasuryCreditReversalModel; }; +/** + * Occurs whenever a DebitReversal is completed. + */ export type TreasuryDebitReversalCompletedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Occurs whenever a DebitReversal is created. + */ export type TreasuryDebitReversalCreatedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Occurs whenever an initial credit is granted on a DebitReversal. + */ export type TreasuryDebitReversalInitialCreditGrantedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Balance information for the FinancialAccount + */ export type TreasuryFinancialAccountsResourceBalanceModel = { + /** + * Funds the user can spend right now. + */ 'cash': { [key: string]: number; }; + /** + * Funds not spendable yet, but will become available at a later time. + */ 'inbound_pending': { [key: string]: number; }; + /** + * Funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': { [key: string]: number; }; }; +/** + * Additional details on the FinancialAccount Features information. + */ export type TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel = { + /** + * Represents the reason why the status is `pending` or `restricted`. + */ 'code': 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other'; + /** + * Represents what the user should do, if anything, to activate the Feature. + */ 'resolution': 'contact_stripe' | 'provide_information' | 'remove_restriction'; + /** + * The `platform_restrictions` that are restricting this Feature. + */ 'restriction'?: 'inbound_flows' | 'outbound_flows' | undefined; }; +/** + * Toggle settings for enabling/disabling a feature + */ export type TreasuryFinancialAccountsResourceToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export type TreasuryFinancialAccountsResourceAbaToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Financial Addresses features on a Financial Account + */ export type TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceInboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Outbound Payments features on a Financial Account + */ export type TreasuryFinancialAccountsResourceOutboundPaymentsModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceOutboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export type TreasuryFinancialAccountFeaturesModel = { 'card_issuing'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'deposit_insurance'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'financial_addresses'?: TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel | undefined; 'inbound_transfers'?: TreasuryFinancialAccountsResourceInboundTransfersModel | undefined; 'intra_stripe_flows'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account_features'; 'outbound_payments'?: TreasuryFinancialAccountsResourceOutboundPaymentsModel | undefined; 'outbound_transfers'?: TreasuryFinancialAccountsResourceOutboundTransfersModel | undefined; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type TreasuryFinancialAccountsResourceAbaRecordModel = { + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name': string; + /** + * The account number. + */ 'account_number'?: string | undefined; + /** + * The last four characters of the account number. + */ 'account_number_last4': string; + /** + * Name of the bank. + */ 'bank_name': string; + /** + * Routing number for the account. + */ 'routing_number': string; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceFinancialAddressModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaRecordModel | undefined; + /** + * The list of networks that the address supports + */ 'supported_networks'?: Array<'ach' | 'us_domestic_wire'> | undefined; + /** + * The type of financial address + */ 'type': 'aba'; }; +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export type TreasuryFinancialAccountsResourcePlatformRestrictionsModel = { + /** + * Restricts all inbound money movement. + */ 'inbound_flows': 'restricted' | 'unrestricted'; + /** + * Restricts all outbound money movement. + */ 'outbound_flows': 'restricted' | 'unrestricted'; }; export type TreasuryFinancialAccountsResourceClosedStatusDetailsModel = { + /** + * The array that contains reasons for a FinancialAccount closure. + */ 'reasons': Array<'account_rejected' | 'closed_by_platform' | 'other'>; }; export type TreasuryFinancialAccountsResourceStatusDetailsModel = { + /** + * Details related to the closure of this FinancialAccount + */ 'closed': TreasuryFinancialAccountsResourceClosedStatusDetailsModel; }; +/** + * Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ export type TreasuryFinancialAccountModel = { + /** + * The array of paths to active Features in the Features hash. + */ 'active_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; 'balance': TreasuryFinancialAccountsResourceBalanceModel; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'features'?: TreasuryFinancialAccountFeaturesModel | undefined; + /** + * The set of credentials that resolve to a FinancialAccount. + */ 'financial_addresses': TreasuryFinancialAccountsResourceFinancialAddressModel[]; + /** + * Unique identifier for the object. + */ 'id': string; 'is_default'?: boolean | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The nickname for the FinancialAccount. + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account'; + /** + * The array of paths to pending Features in the Features hash. + */ 'pending_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * The set of functionalities that the platform can restrict on the FinancialAccount. + */ 'platform_restrictions'?: TreasuryFinancialAccountsResourcePlatformRestrictionsModel | undefined; + /** + * The array of paths to restricted Features in the Features hash. + */ 'restricted_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * Status of this FinancialAccount. + */ 'status': 'closed' | 'open'; 'status_details': TreasuryFinancialAccountsResourceStatusDetailsModel; + /** + * The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + */ 'supported_currencies': string[]; }; +/** + * Occurs whenever the status of the FinancialAccount becomes closed. + */ export type TreasuryFinancialAccountClosedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever a new FinancialAccount is created. + */ export type TreasuryFinancialAccountCreatedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever the statuses of any features within an existing FinancialAccount are updated. + */ export type TreasuryFinancialAccountFeaturesStatusUpdatedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever an InboundTransfer is canceled. + */ export type TreasuryInboundTransferCanceledModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer is created. + */ export type TreasuryInboundTransferCreatedModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer has failed. + */ export type TreasuryInboundTransferFailedModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer has succeeded. + */ export type TreasuryInboundTransferSucceededModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an OutboundPayment is canceled. + */ export type TreasuryOutboundPaymentCanceledModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever a new OutboundPayment is successfully created. + */ export type TreasuryOutboundPaymentCreatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever the arrival date on an OutboundPayment updates. + */ export type TreasuryOutboundPaymentExpectedArrivalDateUpdatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment fails. + */ export type TreasuryOutboundPaymentFailedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment posts. + */ export type TreasuryOutboundPaymentPostedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment was returned. + */ export type TreasuryOutboundPaymentReturnedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever tracking_details on an OutboundPayment is updated. + */ export type TreasuryOutboundPaymentTrackingDetailsUpdatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundTransfer is canceled. + */ export type TreasuryOutboundTransferCanceledModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is created. + */ export type TreasuryOutboundTransferCreatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever the arrival date on an OutboundTransfer updates. + */ export type TreasuryOutboundTransferExpectedArrivalDateUpdatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer has failed. + */ export type TreasuryOutboundTransferFailedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is posted. + */ export type TreasuryOutboundTransferPostedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is returned. + */ export type TreasuryOutboundTransferReturnedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever tracking_details on an OutboundTransfer is updated. + */ export type TreasuryOutboundTransferTrackingDetailsUpdatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever a received_credit is created as a result of funds being pushed by another account. + */ export type TreasuryReceivedCreditCreatedModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits. + */ export type TreasuryReceivedCreditFailedModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_credit transitions to succeeded state. Only applicable for check deposits. + */ export type TreasuryReceivedCreditSucceededModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_debit is created as a result of funds being pulled by another account. + */ export type TreasuryReceivedDebitCreatedModel = { 'object': TreasuryReceivedDebitModel; }; +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export type WebhookEndpointModel = { + /** + * The API version events are rendered as for this webhook endpoint. + */ 'api_version': string; + /** + * The ID of the associated Connect application. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An optional description of what the webhook is used for. + */ 'description': string; + /** + * The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + */ 'enabled_events': string[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; + /** + * The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. + */ 'secret'?: string | undefined; + /** + * The status of the webhook. It can be `enabled` or `disabled`. + */ 'status': string; + /** + * The URL of the webhook endpoint. + */ 'url': string; }; @@ -11503,6 +28778,11 @@ export const LegalEntityRepresentativeDeclaration: z.ZodType = z.object({ 'created': z.number().int(), 'expired': z.boolean(), @@ -11515,6 +28795,15 @@ export const FileLink: z.ZodType = z.object({ 'url': z.string() }); +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export const File: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -11596,6 +28885,9 @@ export const CustomerBalanceCustomerBalanceSettings: z.ZodType = z.object({ 'available': z.record(z.string(), z.number().int()), 'customer': z.string(), @@ -11614,6 +28906,13 @@ export const TokenCardNetworks: z.ZodType = z.object({ 'preferred': z.string() }); +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export const Card: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'address_city': z.string(), @@ -11939,6 +29238,18 @@ export const SourceTypeWechat: z.ZodType = z.object({ 'statement_descriptor': z.string().optional() }); +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export const Source: z.ZodType = z.object({ 'ach_credit_transfer': SourceTypeAchCreditTransfer.optional(), 'ach_debit': SourceTypeAchDebit.optional(), @@ -11991,6 +29302,11 @@ export const CouponCurrencyOption: z.ZodType = z.obje 'amount_off': z.number().int() }); +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export const Coupon: z.ZodType = z.object({ 'amount_off': z.number().int(), 'applies_to': CouponAppliesTo.optional(), @@ -12027,6 +29343,13 @@ export const PromotionCodesResourceRestrictions: z.ZodType = z.object({ 'active': z.boolean(), 'code': z.string(), @@ -12048,6 +29371,12 @@ export const DiscountSource: z.ZodType = z.object({ 'type': z.enum(['coupon']) }); +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export const Discount: z.ZodType = z.object({ 'checkout_session': z.string(), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]), @@ -12331,6 +29660,9 @@ export const MandateSingleUse: z.ZodType = z.object({ 'currency': z.string() }); +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export const Mandate: z.ZodType = z.object({ 'customer_acceptance': CustomerAcceptance, 'id': z.string(), @@ -12791,6 +30123,18 @@ export const PaymentFlowsPaymentIntentPresentmentDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_reversed': z.number().int(), @@ -12816,6 +30160,21 @@ export const Transfer: z.ZodType = z.object({ 'transfer_group': z.string() }); +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export const TransferReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -12829,6 +30188,13 @@ export const TransferReversal: z.ZodType = z.object({ 'transfer': z.union([z.string(), z.lazy(() => Transfer)]) }); +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export const Refund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -12866,6 +30232,12 @@ export const CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromP 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export const CustomerCashBalanceTransaction: z.ZodType = z.object({ 'adjusted_for_overdraft': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft).optional(), 'applied_to_payment': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction).optional(), @@ -13010,6 +30382,13 @@ export const DisputePaymentMethodDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)), @@ -13031,6 +30410,13 @@ export const Dispute: z.ZodType = z.object({ 'status': z.enum(['lost', 'needs_response', 'prevented', 'under_review', 'warning_closed', 'warning_needs_response', 'warning_under_review', 'won']) }); +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export const FeeRefund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -13108,6 +30494,11 @@ export const IssuingCardholderAuthorizationControls: z.ZodType = z.object({ 'billing': IssuingCardholderAddress, 'company': z.union([IssuingCardholderCompany]), @@ -13145,6 +30536,9 @@ export const IssuingPhysicalBundleFeatures: z.ZodType = z.object({ 'features': IssuingPhysicalBundleFeatures, 'id': z.string(), @@ -13165,6 +30559,9 @@ export const IssuingPersonalizationDesignRejectionReasons: z.ZodType = z.object({ 'card_logo': z.union([z.string(), z.lazy(() => File)]), 'carrier_text': z.union([IssuingPersonalizationDesignCarrierText]), @@ -13238,6 +30635,9 @@ export const IssuingCardWallets: z.ZodType = z.object({ 'primary_account_identifier': z.string() }); +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export const IssuingCard: z.ZodType = z.object({ 'brand': z.string(), 'cancellation_reason': z.enum(['design_rejected', 'lost', 'stolen']), @@ -13410,6 +30810,9 @@ export const IssuingNetworkTokenNetworkData: z.ZodType = z.object({ 'card': z.union([z.string(), z.lazy(() => IssuingCard)]), 'created': z.number().int(), @@ -13511,6 +30914,11 @@ export const IssuingDisputeTreasury: z.ZodType = z. 'received_debit': z.string() }); +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export const IssuingDispute: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)).optional(), @@ -13618,6 +31026,13 @@ export const IssuingTransactionTreasury: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingTransactionAmountDetails]), @@ -13668,6 +31083,13 @@ export const IssuingAuthorizationVerificationData: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingAuthorizationAmountDetails]), @@ -13721,6 +31143,16 @@ export const PayoutsTraceId: z.ZodType = z.object({ 'value': z.string() }); +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export const Payout: z.ZodType = z.object({ 'amount': z.number().int(), 'application_fee': z.union([z.string(), z.lazy(() => ApplicationFee)]), @@ -13767,6 +31199,13 @@ export const TaxDeductedAtSource: z.ZodType = z.object 'tax_deduction_account_number': z.string() }); +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export const Topup: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -13788,6 +31227,12 @@ export const Topup: z.ZodType = z.object({ export const BalanceTransactionSource: z.ZodType = z.union([z.lazy(() => ApplicationFee), z.lazy(() => Charge), z.lazy(() => ConnectCollectionTransfer), z.lazy(() => CustomerCashBalanceTransaction), z.lazy(() => Dispute), z.lazy(() => FeeRefund), z.lazy(() => IssuingAuthorization), z.lazy(() => IssuingDispute), z.lazy(() => IssuingTransaction), z.lazy(() => Payout), z.lazy(() => Refund), ReserveTransaction, TaxDeductedAtSource, z.lazy(() => Topup), z.lazy(() => Transfer), z.lazy(() => TransferReversal)]); +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export const BalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'available_on': z.number().int(), @@ -14449,6 +31894,9 @@ export const PaymentMethodDetails: z.ZodType = z.obje 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export const RadarRadarOptions: z.ZodType = z.object({ 'session': z.string().optional() }); @@ -14468,6 +31916,12 @@ export const RadarReviewResourceSession: z.ZodType = z.object({ 'billing_zip': z.string(), 'charge': z.union([z.string(), z.lazy(() => Charge)]), @@ -14490,6 +31944,11 @@ export const ChargeTransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export const Charge: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_captured': z.number().int(), @@ -14577,6 +32036,9 @@ export const PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode: z.ZodT 'qr_code': PaymentIntentNextActionCashappQrCode }); +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14587,6 +32049,9 @@ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14596,6 +32061,9 @@ export const FundingInstructionsBankTransferIbanRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14604,6 +32072,9 @@ export const FundingInstructionsBankTransferSortCodeRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14613,6 +32084,9 @@ export const FundingInstructionsBankTransferSpeiRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14623,6 +32097,9 @@ export const FundingInstructionsBankTransferSwiftRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -14635,6 +32112,9 @@ export const FundingInstructionsBankTransferZenginRecord: z.ZodType = z.object({ 'aba': FundingInstructionsBankTransferAbaRecord.optional(), 'iban': FundingInstructionsBankTransferIbanRecord.optional(), @@ -15204,6 +32684,19 @@ export const TransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export const PaymentIntent: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_capturable': z.number().int(), @@ -15363,6 +32856,29 @@ export const SetupIntentPaymentMethodOptions: z.ZodType = z.object({ 'application': z.union([z.string(), Application]), 'attach_to_self': z.boolean().optional(), @@ -15411,6 +32927,12 @@ export const ApiErrors: z.ZodType = z.object({ 'type': z.enum(['api_error', 'card_error', 'idempotency_error', 'invalid_request_error']) }); +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export const SetupAttempt: z.ZodType = z.object({ 'application': z.union([z.string(), Application]), 'attach_to_self': z.boolean().optional(), @@ -15758,6 +33280,13 @@ export const PaymentMethodZip: z.ZodType = z.object({ }); +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export const PaymentMethod: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -15865,6 +33394,9 @@ export const SubscriptionsResourceBillingModeFlexible: z.ZodType = z.object({ 'flexible': z.union([SubscriptionsResourceBillingModeFlexible]), 'type': z.enum(['classic', 'flexible']), @@ -15882,11 +33414,19 @@ export const CancellationDetails: z.ZodType = z.object 'reason': z.enum(['cancellation_requested', 'payment_disputed', 'payment_failed']) }); +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export const TaxRateFlatAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string() }); +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export const TaxRate: z.ZodType = z.object({ 'active': z.boolean(), 'country': z.string(), @@ -15921,6 +33461,12 @@ export const TaxIdVerification: z.ZodType = z.object({ 'verified_name': z.string() }); +/** + * 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 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) + */ export const TaxId: z.ZodType = z.object({ 'country': z.string(), 'created': z.number().int(), @@ -15990,6 +33536,14 @@ export const TransformQuantity: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Price: z.ZodType = z.object({ 'active': z.boolean(), 'billing_scheme': z.enum(['per_unit', 'tiered']), @@ -16025,6 +33579,9 @@ export const PackageDimensions: z.ZodType = z.object({ 'width': z.number() }); +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export const TaxCode: z.ZodType = z.object({ 'description': z.string(), 'id': z.string(), @@ -16032,6 +33589,16 @@ export const TaxCode: z.ZodType = z.object({ 'object': z.enum(['tax_code']) }); +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export const Product: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -16067,6 +33634,16 @@ export const TransformUsage: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Plan: z.ZodType = z.object({ 'active': z.boolean(), 'amount': z.number().int(), @@ -16090,6 +33667,10 @@ export const Plan: z.ZodType = z.object({ 'usage_type': z.enum(['licensed', 'metered']) }); +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ export const SubscriptionItem: z.ZodType = z.object({ 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]), 'created': z.number().int(), @@ -16226,6 +33807,11 @@ export const BillingClocksResourceStatusDetailsStatusDetails: z.ZodType = z.object({ 'created': z.number().int(), 'deletes_after': z.number().int(), @@ -16238,6 +33824,11 @@ export const TestHelpersTestClock: z.ZodType = z.obje 'status_details': BillingClocksResourceStatusDetailsStatusDetails }); +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export const BillingCreditGrant: z.ZodType = z.object({ 'amount': BillingCreditGrantsResourceAmount, 'applicability_config': BillingCreditGrantsResourceApplicabilityConfig, @@ -16268,6 +33859,9 @@ export const BillingCreditGrantsResourceBalanceDebit: z.ZodType = z.object({ 'created': z.number().int(), 'credit': z.union([z.lazy(() => BillingCreditGrantsResourceBalanceCredit)]), @@ -16312,6 +33906,11 @@ export const BillingBillResourceInvoicingTaxesTax: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -16430,11 +34029,17 @@ export const DeletedInvoice: z.ZodType = z.object({ 'object': z.enum(['invoice']) }); +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export const PaymentsPrimitivesPaymentRecordsResourceAmount: z.ZodType = z.object({ 'currency': z.string(), 'value': z.number().int() }); +/** + * Information about the customer for this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType = z.object({ 'customer': z.string(), 'email': z.string(), @@ -16442,6 +34047,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType< 'phone': z.string() }); +/** + * A representation of a physical address. + */ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'city': z.string(), 'country': z.string(), @@ -16451,6 +34059,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'email': z.string(), @@ -16490,6 +34101,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsRes 'type': z.string() }); +/** + * Details of the card used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z.ZodType = z.object({ 'brand': z.enum(['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'link', 'mastercard', 'unionpay', 'unknown', 'visa']), 'capture_before': z.number().int().optional(), @@ -16508,6 +34122,11 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z 'wallet': z.union([PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWallet]) }); +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails: z.ZodType = z.object({ 'display_name': z.string(), 'type': z.string() @@ -16524,6 +34143,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountD 'routing_number': z.string() }); +/** + * Details about the Payment Method used in this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.ZodType = z.object({ 'ach_credit_transfer': PaymentMethodDetailsAchCreditTransfer.optional(), 'ach_debit': PaymentMethodDetailsAchDebit.optional(), @@ -16587,21 +34209,38 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.Zod 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails: z.ZodType = z.object({ 'payment_reference': z.string() }); +/** + * Processor information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetails: z.ZodType = z.object({ 'custom': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails.optional(), 'type': z.enum(['custom']) }); +/** + * The customer's shipping information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceShippingDetails: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'name': z.string(), 'phone': z.string() }); +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export const PaymentRecord: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -16637,6 +34276,16 @@ export const InvoicesPaymentsInvoicePaymentStatusTransitions: z.ZodType = z.object({ 'amount_paid': z.number().int(), 'amount_requested': z.number().int(), @@ -16684,6 +34333,10 @@ export const ShippingRateFixedAmount: z.ZodType = 'currency_options': z.record(z.string(), ShippingRateCurrencyOption).optional() }); +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export const ShippingRate: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -16731,6 +34384,40 @@ export const InvoiceThresholdReason: z.ZodType = z. 'item_reasons': z.array(InvoiceItemThresholdReason) }); +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export const Invoice: z.ZodType = z.object({ 'account_country': z.string(), 'account_name': z.string(), @@ -16821,6 +34508,10 @@ export const Invoice: z.ZodType = z.object({ 'webhooks_delivered_at': z.number().int() }); +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export const SubscriptionsResourcePauseCollection: z.ZodType = z.object({ 'behavior': z.enum(['keep_as_draft', 'mark_uncollectible', 'void']), 'resumes_at': z.number().int() @@ -16859,6 +34550,10 @@ export const SubscriptionPendingInvoiceItemInterval: z.ZodType = z.object({ 'billing_cycle_anchor': z.number().int(), 'expires_at': z.number().int(), @@ -16929,6 +34624,9 @@ export const DeletedPrice: z.ZodType = z.object({ 'object': z.enum(['price']) }); +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export const SubscriptionScheduleAddInvoiceItem: z.ZodType = z.object({ 'discounts': z.array(DiscountsResourceStackableDiscount), 'metadata': z.record(z.string(), z.string()), @@ -16956,6 +34654,9 @@ export const DeletedPlan: z.ZodType = z.object({ 'object': z.enum(['plan']) }); +/** + * A phase item describes the price and quantity of a phase. + */ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]), 'discounts': z.array(DiscountsResourceStackableDiscount), @@ -16966,6 +34667,9 @@ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'add_invoice_items': z.array(SubscriptionScheduleAddInvoiceItem), 'application_fee_percent': z.number(), @@ -16989,6 +34693,11 @@ export const SubscriptionSchedulePhaseConfiguration: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]), 'billing_mode': SubscriptionsResourceBillingMode, @@ -17011,14 +34720,25 @@ export const SubscriptionSchedule: z.ZodType = z.obje 'test_clock': z.union([z.string(), TestHelpersTestClock]) }); +/** + * Defines how a subscription behaves when a free trial ends. + */ export const SubscriptionsTrialsResourceEndBehavior: z.ZodType = z.object({ 'missing_payment_method': z.enum(['cancel', 'create_invoice', 'pause']) }); +/** + * Configures how this subscription behaves during the trial period. + */ export const SubscriptionsTrialsResourceTrialSettings: z.ZodType = z.object({ 'end_behavior': SubscriptionsTrialsResourceEndBehavior }); +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export const Subscription: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]), 'application_fee_percent': z.number(), @@ -17084,6 +34804,10 @@ export const CustomerTax: z.ZodType = z.object({ 'provider': z.enum(['anrok', 'avalara', 'sphere', 'stripe']) }); +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export const Customer: z.ZodType = z.object({ 'address': z.union([Address]).optional(), 'balance': z.number().int().optional(), @@ -17145,6 +34869,15 @@ export const ExternalAccountRequirements: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'account_holder_name': z.string(), @@ -17265,6 +34998,13 @@ export const LegalEntityPersonVerification: z.ZodType = z.object({ 'account': z.string().optional(), 'additional_tos_acceptances': PersonAdditionalTosAcceptances.optional(), @@ -17412,6 +35152,20 @@ export const AccountTosAcceptance: z.ZodType = z.obje 'user_agent': z.string().optional() }); +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export const Account: z.ZodType = z.object({ 'business_profile': z.union([AccountBusinessProfile]).optional(), 'business_type': z.enum(['company', 'government_entity', 'individual', 'non_profit']).optional(), @@ -17443,26 +35197,44 @@ export const Account: z.ZodType = z.object({ 'type': z.enum(['custom', 'express', 'none', 'standard']).optional() }); +/** + * Occurs whenever a user authorizes an application. Sent to the related application only. + */ export const AccountApplicationAuthorized: z.ZodType = z.object({ 'object': Application }); +/** + * Occurs whenever a user deauthorizes an application. Sent to the related application only. + */ export const AccountApplicationDeauthorized: z.ZodType = z.object({ 'object': Application }); +/** + * Occurs whenever an external account is created. + */ export const AccountExternalAccountCreated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an external account is deleted. + */ export const AccountExternalAccountDeleted: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an external account is updated. + */ export const AccountExternalAccountUpdated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an account status or property has changed. + */ export const AccountUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Account) }); @@ -17489,6 +35261,12 @@ export const AccountCapabilityRequirements: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -17642,6 +35420,15 @@ export const ConnectEmbeddedAccountSessionCreateComponents: z.ZodType = z.object({ 'account': z.string(), 'client_secret': z.string(), @@ -17659,14 +35446,23 @@ export const ApplePayDomain: z.ZodType = z.object({ 'object': z.enum(['apple_pay_domain']) }); +/** + * Occurs whenever an application fee is created on a charge. + */ export const ApplicationFeeCreated: z.ZodType = z.object({ 'object': z.lazy(() => ApplicationFee) }); +/** + * Occurs whenever an application fee refund is updated. + */ export const ApplicationFeeRefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => FeeRefund) }); +/** + * Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds). This includes partial refunds. + */ export const ApplicationFeeRefunded: z.ZodType = z.object({ 'object': z.lazy(() => ApplicationFee) }); @@ -17676,6 +35472,17 @@ export const SecretServiceResourceScope: z.ZodType = z.object({ 'created': z.number().int(), 'deleted': z.boolean().optional(), @@ -17722,6 +35529,14 @@ export const BalanceDetailUngated: z.ZodType = z.obje 'pending': z.array(BalanceAmount) }); +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export const Balance: z.ZodType = z.object({ 'available': z.array(BalanceAmount), 'connect_reserved': z.array(BalanceAmount).optional(), @@ -17733,6 +35548,9 @@ export const Balance: z.ZodType = z.object({ 'refund_and_dispute_prefunding': BalanceDetailUngated.optional() }); +/** + * Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. + */ export const BalanceAvailable: z.ZodType = z.object({ 'object': Balance }); @@ -17761,11 +35579,17 @@ export const BalanceSettingsResourcePayments: z.ZodType = z.object({ 'object': z.enum(['balance_settings']), 'payments': BalanceSettingsResourcePayments }); +/** + * Occurs whenever a balance settings status or property has changed. + */ export const BalanceSettingsUpdated: z.ZodType = z.object({ 'object': BalanceSettings }); @@ -17850,6 +35674,11 @@ export const BillingMeterResourceBillingMeterValue: z.ZodType = z.object({ 'created': z.number().int(), 'customer_mapping': BillingMeterResourceCustomerMappingSettings, @@ -17866,6 +35695,9 @@ export const BillingMeter: z.ZodType = z.object({ 'value_settings': BillingMeterResourceBillingMeterValue }); +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'filters': z.array(ThresholdsResourceUsageAlertFilter), 'gte': z.number().int(), @@ -17873,6 +35705,9 @@ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'alert_type': z.enum(['usage_threshold']), 'id': z.string(), @@ -17892,6 +35727,9 @@ export const BillingAlertTriggered_1: z.ZodType = 'value': z.number().int() }); +/** + * Occurs whenever your custom alert threshold is met. + */ export const BillingAlertTriggered: z.ZodType = z.object({ 'object': BillingAlertTriggered_1 }); @@ -17901,6 +35739,9 @@ export const CreditBalance: z.ZodType = z.object({ 'ledger_balance': BillingCreditGrantsResourceAmount }); +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'balances': z.array(CreditBalance), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]), @@ -17908,34 +35749,58 @@ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditBalanceTransaction) }); +/** + * Occurs when a credit grant is created + */ export const BillingCreditGrantCreated: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditGrant) }); +/** + * Occurs when a credit grant is updated + */ export const BillingCreditGrantUpdated: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditGrant) }); +/** + * Occurs when a meter is created + */ export const BillingMeterCreated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is deactivated + */ export const BillingMeterDeactivated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is reactivated + */ export const BillingMeterReactivated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is updated + */ export const BillingMeterUpdated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. + */ export const BillingMeterEvent: z.ZodType = z.object({ 'created': z.number().int(), 'event_name': z.string(), @@ -17950,6 +35815,9 @@ export const BillingMeterResourceBillingMeterEventAdjustmentCancel: z.ZodType = z.object({ 'cancel': z.union([BillingMeterResourceBillingMeterEventAdjustmentCancel]), 'event_name': z.string(), @@ -17959,6 +35827,12 @@ export const BillingMeterEventAdjustment: z.ZodType = z.object({ 'aggregated_value': z.number(), 'end_time': z.number().int(), @@ -18053,6 +35927,9 @@ export const PortalLoginPage: z.ZodType = z.object({ 'url': z.string() }); +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export const BillingPortalConfiguration: z.ZodType = z.object({ 'active': z.boolean(), 'application': z.union([z.string(), Application, DeletedApplication]), @@ -18070,10 +35947,16 @@ export const BillingPortalConfiguration: z.ZodType = z.object({ 'object': BillingPortalConfiguration }); +/** + * Occurs whenever a portal configuration is updated. + */ export const BillingPortalConfigurationUpdated: z.ZodType = z.object({ 'object': BillingPortalConfiguration }); @@ -18135,6 +36018,22 @@ export const PortalFlowsFlow: z.ZodType = z.object({ 'type': z.enum(['payment_method_update', 'subscription_cancel', 'subscription_update', 'subscription_update_confirm']) }); +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export const BillingPortalSession: z.ZodType = z.object({ 'configuration': z.union([z.string(), BillingPortalConfiguration]), 'created': z.number().int(), @@ -18149,10 +36048,18 @@ export const BillingPortalSession: z.ZodType = z.obje 'url': z.string() }); +/** + * Occurs whenever a portal session is created. + */ export const BillingPortalSessionCreated: z.ZodType = z.object({ 'object': BillingPortalSession }); +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export const Capability: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]), 'future_requirements': AccountCapabilityFutureRequirements.optional(), @@ -18164,62 +36071,107 @@ export const Capability: z.ZodType = z.object({ 'status': z.enum(['active', 'inactive', 'pending', 'unrequested']) }); +/** + * Occurs whenever a capability has new requirements or a new status. + */ export const CapabilityUpdated: z.ZodType = z.object({ 'object': Capability }); +/** + * Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance. + */ export const CashBalanceFundsAvailable: z.ZodType = z.object({ 'object': CashBalance }); +/** + * Occurs whenever a previously uncaptured charge is captured. + */ export const ChargeCaptured: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`. + */ export const ChargeDisputeClosed: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs whenever a customer disputes a charge with their bank. + */ export const ChargeDisputeCreated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when funds are reinstated to your account after a dispute is closed. This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments). + */ export const ChargeDisputeFundsReinstated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when funds are removed from your account due to a dispute. + */ export const ChargeDisputeFundsWithdrawn: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when the dispute is updated (usually with evidence). + */ export const ChargeDisputeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs whenever an uncaptured charge expires. + */ export const ChargeExpired: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a failed charge attempt occurs. + */ export const ChargeFailed: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a pending charge is created. + */ export const ChargePending: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead. + */ export const ChargeRefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund. + */ export const ChargeRefunded: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a charge is successful. + */ export const ChargeSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture. + */ export const ChargeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); @@ -18398,6 +36350,9 @@ export const LineItemsDiscountAmount: z.ZodType = 'discount': z.lazy(() => Discount) }); +/** + * A line item. + */ export const Item: z.ZodType = z.object({ 'amount_discount': z.number().int(), 'amount_subtotal': z.number().int(), @@ -18613,6 +36568,13 @@ export const PaymentLinksResourceTransferData: z.ZodType Account)]) }); +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export const PaymentLink: z.ZodType = z.object({ 'active': z.boolean(), 'after_completion': PaymentLinksResourceAfterCompletion, @@ -18993,6 +36955,22 @@ export const CheckoutSessionWalletOptions: z.ZodType = z.object({ 'adaptive_pricing': z.union([PaymentPagesCheckoutSessionAdaptivePricing]), 'after_expiration': z.union([PaymentPagesCheckoutSessionAfterExpiration]), @@ -19066,18 +37044,30 @@ export const CheckoutSession: z.ZodType = z.object({ 'wallet_options': z.union([CheckoutSessionWalletOptions]) }); +/** + * Occurs when a payment intent using a delayed payment method fails. + */ export const CheckoutSessionAsyncPaymentFailed: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a payment intent using a delayed payment method finally succeeds. + */ export const CheckoutSessionAsyncPaymentSucceeded: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a Checkout Session has been successfully completed. + */ export const CheckoutSessionCompleted: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a Checkout Session is expired. + */ export const CheckoutSessionExpired: z.ZodType = z.object({ 'object': CheckoutSession }); @@ -19094,6 +37084,9 @@ export const ClimateRemovalsLocation: z.ZodType = 'region': z.string() }); +/** + * A supplier of carbon removal. + */ export const ClimateSupplier: z.ZodType = z.object({ 'id': z.string(), 'info_url': z.string(), @@ -19104,6 +37097,9 @@ export const ClimateSupplier: z.ZodType = z.object({ 'removal_pathway': z.enum(['biomass_carbon_removal_and_storage', 'direct_air_capture', 'enhanced_weathering']) }); +/** + * The delivery of a specified quantity of carbon for an order. + */ export const ClimateRemovalsOrderDeliveries: z.ZodType = z.object({ 'delivered_at': z.number().int(), 'location': z.union([ClimateRemovalsLocation]), @@ -19118,6 +37114,10 @@ export const ClimateRemovalsProductsPrice: z.ZodType = z.object({ 'created': z.number().int(), 'current_prices_per_metric_ton': z.record(z.string(), ClimateRemovalsProductsPrice), @@ -19130,6 +37130,10 @@ export const ClimateProduct: z.ZodType = z.object({ 'suppliers': z.array(ClimateSupplier) }); +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export const ClimateOrder: z.ZodType = z.object({ 'amount_fees': z.number().int(), 'amount_subtotal': z.number().int(), @@ -19155,61 +37159,103 @@ export const ClimateOrder: z.ZodType = z.object({ 'status': z.enum(['awaiting_funds', 'canceled', 'confirmed', 'delivered', 'open']) }); +/** + * Occurs when a Climate order is canceled. + */ export const ClimateOrderCanceled: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is created. + */ export const ClimateOrderCreated: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is delayed. + */ export const ClimateOrderDelayed: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is delivered. + */ export const ClimateOrderDelivered: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order's product is substituted for another. + */ export const ClimateOrderProductSubstituted: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate product is created. + */ export const ClimateProductCreated: z.ZodType = z.object({ 'object': ClimateProduct }); +/** + * Occurs when a Climate product is updated. + */ export const ClimateProductPricingUpdated: z.ZodType = z.object({ 'object': ClimateProduct }); +/** + * This hash contains details about the online acceptance. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline: z.ZodType = z.object({ 'ip_address': z.string(), 'user_agent': z.string() }); +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptance: z.ZodType = z.object({ 'online': z.union([ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline]), 'type': z.string() }); +/** + * Data used for generating a Mandate. + */ export const ConfirmationTokensResourceMandateData: z.ZodType = z.object({ 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptance }); +/** + * Installment configuration for payments. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment: z.ZodType = z.object({ 'plan': PaymentMethodDetailsCardInstallmentsPlan.optional() }); +/** + * This hash contains the card payment method options. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCard: z.ZodType = z.object({ 'cvc_token': z.string(), 'installments': ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment.optional() }); +/** + * Payment-method-specific configuration + */ export const ConfirmationTokensResourcePaymentMethodOptions: z.ZodType = z.object({ 'card': z.union([ConfirmationTokensResourcePaymentMethodOptionsResourceCard]) }); +/** + * Details of the PaymentMethod collected by Payment Element + */ export const ConfirmationTokensResourcePaymentMethodPreview: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -19274,6 +37320,15 @@ export const ConfirmationTokensResourceShipping: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -19301,6 +37356,14 @@ export const CountrySpecVerificationFields: z.ZodType = z.object({ 'default_currency': z.string(), 'id': z.string(), @@ -19312,18 +37375,35 @@ export const CountrySpec: z.ZodType = z.object({ 'verification_fields': CountrySpecVerificationFields }); +/** + * Occurs whenever a coupon is created. + */ export const CouponCreated: z.ZodType = z.object({ 'object': Coupon }); +/** + * Occurs whenever a coupon is deleted. + */ export const CouponDeleted: z.ZodType = z.object({ 'object': Coupon }); +/** + * Occurs whenever a coupon is updated. + */ export const CouponUpdated: z.ZodType = z.object({ 'object': Coupon }); +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export const CustomerBalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'checkout_session': z.union([z.string(), CheckoutSession]), @@ -19348,6 +37428,9 @@ export const CreditNotesPretaxCreditAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string(), @@ -19378,6 +37461,11 @@ export const CreditNoteRefund: z.ZodType = z.object({ 'type': z.enum(['payment_record_refund', 'refund']) }); +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export const CreditNote: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_shipping': z.number().int(), @@ -19419,120 +37507,207 @@ export const CreditNote: z.ZodType = z.object({ 'voided_at': z.number().int() }); +/** + * Occurs whenever a credit note is created. + */ export const CreditNoteCreated: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a credit note is updated. + */ export const CreditNoteUpdated: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a credit note is voided. + */ export const CreditNoteVoided: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a new customer is created. + */ export const CustomerCreated: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a customer is deleted. + */ export const CustomerDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a coupon is attached to a customer. + */ export const CustomerDiscountCreated: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a coupon is removed from a customer. + */ export const CustomerDiscountDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a customer is switched from one coupon to another. + */ export const CustomerDiscountUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a new source is created for a customer. + */ export const CustomerSourceCreated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a source is removed from a customer. + */ export const CustomerSourceDeleted: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won't occur. + */ export const CustomerSourceExpiring: z.ZodType = z.object({ 'object': z.union([z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a source's details are changed. + */ export const CustomerSourceUpdated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a customer is signed up for a new plan. + */ export const CustomerSubscriptionCreated: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription ends. + */ export const CustomerSubscriptionDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription is paused. Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused. + */ export const CustomerSubscriptionPaused: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated. + */ export const CustomerSubscriptionPendingUpdateApplied: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription's pending update expires before the related invoice is paid. + */ export const CustomerSubscriptionPendingUpdateExpired: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription is no longer paused. Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed. + */ export const CustomerSubscriptionResumed: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`). + */ export const CustomerSubscriptionTrialWillEnd: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). + */ export const CustomerSubscriptionUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a tax ID is created for a customer. + */ export const CustomerTaxIdCreated: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever a tax ID is deleted from a customer. + */ export const CustomerTaxIdDeleted: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever a customer's tax ID is updated. + */ export const CustomerTaxIdUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever any property of a customer changes. + */ export const CustomerUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a new customer cash balance transactions is created. + */ export const CustomerCashBalanceTransactionCreated: z.ZodType = z.object({ 'object': z.lazy(() => CustomerCashBalanceTransaction) }); +/** + * This hash contains whether the buy button is enabled. + */ export const CustomerSessionResourceComponentsResourceBuyButton: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * This hash contains the features the customer sheet supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_remove': z.enum(['disabled', 'enabled']) }); +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheet: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures]) }); +/** + * This hash contains the features the mobile payment element supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_redisplay': z.enum(['disabled', 'enabled']), @@ -19541,11 +37716,17 @@ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResour 'payment_method_save_allow_redisplay_override': z.enum(['always', 'limited', 'unspecified']) }); +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures]) }); +/** + * This hash contains the features the Payment Element supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_redisplay': z.enum(['disabled', 'enabled']), @@ -19555,15 +37736,24 @@ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeat 'payment_method_save_usage': z.enum(['off_session', 'on_session']) }); +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures]) }); +/** + * This hash contains whether the pricing table is enabled. + */ export const CustomerSessionResourceComponentsResourcePricingTable: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * Configuration for the components supported by this Customer Session. + */ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'buy_button': CustomerSessionResourceComponentsResourceBuyButton, 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheet, @@ -19572,6 +37762,14 @@ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'client_secret': z.string(), 'components': CustomerSessionResourceComponents.optional(), @@ -19666,6 +37864,10 @@ export const DeletedWebhookEndpoint: z.ZodType = z. 'object': z.enum(['webhook_endpoint']) }); +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const EntitlementsFeature: z.ZodType = z.object({ 'active': z.boolean(), 'id': z.string(), @@ -19676,6 +37878,9 @@ export const EntitlementsFeature: z.ZodType = z.object 'object': z.enum(['entitlements.feature']) }); +/** + * An active entitlement describes access to a feature for a customer. + */ export const EntitlementsActiveEntitlement: z.ZodType = z.object({ 'feature': z.union([z.string(), EntitlementsFeature]), 'id': z.string(), @@ -19684,6 +37889,9 @@ export const EntitlementsActiveEntitlement: z.ZodType = z.object({ 'customer': z.string(), 'entitlements': z.object({ @@ -19696,6 +37904,9 @@ export const EntitlementsActiveEntitlementSummary: z.ZodType = z.object({ 'object': EntitlementsActiveEntitlementSummary }); @@ -19709,6 +37920,9 @@ export const EphemeralKey: z.ZodType = z.object({ 'secret': z.string().optional() }); +/** + * An error response from the Stripe API + */ export const Error: z.ZodType = z.object({ 'error': z.lazy(() => ApiErrors) }); @@ -19723,6 +37937,26 @@ export const NotificationEventRequest: z.ZodType 'idempotency_key': z.string() }); +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export const Event: z.ZodType = z.object({ 'account': z.string().optional(), 'api_version': z.string(), @@ -19737,16 +37971,52 @@ export const Event: z.ZodType = z.object({ 'type': z.enum(['account.application.authorized', 'account.application.deauthorized', 'account.external_account.created', 'account.external_account.deleted', 'account.external_account.updated', 'account.updated', 'application_fee.created', 'application_fee.refund.updated', 'application_fee.refunded', 'balance.available', 'balance_settings.updated', 'billing.alert.triggered', 'billing_portal.configuration.created', 'billing_portal.configuration.updated', 'billing_portal.session.created', 'capability.updated', 'cash_balance.funds_available', 'charge.captured', 'charge.dispute.closed', 'charge.dispute.created', 'charge.dispute.funds_reinstated', 'charge.dispute.funds_withdrawn', 'charge.dispute.updated', 'charge.expired', 'charge.failed', 'charge.pending', 'charge.refund.updated', 'charge.refunded', 'charge.succeeded', 'charge.updated', 'checkout.session.async_payment_failed', 'checkout.session.async_payment_succeeded', 'checkout.session.completed', 'checkout.session.expired', 'climate.order.canceled', 'climate.order.created', 'climate.order.delayed', 'climate.order.delivered', 'climate.order.product_substituted', 'climate.product.created', 'climate.product.pricing_updated', 'coupon.created', 'coupon.deleted', 'coupon.updated', 'credit_note.created', 'credit_note.updated', 'credit_note.voided', 'customer.created', 'customer.deleted', 'customer.discount.created', 'customer.discount.deleted', 'customer.discount.updated', 'customer.source.created', 'customer.source.deleted', 'customer.source.expiring', 'customer.source.updated', 'customer.subscription.created', 'customer.subscription.deleted', 'customer.subscription.paused', 'customer.subscription.pending_update_applied', 'customer.subscription.pending_update_expired', 'customer.subscription.resumed', 'customer.subscription.trial_will_end', 'customer.subscription.updated', 'customer.tax_id.created', 'customer.tax_id.deleted', 'customer.tax_id.updated', 'customer.updated', 'customer_cash_balance_transaction.created', 'entitlements.active_entitlement_summary.updated', 'file.created', 'financial_connections.account.account_numbers_updated', 'financial_connections.account.created', 'financial_connections.account.deactivated', 'financial_connections.account.disconnected', 'financial_connections.account.reactivated', 'financial_connections.account.refreshed_balance', 'financial_connections.account.refreshed_ownership', 'financial_connections.account.refreshed_transactions', 'financial_connections.account.upcoming_account_number_expiry', 'identity.verification_session.canceled', 'identity.verification_session.created', 'identity.verification_session.processing', 'identity.verification_session.redacted', 'identity.verification_session.requires_input', 'identity.verification_session.verified', 'invoice.created', 'invoice.deleted', 'invoice.finalization_failed', 'invoice.finalized', 'invoice.marked_uncollectible', 'invoice.overdue', 'invoice.overpaid', 'invoice.paid', 'invoice.payment_action_required', 'invoice.payment_attempt_required', 'invoice.payment_failed', 'invoice.payment_succeeded', 'invoice.sent', 'invoice.upcoming', 'invoice.updated', 'invoice.voided', 'invoice.will_be_due', 'invoice_payment.paid', 'invoiceitem.created', 'invoiceitem.deleted', 'issuing_authorization.created', 'issuing_authorization.request', 'issuing_authorization.updated', 'issuing_card.created', 'issuing_card.updated', 'issuing_cardholder.created', 'issuing_cardholder.updated', 'issuing_dispute.closed', 'issuing_dispute.created', 'issuing_dispute.funds_reinstated', 'issuing_dispute.funds_rescinded', 'issuing_dispute.submitted', 'issuing_dispute.updated', 'issuing_personalization_design.activated', 'issuing_personalization_design.deactivated', 'issuing_personalization_design.rejected', 'issuing_personalization_design.updated', 'issuing_token.created', 'issuing_token.updated', 'issuing_transaction.created', 'issuing_transaction.purchase_details_receipt_updated', 'issuing_transaction.updated', 'mandate.updated', 'payment_intent.amount_capturable_updated', 'payment_intent.canceled', 'payment_intent.created', 'payment_intent.partially_funded', 'payment_intent.payment_failed', 'payment_intent.processing', 'payment_intent.requires_action', 'payment_intent.succeeded', 'payment_link.created', 'payment_link.updated', 'payment_method.attached', 'payment_method.automatically_updated', 'payment_method.detached', 'payment_method.updated', 'payout.canceled', 'payout.created', 'payout.failed', 'payout.paid', 'payout.reconciliation_completed', 'payout.updated', 'person.created', 'person.deleted', 'person.updated', 'plan.created', 'plan.deleted', 'plan.updated', 'price.created', 'price.deleted', 'price.updated', 'product.created', 'product.deleted', 'product.updated', 'promotion_code.created', 'promotion_code.updated', 'quote.accepted', 'quote.canceled', 'quote.created', 'quote.finalized', 'radar.early_fraud_warning.created', 'radar.early_fraud_warning.updated', 'refund.created', 'refund.failed', 'refund.updated', 'reporting.report_run.failed', 'reporting.report_run.succeeded', 'reporting.report_type.updated', 'review.closed', 'review.opened', 'setup_intent.canceled', 'setup_intent.created', 'setup_intent.requires_action', 'setup_intent.setup_failed', 'setup_intent.succeeded', 'sigma.scheduled_query_run.created', 'source.canceled', 'source.chargeable', 'source.failed', 'source.mandate_notification', 'source.refund_attributes_required', 'source.transaction.created', 'source.transaction.updated', 'subscription_schedule.aborted', 'subscription_schedule.canceled', 'subscription_schedule.completed', 'subscription_schedule.created', 'subscription_schedule.expiring', 'subscription_schedule.released', 'subscription_schedule.updated', 'tax.settings.updated', 'tax_rate.created', 'tax_rate.updated', 'terminal.reader.action_failed', 'terminal.reader.action_succeeded', 'terminal.reader.action_updated', 'test_helpers.test_clock.advancing', 'test_helpers.test_clock.created', 'test_helpers.test_clock.deleted', 'test_helpers.test_clock.internal_failure', 'test_helpers.test_clock.ready', 'topup.canceled', 'topup.created', 'topup.failed', 'topup.reversed', 'topup.succeeded', 'transfer.created', 'transfer.reversed', 'transfer.updated', 'treasury.credit_reversal.created', 'treasury.credit_reversal.posted', 'treasury.debit_reversal.completed', 'treasury.debit_reversal.created', 'treasury.debit_reversal.initial_credit_granted', 'treasury.financial_account.closed', 'treasury.financial_account.created', 'treasury.financial_account.features_status_updated', 'treasury.inbound_transfer.canceled', 'treasury.inbound_transfer.created', 'treasury.inbound_transfer.failed', 'treasury.inbound_transfer.succeeded', 'treasury.outbound_payment.canceled', 'treasury.outbound_payment.created', 'treasury.outbound_payment.expected_arrival_date_updated', 'treasury.outbound_payment.failed', 'treasury.outbound_payment.posted', 'treasury.outbound_payment.returned', 'treasury.outbound_payment.tracking_details_updated', 'treasury.outbound_transfer.canceled', 'treasury.outbound_transfer.created', 'treasury.outbound_transfer.expected_arrival_date_updated', 'treasury.outbound_transfer.failed', 'treasury.outbound_transfer.posted', 'treasury.outbound_transfer.returned', 'treasury.outbound_transfer.tracking_details_updated', 'treasury.received_credit.created', 'treasury.received_credit.failed', 'treasury.received_credit.succeeded', 'treasury.received_debit.created']) }); +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export const ExchangeRate: z.ZodType = z.object({ 'id': z.string(), 'object': z.enum(['exchange_rate']), 'rates': z.record(z.string(), z.number()) }); +/** + * Occurs whenever a new Stripe-generated file is available for your account. + */ export const FileCreated: z.ZodType = z.object({ 'object': z.lazy(() => File) }); +/** + * Describes an owner of an account. + */ export const FinancialConnectionsAccountOwner: z.ZodType = z.object({ 'email': z.string(), 'id': z.string(), @@ -19758,6 +38028,9 @@ export const FinancialConnectionsAccountOwner: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -19770,6 +38043,9 @@ export const FinancialConnectionsAccountOwnership: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]), 'account_numbers': z.array(BankConnectionsResourceAccountNumberDetails), @@ -19793,42 +38069,72 @@ export const FinancialConnectionsAccount: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a new Financial Connections account is created. + */ export const FinancialConnectionsAccountCreated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account's status is updated from `active` to `inactive`. + */ export const FinancialConnectionsAccountDeactivated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account is disconnected. + */ export const FinancialConnectionsAccountDisconnected: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account's status is updated from `inactive` to `active`. + */ export const FinancialConnectionsAccountReactivated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedBalance: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedOwnership: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedTransactions: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s tokenized account number is about to expire. + */ export const FinancialConnectionsAccountUpcomingAccountNumberExpiry: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ export const FinancialConnectionsSession: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]), 'accounts': z.object({ @@ -19847,6 +38153,9 @@ export const FinancialConnectionsSession: z.ZodType = z.object({ 'account': z.string(), 'amount': z.number().int(), @@ -19873,28 +38182,58 @@ export const FinancialReportingFinanceReportRunRunParameters: z.ZodType = z.object({ 'destination_duration': z.number().int(), 'destination_ip_address': z.string() }); +/** + * Header data. + */ export const ForwardedRequestHeader: z.ZodType = z.object({ 'name': z.string(), 'value': z.string() }); +/** + * Details about the request forwarded to the destination endpoint. + */ export const ForwardedRequestDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'http_method': z.enum(['POST']) }); +/** + * Details about the response from the destination endpoint. + */ export const ForwardedResponseDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'status': z.number().int() }); +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export const ForwardingRequest: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -19915,6 +38254,13 @@ export const FundingInstructionsBankTransfer: z.ZodType = z.object({ 'bank_transfer': FundingInstructionsBankTransfer, 'currency': z.string(), @@ -19923,30 +38269,45 @@ export const FundingInstructions: z.ZodType = z.object 'object': z.enum(['funding_instructions']) }); +/** + * Point in Time + */ export const GelatoDataDocumentReportDateOfBirth: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportExpirationDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportIssuedDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataIdNumberReportDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataVerifiedOutputsDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), @@ -19958,6 +38319,9 @@ export const GelatoDocumentReportError: z.ZodType = z.object({ 'address': z.union([Address]), 'dob': z.union([GelatoDataDocumentReportDateOfBirth]).optional(), @@ -19981,6 +38345,9 @@ export const GelatoEmailReportError: z.ZodType = z. 'reason': z.string() }); +/** + * Result from a email check + */ export const GelatoEmailReport: z.ZodType = z.object({ 'email': z.string(), 'error': z.union([GelatoEmailReportError]), @@ -19992,6 +38359,9 @@ export const GelatoIdNumberReportError: z.ZodType = z.object({ 'dob': z.union([GelatoDataIdNumberReportDate]).optional(), 'error': z.union([GelatoIdNumberReportError]), @@ -20007,6 +38377,9 @@ export const GelatoPhoneReportError: z.ZodType = z. 'reason': z.string() }); +/** + * Result from a phone check + */ export const GelatoPhoneReport: z.ZodType = z.object({ 'error': z.union([GelatoPhoneReportError]), 'phone': z.string(), @@ -20039,6 +38412,9 @@ export const GelatoSelfieReportError: z.ZodType = 'reason': z.string() }); +/** + * Result from a selfie check + */ export const GelatoSelfieReport: z.ZodType = z.object({ 'document': z.string(), 'error': z.union([GelatoSelfieReportError]), @@ -20061,6 +38437,9 @@ export const GelatoSessionIdNumberOptions: z.ZodType = z.object({ 'code': z.enum(['abandoned', 'consent_declined', 'country_not_supported', 'device_not_supported', 'document_expired', 'document_type_not_supported', 'document_unverified_other', 'email_unverified_other', 'email_verification_declined', 'id_number_insufficient_document_data', 'id_number_mismatch', 'id_number_unverified_other', 'phone_unverified_other', 'phone_verification_declined', 'selfie_document_missing_photo', 'selfie_face_mismatch', 'selfie_manipulated', 'selfie_unverified_other', 'under_supported_age']), 'reason': z.string() @@ -20102,6 +38481,19 @@ export const GelatoVerifiedOutputs: z.ZodType = z.ob 'unparsed_sex': z.string().optional() }); +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export const IdentityVerificationReport: z.ZodType = z.object({ 'client_reference_id': z.string(), 'created': z.number().int(), @@ -20123,6 +38515,19 @@ export const VerificationSessionRedaction: z.ZodType = z.object({ 'client_reference_id': z.string(), 'client_secret': z.string(), @@ -20145,26 +38550,44 @@ export const IdentityVerificationSession: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession is created + */ export const IdentityVerificationSessionCreated: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to processing + */ export const IdentityVerificationSessionProcessing: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession is redacted. + */ export const IdentityVerificationSessionRedacted: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to require user input + */ export const IdentityVerificationSessionRequiresInput: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to verified + */ export const IdentityVerificationSessionVerified: z.ZodType = z.object({ 'object': IdentityVerificationSession }); @@ -20192,78 +38615,136 @@ export const InboundTransfers: z.ZodType = z.object({ 'us_bank_account': InboundTransfersPaymentMethodDetailsUsBankAccount.optional() }); +/** + * Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks). + */ export const InvoiceCreated: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice is deleted. Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview). + */ export const InvoiceDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice cannot be finalized. See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details. + */ export const InvoiceFinalizationFailed: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice is finalized and updated to be an open invoice. + */ export const InvoiceFinalized: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice is marked uncollectible. + */ export const InvoiceMarkedUncollectible: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days after an invoice becomes due—where X is determined by Automations + */ export const InvoiceOverdue: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + */ export const InvoiceOverpaid: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. + */ export const InvoicePaid: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt requires further user action to complete. + */ export const InvoicePaymentActionRequired: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe. + */ export const InvoicePaymentAttemptRequired: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method. + */ export const InvoicePaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt succeeds. + */ export const InvoicePaymentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice email is sent out. + */ export const InvoiceSent: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). Note: The received `Invoice` object will not have an invoice ID. + */ export const InvoiceUpcoming: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice changes (e.g., the invoice amount). + */ export const InvoiceUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice is voided. + */ export const InvoiceVoided: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days before an invoice becomes due—where X is determined by Automations + */ export const InvoiceWillBeDue: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an InvoicePayment is successfully paid. + */ export const InvoicePaymentPaid: z.ZodType = z.object({ 'object': z.lazy(() => InvoicePayment) }); +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export const InvoiceRenderingTemplate: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -20284,6 +38765,16 @@ export const ProrationDetails: z.ZodType = z.object({ 'discount_amounts': z.array(DiscountsResourceDiscountAmount) }); +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export const Invoiceitem: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -20308,108 +38799,187 @@ export const Invoiceitem: z.ZodType = z.object({ 'test_clock': z.union([z.string(), TestHelpersTestClock]) }); +/** + * Occurs whenever an invoice item is created. + */ export const InvoiceitemCreated: z.ZodType = z.object({ 'object': Invoiceitem }); +/** + * Occurs whenever an invoice item is deleted. + */ export const InvoiceitemDeleted: z.ZodType = z.object({ 'object': Invoiceitem }); +/** + * Occurs whenever an authorization is created. + */ export const IssuingAuthorizationCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling). + */ export const IssuingAuthorizationRequest: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Occurs whenever an authorization is updated. + */ export const IssuingAuthorizationUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Occurs whenever a card is created. + */ export const IssuingCardCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingCard) }); +/** + * Occurs whenever a card is updated. + */ export const IssuingCardUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingCard) }); +/** + * Occurs whenever a cardholder is created. + */ export const IssuingCardholderCreated: z.ZodType = z.object({ 'object': IssuingCardholder }); +/** + * Occurs whenever a cardholder is updated. + */ export const IssuingCardholderUpdated: z.ZodType = z.object({ 'object': IssuingCardholder }); +/** + * Occurs whenever a dispute is won, lost or expired. + */ export const IssuingDisputeClosed: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is created. + */ export const IssuingDisputeCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever funds are reinstated to your account for an Issuing dispute. + */ export const IssuingDisputeFundsReinstated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever funds are deducted from your account for an Issuing dispute. + */ export const IssuingDisputeFundsRescinded: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is submitted. + */ export const IssuingDisputeSubmitted: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is updated. + */ export const IssuingDisputeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it. + */ export const IssuingPersonalizationDesignActivated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it. + */ export const IssuingPersonalizationDesignDeactivated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is rejected by design review. + */ export const IssuingPersonalizationDesignRejected: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is updated. + */ export const IssuingPersonalizationDesignUpdated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever an issuing digital wallet token is created. + */ export const IssuingTokenCreated: z.ZodType = z.object({ 'object': IssuingToken }); +/** + * Occurs whenever an issuing digital wallet token is updated. + */ export const IssuingTokenUpdated: z.ZodType = z.object({ 'object': IssuingToken }); +/** + * Occurs whenever an issuing transaction is created. + */ export const IssuingTransactionCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Occurs whenever an issuing transaction is updated with receipt data. + */ export const IssuingTransactionPurchaseDetailsReceiptUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Occurs whenever an issuing transaction is updated. + */ export const IssuingTransactionUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export const LoginLink: z.ZodType = z.object({ 'created': z.number().int(), 'object': z.enum(['login_link']), 'url': z.string() }); +/** + * Occurs whenever a Mandate is updated. + */ export const MandateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Mandate) }); @@ -20460,6 +39030,12 @@ export const OutboundTransfersPaymentMethodDetails: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -20493,34 +39069,58 @@ export const PaymentFlowsInstallmentOptions: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent is canceled. + */ export const PaymentIntentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a new PaymentIntent is created. + */ export const PaymentIntentCreated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes. + */ export const PaymentIntentPartiallyFunded: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. + */ export const PaymentIntentPaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has started processing. + */ export const PaymentIntentProcessing: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent transitions to requires_action state + */ export const PaymentIntentRequiresAction: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has successfully completed payment. + */ export const PaymentIntentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); @@ -20535,26 +39135,44 @@ export const PaymentIntentTypeSpecificPaymentMethodOptionsClient: z.ZodType = z.object({ 'object': PaymentLink }); +/** + * Occurs when a payment link is updated. + */ export const PaymentLinkUpdated: z.ZodType = z.object({ 'object': PaymentLink }); +/** + * Occurs whenever a new payment method is attached to a customer. + */ export const PaymentMethodAttached: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method's details are automatically updated by the network. + */ export const PaymentMethodAutomaticallyUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method is detached from a customer. + */ export const PaymentMethodDetached: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update). + */ export const PaymentMethodUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); @@ -20570,6 +39188,22 @@ export const PaymentMethodConfigResourcePaymentMethodProperties: z.ZodType = z.object({ 'acss_debit': PaymentMethodConfigResourcePaymentMethodProperties.optional(), 'active': z.boolean(), @@ -20634,15 +39268,27 @@ export const PaymentMethodConfiguration: z.ZodType = z.object({ 'error_message': z.string() }); +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export const PaymentMethodDomainResourcePaymentMethodStatus: z.ZodType = z.object({ 'status': z.enum(['active', 'inactive']), 'status_details': PaymentMethodDomainResourcePaymentMethodStatusDetails.optional() }); +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export const PaymentMethodDomain: z.ZodType = z.object({ 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatus, 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatus, @@ -20658,78 +39304,136 @@ export const PaymentMethodDomain: z.ZodType = z.object 'paypal': PaymentMethodDomainResourcePaymentMethodStatus }); +/** + * Occurs whenever a payout is canceled. + */ export const PayoutCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is created. + */ export const PayoutCreated: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout attempt fails. + */ export const PayoutFailed: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is *expected* to be available in the destination account. If the payout fails, a `payout.failed` notification is also sent, at a later time. + */ export const PayoutPaid: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever balance transactions paid out in an automatic payout can be queried. + */ export const PayoutReconciliationCompleted: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is updated. + */ export const PayoutUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a person associated with an account is created. + */ export const PersonCreated: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a person associated with an account is deleted. + */ export const PersonDeleted: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a person associated with an account is updated. + */ export const PersonUpdated: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a plan is created. + */ export const PlanCreated: z.ZodType = z.object({ 'object': z.lazy(() => Plan) }); +/** + * Occurs whenever a plan is deleted. + */ export const PlanDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Plan) }); +/** + * Occurs whenever a plan is updated. + */ export const PlanUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Plan) }); +/** + * Occurs whenever a price is created. + */ export const PriceCreated: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * Occurs whenever a price is deleted. + */ export const PriceDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * Occurs whenever a price is updated. + */ export const PriceUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * Occurs whenever a product is created. + */ export const ProductCreated: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * Occurs whenever a product is deleted. + */ export const ProductDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * Occurs whenever a product is updated. + */ export const ProductUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const ProductFeature: z.ZodType = z.object({ 'entitlement_feature': EntitlementsFeature, 'id': z.string(), @@ -20737,10 +39441,16 @@ export const ProductFeature: z.ZodType = z.object({ 'object': z.enum(['product_feature']) }); +/** + * Occurs whenever a promotion code is created. + */ export const PromotionCodeCreated: z.ZodType = z.object({ 'object': z.lazy(() => PromotionCode) }); +/** + * Occurs whenever a promotion code is updated. + */ export const PromotionCodeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PromotionCode) }); @@ -20800,6 +39510,9 @@ export const QuotesResourceStatusTransitions: z.ZodType = z.object({ 'flexible': SubscriptionsResourceBillingModeFlexible.optional(), 'type': z.enum(['classic', 'flexible']) @@ -20819,6 +39532,10 @@ export const QuotesResourceTransferData: z.ZodType Account)]) }); +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export const Quote: z.ZodType = z.object({ 'amount_subtotal': z.number().int(), 'amount_total': z.number().int(), @@ -20862,22 +39579,40 @@ export const Quote: z.ZodType = z.object({ 'transfer_data': z.union([QuotesResourceTransferData]) }); +/** + * Occurs whenever a quote is accepted. + */ export const QuoteAccepted: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is canceled. + */ export const QuoteCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is created. + */ export const QuoteCreated: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is finalized. + */ export const QuoteFinalized: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + */ export const RadarEarlyFraudWarning: z.ZodType = z.object({ 'actionable': z.boolean(), 'charge': z.union([z.string(), z.lazy(() => Charge)]), @@ -20889,14 +39624,25 @@ export const RadarEarlyFraudWarning: z.ZodType = z. 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]).optional() }); +/** + * Occurs whenever an early fraud warning is created. + */ export const RadarEarlyFraudWarningCreated: z.ZodType = z.object({ 'object': RadarEarlyFraudWarning }); +/** + * Occurs whenever an early fraud warning is updated. + */ export const RadarEarlyFraudWarningUpdated: z.ZodType = z.object({ 'object': RadarEarlyFraudWarning }); +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueListItem: z.ZodType = z.object({ 'created': z.number().int(), 'created_by': z.string(), @@ -20907,6 +39653,11 @@ export const RadarValueListItem: z.ZodType = z.object({ 'value_list': z.string() }); +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueList: z.ZodType = z.object({ 'alias': z.string(), 'created': z.number().int(), @@ -20930,18 +39681,37 @@ export const ReceivedPaymentMethodDetailsFinancialAccount: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a refund has failed. + */ export const RefundFailed: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a refund is updated. + */ export const RefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export const ReportingReportRun: z.ZodType = z.object({ 'created': z.number().int(), 'error': z.string(), @@ -20955,14 +39725,30 @@ export const ReportingReportRun: z.ZodType = z.object({ 'succeeded_at': z.number().int() }); +/** + * Occurs whenever a requested `ReportRun` failed to complete. + */ export const ReportingReportRunFailed: z.ZodType = z.object({ 'object': ReportingReportRun }); +/** + * Occurs whenever a requested `ReportRun` completed successfully. + */ export const ReportingReportRunSucceeded: z.ZodType = z.object({ 'object': ReportingReportRun }); +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export const ReportingReportType: z.ZodType = z.object({ 'data_available_end': z.number().int(), 'data_available_start': z.number().int(), @@ -20975,14 +39761,23 @@ export const ReportingReportType: z.ZodType = z.object 'version': z.number().int() }); +/** + * Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available). + */ export const ReportingReportTypeUpdated: z.ZodType = z.object({ 'object': ReportingReportType }); +/** + * Occurs whenever a review is closed. The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`. + */ export const ReviewClosed: z.ZodType = z.object({ 'object': z.lazy(() => Review) }); +/** + * Occurs whenever a review is opened. + */ export const ReviewOpened: z.ZodType = z.object({ 'object': z.lazy(() => Review) }); @@ -20991,6 +39786,12 @@ export const SigmaScheduledQueryRunError: z.ZodType = z.object({ 'created': z.number().int(), 'data_load_time': z.number().int(), @@ -21005,22 +39806,37 @@ export const ScheduledQueryRun: z.ZodType = z.object({ 'title': z.string() }); +/** + * Occurs when a SetupIntent is canceled. + */ export const SetupIntentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a new SetupIntent is created. + */ export const SetupIntentCreated: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a SetupIntent is in requires_action state. + */ export const SetupIntentRequiresAction: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a SetupIntent has failed the attempt to setup a payment method. + */ export const SetupIntentSetupFailed: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when an SetupIntent has successfully setup a payment method. + */ export const SetupIntentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); @@ -21029,18 +39845,30 @@ export const SetupIntentTypeSpecificPaymentMethodOptionsClient: z.ZodType = z.object({ 'object': ScheduledQueryRun }); +/** + * Occurs whenever a source is canceled. + */ export const SourceCanceled: z.ZodType = z.object({ 'object': Source }); +/** + * Occurs whenever a source transitions to chargeable. + */ export const SourceChargeable: z.ZodType = z.object({ 'object': Source }); +/** + * Occurs whenever a source fails. + */ export const SourceFailed: z.ZodType = z.object({ 'object': Source }); @@ -21059,6 +39887,11 @@ export const SourceMandateNotificationSepaDebitData: z.ZodType = z.object({ 'acss_debit': SourceMandateNotificationAcssDebitData.optional(), 'amount': z.number().int(), @@ -21074,10 +39907,16 @@ export const SourceMandateNotification_1: z.ZodType = z.object({ 'object': SourceMandateNotification_1 }); +/** + * Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment. + */ export const SourceRefundAttributesRequired: z.ZodType = z.object({ 'object': Source }); @@ -21118,6 +39957,12 @@ export const SourceTransactionSepaCreditTransferData: z.ZodType = z.object({ 'ach_credit_transfer': SourceTransactionAchCreditTransferData.optional(), 'amount': z.number().int(), @@ -21135,38 +39980,65 @@ export const SourceTransaction: z.ZodType = z.object({ 'type': z.enum(['ach_credit_transfer', 'ach_debit', 'alipay', 'bancontact', 'card', 'card_present', 'eps', 'giropay', 'ideal', 'klarna', 'multibanco', 'p24', 'sepa_debit', 'sofort', 'three_d_secure', 'wechat']) }); +/** + * Occurs whenever a source transaction is created. + */ export const SourceTransactionCreated: z.ZodType = z.object({ 'object': SourceTransaction }); +/** + * Occurs whenever a source transaction is updated. + */ export const SourceTransactionUpdated: z.ZodType = z.object({ 'object': SourceTransaction }); +/** + * Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency. + */ export const SubscriptionScheduleAborted: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a subscription schedule is canceled. + */ export const SubscriptionScheduleCanceled: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is completed. + */ export const SubscriptionScheduleCompleted: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is created. + */ export const SubscriptionScheduleCreated: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs 7 days before a subscription schedule will expire. + */ export const SubscriptionScheduleExpiring: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is released. + */ export const SubscriptionScheduleReleased: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a subscription schedule is updated. + */ export const SubscriptionScheduleUpdated: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); @@ -21186,6 +40058,9 @@ export const TaxProductResourceTaxAssociationTransactionAttempts: z.ZodType = z.object({ 'calculation': z.string(), 'id': z.string(), @@ -21283,6 +40158,11 @@ export const TaxProductResourceTaxBreakdown: z.ZodType = z.object({ 'amount_total': z.number().int(), 'currency': z.string(), @@ -21473,6 +40353,13 @@ export const TaxProductRegistrationsResourceCountryOptions: z.ZodType = z.object({ 'active_from': z.number().int(), 'country': z.string(), @@ -21508,6 +40395,11 @@ export const TaxProductResourceTaxSettingsStatusDetails: z.ZodType = z.object({ 'defaults': TaxProductResourceTaxSettingsDefaults, 'head_office': z.union([TaxProductResourceTaxSettingsHeadOffice]), @@ -21517,6 +40409,9 @@ export const TaxSettings: z.ZodType = z.object({ 'status_details': TaxProductResourceTaxSettingsStatusDetails }); +/** + * Occurs whenever tax settings is updated. + */ export const TaxSettingsUpdated: z.ZodType = z.object({ 'object': TaxSettings }); @@ -21554,6 +40449,11 @@ export const TaxProductResourceTaxTransactionShippingCost: z.ZodType = z.object({ 'created': z.number().int(), 'currency': z.string(), @@ -21578,10 +40478,16 @@ export const TaxTransaction: z.ZodType = z.object({ 'type': z.enum(['reversal', 'transaction']) }); +/** + * Occurs whenever a new tax rate is created. + */ export const TaxRateCreated: z.ZodType = z.object({ 'object': TaxRate }); +/** + * Occurs whenever a tax rate is updated. + */ export const TaxRateUpdated: z.ZodType = z.object({ 'object': TaxRate }); @@ -21657,6 +40563,10 @@ export const TerminalConfigurationConfigurationResourceWifiConfig: z.ZodType = z.object({ 'bbpos_wisepad3': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), 'bbpos_wisepos_e': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), @@ -21673,12 +40583,22 @@ export const TerminalConfiguration: z.ZodType = z.ob 'wifi': TerminalConfigurationConfigurationResourceWifiConfig.optional() }); +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalConnectionToken: z.ZodType = z.object({ 'location': z.string().optional(), 'object': z.enum(['terminal.connection_token']), 'secret': z.string() }); +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalLocation: z.ZodType = z.object({ 'address': Address, 'address_kana': LegalEntityJapanAddress.optional(), @@ -21694,15 +40614,24 @@ export const TerminalLocation: z.ZodType = z.object({ 'phone': z.string().optional() }); +/** + * Options associated with the Apple Terms and Conditions link type. + */ export const TerminalOnboardingLinkAppleTermsAndConditions: z.ZodType = z.object({ 'allow_relinking': z.boolean(), 'merchant_display_name': z.string() }); +/** + * Link type options associated with the current onboarding link object. + */ export const TerminalOnboardingLinkLinkOptions: z.ZodType = z.object({ 'apple_terms_and_conditions': z.union([TerminalOnboardingLinkAppleTermsAndConditions]) }); +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export const TerminalOnboardingLink: z.ZodType = z.object({ 'link_options': TerminalOnboardingLinkLinkOptions, 'link_type': z.enum(['apple_terms_and_conditions']), @@ -21711,6 +40640,9 @@ export const TerminalOnboardingLink: z.ZodType = z. 'redirect_url': z.string() }); +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'description': z.string(), 'skip_button': z.string(), @@ -21718,38 +40650,62 @@ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about a number being collected using a reader + */ export const TerminalReaderReaderResourceNumeric: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about a phone number being collected using a reader + */ export const TerminalReaderReaderResourcePhone: z.ZodType = z.object({ 'value': z.string() }); +/** + * Choice to be selected on a Reader + */ export const TerminalReaderReaderResourceChoice: z.ZodType = z.object({ 'id': z.string(), 'style': z.enum(['primary', 'secondary']), 'text': z.string() }); +/** + * Information about a selection being collected using a reader + */ export const TerminalReaderReaderResourceSelection: z.ZodType = z.object({ 'choices': z.array(TerminalReaderReaderResourceChoice), 'id': z.string(), 'text': z.string() }); +/** + * Information about a signature being collected using a reader + */ export const TerminalReaderReaderResourceSignature: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about text being collected using a reader + */ export const TerminalReaderReaderResourceText: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about an input's toggle + */ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'default_value': z.enum(['disabled', 'enabled']), 'description': z.string(), @@ -21757,6 +40713,9 @@ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'custom_text': z.union([TerminalReaderReaderResourceCustomText]), 'email': TerminalReaderReaderResourceEmail.optional(), @@ -21771,36 +40730,57 @@ export const TerminalReaderReaderResourceInput: z.ZodType = z.object({ 'inputs': z.array(TerminalReaderReaderResourceInput), 'metadata': z.record(z.string(), z.string()) }); +/** + * Represents a per-transaction tipping configuration + */ export const TerminalReaderReaderResourceTippingConfig: z.ZodType = z.object({ 'amount_eligible': z.number().int().optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceCollectConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'skip_tipping': z.boolean().optional(), 'tipping': TerminalReaderReaderResourceTippingConfig.optional() }); +/** + * Represents a reader action to collect a payment method + */ export const TerminalReaderReaderResourceCollectPaymentMethodAction: z.ZodType = z.object({ 'collect_config': TerminalReaderReaderResourceCollectConfig.optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]), 'payment_method': z.lazy(() => PaymentMethod).optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceConfirmConfig: z.ZodType = z.object({ 'return_url': z.string().optional() }); +/** + * Represents a reader action to confirm a payment + */ export const TerminalReaderReaderResourceConfirmPaymentIntentAction: z.ZodType = z.object({ 'confirm_config': TerminalReaderReaderResourceConfirmConfig.optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'return_url': z.string().optional(), @@ -21808,25 +40788,40 @@ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]), 'process_config': TerminalReaderReaderResourceProcessConfig.optional() }); +/** + * Represents a per-setup override of a reader configuration + */ export const TerminalReaderReaderResourceProcessSetupConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to process a setup intent + */ export const TerminalReaderReaderResourceProcessSetupIntentAction: z.ZodType = z.object({ 'generated_card': z.string().optional(), 'process_config': TerminalReaderReaderResourceProcessSetupConfig.optional(), 'setup_intent': z.union([z.string(), z.lazy(() => SetupIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceRefundPaymentConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to refund a payment + */ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'amount': z.number().int().optional(), 'charge': z.union([z.string(), z.lazy(() => Charge)]).optional(), @@ -21839,12 +40834,18 @@ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string(), 'quantity': z.number().int() }); +/** + * Represents a cart to be displayed on the reader + */ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'currency': z.string(), 'line_items': z.array(TerminalReaderReaderResourceLineItem), @@ -21852,11 +40853,17 @@ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'cart': z.union([TerminalReaderReaderResourceCart]), 'type': z.enum(['cart']) }); +/** + * Represents an action performed by the reader + */ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'collect_inputs': TerminalReaderReaderResourceCollectInputsAction.optional(), 'collect_payment_method': TerminalReaderReaderResourceCollectPaymentMethodAction.optional(), @@ -21871,6 +40878,11 @@ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'action': z.union([TerminalReaderReaderResourceReaderAction]), 'device_sw_version': z.string(), @@ -21887,38 +40899,84 @@ export const TerminalReader: z.ZodType = z.object({ 'status': z.enum(['offline', 'online']) }); +/** + * Occurs whenever an action sent to a Terminal reader failed. + */ export const TerminalReaderActionFailed: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Occurs whenever an action sent to a Terminal reader was successful. + */ export const TerminalReaderActionSucceeded: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Occurs whenever an action sent to a Terminal reader is updated. + */ export const TerminalReaderActionUpdated: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Occurs whenever a test clock starts advancing. + */ export const TestHelpersTestClockAdvancing: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock is created. + */ export const TestHelpersTestClockCreated: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock is deleted. + */ export const TestHelpersTestClockDeleted: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock fails to advance its frozen time. + */ export const TestHelpersTestClockInternalFailure: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock transitions to a ready status. + */ export const TestHelpersTestClockReady: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export const Token: z.ZodType = z.object({ 'bank_account': z.lazy(() => BankAccount).optional(), 'card': z.lazy(() => Card).optional(), @@ -21931,34 +40989,58 @@ export const Token: z.ZodType = z.object({ 'used': z.boolean() }); +/** + * Occurs whenever a top-up is canceled. + */ export const TopupCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up is created. + */ export const TopupCreated: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up fails. + */ export const TopupFailed: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up is reversed. + */ export const TopupReversed: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up succeeds. + */ export const TopupSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a transfer is created. + */ export const TransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); +/** + * Occurs whenever a transfer is reversed, including partial reversals. + */ export const TransferReversed: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); +/** + * Occurs whenever a transfer's description or metadata is updated. + */ export const TransferUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); @@ -21967,6 +41049,9 @@ export const TreasuryReceivedCreditsResourceStatusTransitions: z.ZodType = z.object({ 'cash': z.number().int(), 'inbound_pending': z.number().int(), @@ -21981,6 +41066,9 @@ export const TreasuryReceivedDebitsResourceStatusTransitions: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -22013,6 +41101,11 @@ export const TreasuryInboundTransfersResourceInboundTransferResourceStatusTransi 'succeeded_at': z.number().int() }); +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export const TreasuryInboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -22069,6 +41162,13 @@ export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDeta 'us_domestic_wire': TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export const TreasuryOutboundPayment: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -22122,6 +41222,13 @@ export const TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDe 'us_domestic_wire': TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export const TreasuryOutboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -22182,6 +41289,9 @@ export const TreasuryReceivedCreditsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -22214,6 +41324,9 @@ export const TreasuryReceivedDebitsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -22245,6 +41358,9 @@ export const TreasuryTransactionsResourceFlowDetails: z.ZodType = z.object({ 'balance_impact': TreasuryTransactionsResourceBalanceImpact, 'created': z.number().int(), @@ -22266,6 +41382,9 @@ export const TreasuryTransactionsResourceAbstractTransactionResourceStatusTransi 'void_at': z.number().int() }); +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export const TreasuryTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_impact': TreasuryTransactionsResourceBalanceImpact, @@ -22289,6 +41408,9 @@ export const TreasuryTransaction: z.ZodType = z.object 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions }); +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export const TreasuryCreditReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -22306,80 +41428,129 @@ export const TreasuryCreditReversal: z.ZodType = z. 'transaction': z.union([z.string(), z.lazy(() => TreasuryTransaction)]) }); +/** + * Occurs whenever an CreditReversal is submitted and created. + */ export const TreasuryCreditReversalCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryCreditReversal) }); +/** + * Occurs whenever an CreditReversal post is posted. + */ export const TreasuryCreditReversalPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryCreditReversal) }); +/** + * Occurs whenever a DebitReversal is completed. + */ export const TreasuryDebitReversalCompleted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Occurs whenever a DebitReversal is created. + */ export const TreasuryDebitReversalCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Occurs whenever an initial credit is granted on a DebitReversal. + */ export const TreasuryDebitReversalInitialCreditGranted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Balance information for the FinancialAccount + */ export const TreasuryFinancialAccountsResourceBalance: z.ZodType = z.object({ 'cash': z.record(z.string(), z.number().int()), 'inbound_pending': z.record(z.string(), z.number().int()), 'outbound_pending': z.record(z.string(), z.number().int()) }); +/** + * Additional details on the FinancialAccount Features information. + */ export const TreasuryFinancialAccountsResourceTogglesSettingStatusDetails: z.ZodType = z.object({ 'code': z.enum(['activating', 'capability_not_requested', 'financial_account_closed', 'rejected_other', 'rejected_unsupported_business', 'requirements_past_due', 'requirements_pending_verification', 'restricted_by_platform', 'restricted_other']), 'resolution': z.enum(['contact_stripe', 'provide_information', 'remove_restriction']), 'restriction': z.enum(['inbound_flows', 'outbound_flows']).optional() }); +/** + * Toggle settings for enabling/disabling a feature + */ export const TreasuryFinancialAccountsResourceToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export const TreasuryFinancialAccountsResourceAbaToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Settings related to Financial Addresses features on a Financial Account + */ export const TreasuryFinancialAccountsResourceFinancialAddressesFeatures: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceInboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceInboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceInboundAchToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceOutboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Settings related to Outbound Payments features on a Financial Account + */ export const TreasuryFinancialAccountsResourceOutboundPayments: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceOutboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'card_issuing': TreasuryFinancialAccountsResourceToggleSettings.optional(), 'deposit_insurance': TreasuryFinancialAccountsResourceToggleSettings.optional(), @@ -22391,6 +41562,9 @@ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'account_holder_name': z.string(), 'account_number': z.string().optional(), @@ -22399,12 +41573,18 @@ export const TreasuryFinancialAccountsResourceAbaRecord: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaRecord.optional(), 'supported_networks': z.array(z.enum(['ach', 'us_domestic_wire'])).optional(), 'type': z.enum(['aba']) }); +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export const TreasuryFinancialAccountsResourcePlatformRestrictions: z.ZodType = z.object({ 'inbound_flows': z.enum(['restricted', 'unrestricted']), 'outbound_flows': z.enum(['restricted', 'unrestricted']) @@ -22418,6 +41598,10 @@ export const TreasuryFinancialAccountsResourceStatusDetails: z.ZodType = z.object({ 'active_features': z.array(z.enum(['card_issuing', 'deposit_insurance', 'financial_addresses.aba', 'financial_addresses.aba.forwarding', 'inbound_transfers.ach', 'intra_stripe_flows', 'outbound_payments.ach', 'outbound_payments.us_domestic_wire', 'outbound_transfers.ach', 'outbound_transfers.us_domestic_wire', 'remote_deposit_capture'])).optional(), 'balance': TreasuryFinancialAccountsResourceBalance, @@ -22439,106 +41623,190 @@ export const TreasuryFinancialAccount: z.ZodType 'supported_currencies': z.array(z.string()) }); +/** + * Occurs whenever the status of the FinancialAccount becomes closed. + */ export const TreasuryFinancialAccountClosed: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever a new FinancialAccount is created. + */ export const TreasuryFinancialAccountCreated: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever the statuses of any features within an existing FinancialAccount are updated. + */ export const TreasuryFinancialAccountFeaturesStatusUpdated: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever an InboundTransfer is canceled. + */ export const TreasuryInboundTransferCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer is created. + */ export const TreasuryInboundTransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer has failed. + */ export const TreasuryInboundTransferFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer has succeeded. + */ export const TreasuryInboundTransferSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an OutboundPayment is canceled. + */ export const TreasuryOutboundPaymentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever a new OutboundPayment is successfully created. + */ export const TreasuryOutboundPaymentCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever the arrival date on an OutboundPayment updates. + */ export const TreasuryOutboundPaymentExpectedArrivalDateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment fails. + */ export const TreasuryOutboundPaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment posts. + */ export const TreasuryOutboundPaymentPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment was returned. + */ export const TreasuryOutboundPaymentReturned: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever tracking_details on an OutboundPayment is updated. + */ export const TreasuryOutboundPaymentTrackingDetailsUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundTransfer is canceled. + */ export const TreasuryOutboundTransferCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is created. + */ export const TreasuryOutboundTransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever the arrival date on an OutboundTransfer updates. + */ export const TreasuryOutboundTransferExpectedArrivalDateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer has failed. + */ export const TreasuryOutboundTransferFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is posted. + */ export const TreasuryOutboundTransferPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is returned. + */ export const TreasuryOutboundTransferReturned: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever tracking_details on an OutboundTransfer is updated. + */ export const TreasuryOutboundTransferTrackingDetailsUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever a received_credit is created as a result of funds being pushed by another account. + */ export const TreasuryReceivedCreditCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits. + */ export const TreasuryReceivedCreditFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_credit transitions to succeeded state. Only applicable for check deposits. + */ export const TreasuryReceivedCreditSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_debit is created as a result of funds being pulled by another account. + */ export const TreasuryReceivedDebitCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedDebit) }); +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export const WebhookEndpoint: z.ZodType = z.object({ 'api_version': z.string(), 'application': z.string(), diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/api.ts index 548c097..e4273c6 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/api.ts @@ -13,53 +13,186 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, { 'v1': { 'account': { +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())) }, 'account_links': { +/** + * Create an account link + * + * Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountLink.parse(await json())) }, 'account_notices': { +/** + * List AccountNotices + * + * Retrieves a list of `AccountNotice` objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), sent: z.boolean().optional(), starting_after: z.string().optional() }).parse), '$account_notice': { +/** + * Retrieve an AccountNotice + * + * Retrieves an `AccountNotice` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.AccountNotice.parse(await json())), +/** + * Update an AccountNotice + * + * Updates an `AccountNotice` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountNotice.parse(await json())) } }, 'account_sessions': { +/** + * Create an Account Session + * + * Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AccountSession.parse(await json())) }, 'accounts': { +/** + * List all connected accounts + * + * Returns a list of accounts connected to your platform via [Connect](/docs/connect). If you’re not a platform, the list is empty. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * With [Connect](/docs/connect), you can create Stripe accounts for your users. + * To do this, you’ll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). + * + * If you’ve already collected information for your connected accounts, you [can prefill that information](/docs/connect/best-practices#onboarding) when + * creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. + * You can prefill any information on the account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), '$account': { +/** + * Delete an account + * + * With [Connect](/connect), you can delete accounts you manage. + * + * Test-mode accounts can be deleted at any time. + * + * Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all [balances](/api/balance/balance_object) are zero. + * + * If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedAccount.parse(await json())), +/** + * Retrieve account + * + * Retrieves the details of an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Account.parse(await json())), +/** + * Update an account + * + * Updates a [connected account](/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + * left unchanged. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, you can update any information on the account. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, you can update all information until you create + * an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) to start Connect onboarding, + * after which some properties can no longer be updated. + * + * To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our + * [Connect](/docs/connect/updating-accounts) documentation to learn more about updating accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())), 'capabilities': { +/** + * List all account capabilities + * + * Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$capability': { +/** + * Retrieve an Account Capability + * + * Retrieves information about the specified Account Capability. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Capability.parse(await json())), +/** + * Update an Account Capability + * + * Updates an existing Account Capability. Request or remove a capability by updating its `requested` parameter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Capability.parse(await json())) } }, 'external_accounts': { +/** + * List all external accounts + * + * List external accounts for an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.enum(['bank_account', 'card']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create an external account + * + * Create an external account for a given account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), '$id': { +/** + * Delete an external account + * + * Delete a specified external account for a given account. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedExternalAccount.parse(await json())), +/** + * Retrieve an external account + * + * Retrieve a specified external account for a given account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'login_links': { +/** + * Create a login link + * + * Creates a login link for a connected account to access the Express Dashboard. + * + * **You can only create login links for accounts that use the [Express Dashboard](/connect/express-dashboard) and are connected to your platform**. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LoginLink.parse(await json())) }, 'persons': { +/** + * List all persons + * + * Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), relationship: z.object({ 'authorizer': z.boolean().optional(), 'director': z.boolean().optional(), @@ -68,29 +201,73 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'owner': z.boolean().optional(), 'representative': z.boolean().optional() }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a person + * + * Creates a new person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())), '$person': { +/** + * Delete a person + * + * Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the `account_opener`. If your integration is using the `executive` parameter, you cannot delete the only verified `executive` on file. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPerson.parse(await json())), +/** + * Retrieve a person + * + * Retrieves an existing person. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Person.parse(await json())), +/** + * Update a person + * + * Updates an existing person. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Person.parse(await json())) } }, 'reject': { +/** + * Reject an account + * + * With [Connect](/connect), you can reject accounts that you have flagged as suspicious. + * + * Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Account.parse(await json())) } } }, 'apple_pay': { 'domains': { +/** + * List apple pay domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an apple pay domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())), '$domain': { +/** + * Delete an apple pay domain. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedApplePayDomain.parse(await json())), +/** + * Retrieve an apple pay domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplePayDomain.parse(await json())) } } }, 'application_fees': { +/** + * List all application fees + * + * Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -100,28 +277,78 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$fee': { 'refunds': { '$id': { +/** + * Retrieve an application fee refund + * + * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FeeRefund.parse(await json())), +/** + * Update an application fee refund + * + * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, '$id': { +/** + * Retrieve an application fee + * + * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ApplicationFee.parse(await json())), 'refunds': { +/** + * List all application fee refunds + * + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an application fee refund + * + * Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected. + * + * You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded. + * + * Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FeeRefund.parse(await json())) } } }, 'apps': { 'secrets': { +/** + * List secrets + * + * List all secrets stored on the given scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() }), starting_after: z.string().optional() }).parse), +/** + * Set a Secret + * + * Create or replace a secret in the secret store. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.AppsSecret.parse(await json())), 'DELETE': f.builder().def_json(), 'find': { +/** + * Find a Secret + * + * Finds a secret in the secret store by name and scope. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), name: z.string(), scope: z.object({ 'type': z.enum(['account', 'user']), 'user': z.string().optional() @@ -130,13 +357,38 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { } }, 'balance': { +/** + * Retrieve balance + * + * Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see [Accounting for negative balances](/docs/connect/account-balances#accounting-for-negative-balances). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Balance.parse(await json())) }, 'balance_settings': { +/** + * Retrieve balance settings + * + * Retrieves balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceSettings.parse(await json())), +/** + * Update balance settings + * + * Updates balance settings for a given connected account. + * Related guide: [Making API calls for connected accounts](/connect/authentication) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BalanceSettings.parse(await json())) }, 'balance_transactions': { +/** + * List all balance transactions + * + * Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + * + * Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -144,28 +396,70 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payout: z.string().optional(), source: z.string().optional(), starting_after: z.string().optional(), type: z.string().optional() }).parse), '$id': { +/** + * Retrieve a balance transaction + * + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path `/v1/balance/history/:id`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BalanceTransaction.parse(await json())) } }, 'billing': { 'alerts': { +/** + * List billing alerts + * + * Lists billing active and inactive alerts + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alert_type: z.enum(['usage_threshold']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), meter: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a billing alert + * + * Creates a billing alert + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())), '$id': { +/** + * Retrieve a billing alert + * + * Retrieves a billing alert given an ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingAlert.parse(await json())), 'activate': { +/** + * Activate a billing alert + * + * Reactivates this alert, allowing it to trigger again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'archive': { +/** + * Archive a billing alert + * + * Archives this alert, removing it from the list view and APIs. This is non-reversible. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) }, 'deactivate': { +/** + * Deactivate a billing alert + * + * Deactivates this alert, preventing it from triggering. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingAlert.parse(await json())) } } }, 'analytics': { 'meter_usage': { +/** + * Retrieves aggregated meter usage data + * + * Returns aggregated meter usage data for a customer within a specified time interval. The data can be grouped by various dimensions and can include multiple meters if specified. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), ends_at: z.number().int(), expand: z.array(z.string()).optional(), meters: z.array(z.object({ 'dimension_filters': z.record(z.string(), z.array(z.string())).optional(), 'dimension_group_by_keys': z.array(z.string()).optional(), @@ -175,6 +469,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { } }, 'credit_balance_summary': { +/** + * Retrieve the credit balance summary for a customer + * + * Retrieves the credit balance summary for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), customer_account: z.string().optional(), expand: z.array(z.string()).optional(), filter: z.object({ 'applicability_scope': z.object({ 'price_type': z.enum(['metered']).optional(), @@ -187,52 +486,157 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }) }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceSummary.parse(await json())) }, 'credit_balance_transactions': { +/** + * List credit balance transactions + * + * Retrieve a list of credit balance transactions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ credit_grant: z.string().optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a credit balance transaction + * + * Retrieves a credit balance transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditBalanceTransaction.parse(await json())) } }, 'credit_grants': { +/** + * List credit grants + * + * Retrieve a list of credit grants. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit grant + * + * Creates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), '$id': { +/** + * Retrieve a credit grant + * + * Retrieves a credit grant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), +/** + * Update a credit grant + * + * Updates a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())), 'expire': { +/** + * Expire a credit grant + * + * Expires a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) }, 'void': { +/** + * Void a credit grant + * + * Voids a credit grant. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingCreditGrant.parse(await json())) } } }, 'margins': { +/** + * List all margins + * + * Retrieve a list of your margins. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a margin + * + * 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. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Margin.parse(await json())), '$margin': { +/** + * Retrieve a margin + * + * Retrieve a margin object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Margin.parse(await json())), +/** + * Update a margin + * + * Update the specified margin object. Certain fields of the margin object are not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Margin.parse(await json())) } }, 'meter_event_adjustments': { +/** + * Create a billing meter event adjustment + * + * Creates a billing meter event adjustment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEventAdjustment.parse(await json())) }, 'meter_events': { +/** + * Create a billing meter event + * + * Creates a billing meter event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeterEvent.parse(await json())) }, 'meters': { +/** + * List billing meters + * + * Retrieve a list of billing meters. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive']).optional() }).parse), +/** + * Create a billing meter + * + * Creates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), '$id': { +/** + * Retrieve a billing meter + * + * Retrieves a billing meter given an ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingMeter.parse(await json())), +/** + * Update a billing meter + * + * Updates a billing meter. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())), 'deactivate': { +/** + * Deactivate a billing meter + * + * When a meter is deactivated, no more meter events will be accepted for this meter. You can’t attach a deactivated meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) }, 'event_summaries': { +/** + * List billing meter event summaries + * + * Retrieve a list of billing meter event summaries. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), end_time: z.number().int(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), start_time: z.number().int(), starting_after: z.string().optional(), value_grouping_window: z.enum(['day', 'hour']).optional() }).parse) }, 'reactivate': { +/** + * Reactivate a billing meter + * + * When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingMeter.parse(await json())) } } @@ -240,19 +644,49 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'billing_portal': { 'configurations': { +/** + * List portal configurations + * + * Returns a list of configurations that describe the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a portal configuration + * + * Creates a configuration that describes the functionality and behavior of a PortalSession + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve a portal configuration + * + * Retrieves a configuration that describes the functionality of the customer portal. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())), +/** + * Update a portal configuration + * + * Updates a configuration that describes the functionality of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalConfiguration.parse(await json())) } }, 'sessions': { +/** + * Create a portal session + * + * Creates a session of the customer portal. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BillingPortalSession.parse(await json())) } }, 'capital': { 'financing_offers': { +/** + * List financing offers + * + * Retrieves the financing offers available for Connected accounts that belong to your platform. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ connected_account: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -260,42 +694,114 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['accepted', 'canceled', 'completed', 'delivered', 'expired', 'fully_repaid', 'paid_out', 'rejected', 'revoked', 'undelivered']).optional() }).parse), '$financing_offer': { +/** + * Retrieve a given financing offer + * + * Get the details of the financing offer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CapitalFinancingOffer.parse(await json())), 'mark_delivered': { +/** + * Mark that a financing offer has been delivered + * + * Acknowledges that platform has received and delivered the financing_offer to + * the intended merchant recipient. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CapitalFinancingOffer.parse(await json())) } } }, 'financing_summary': { +/** + * Retrieve financing summary + * + * Retrieve the financing state for the account that was authenticated in the request. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CapitalFinancingSummary.parse(await json())) }, 'financing_transactions': { +/** + * List all financing transactions + * + * Returns a list of financing transactions. The transactions are returned in sorted order, + * with the most recent transactions appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financing_offer: z.string().optional(), limit: z.number().int().optional(), reversed_transaction: z.string().optional(), starting_after: z.string().optional(), treasury_transaction: z.string().optional() }).parse), '$financing_transaction': { +/** + * Retrieve a given financing transaction + * + * Retrieves a financing transaction for a financing offer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CapitalFinancingTransaction.parse(await json())) } } }, 'charges': { +/** + * List all charges + * + * Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * This method is no longer recommended—use the [Payment Intents API](/docs/api/payment_intents) + * to initiate a new payment instead. Confirmation of the PaymentIntent creates the `Charge` + * object used to request payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'search': { +/** + * Search charges + * + * Search for charges you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$charge': { +/** + * Retrieve a charge + * + * Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Charge.parse(await json())), +/** + * Update a charge + * + * Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())), 'capture': { +/** + * Capture a payment + * + * Capture the payment of an existing, uncaptured charge that was created with the `capture` option set to false. + * + * Uncaptured payments expire a set number of days after they are created ([7 by default](/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + * + * Don’t use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](/docs/api/payment_intents/capture). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Charge.parse(await json())) }, 'refunds': { +/** + * List all refunds + * + * You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$refund': { +/** + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -303,6 +809,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'checkout': { 'sessions': { +/** + * List all Checkout Sessions + * + * Returns a list of Checkout Sessions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -311,14 +822,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), customer_details: z.object({ 'email': z.string() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), payment_link: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['complete', 'expired', 'open']).optional(), subscription: z.string().optional() }).parse), +/** + * Create a Checkout Session + * + * Creates a Checkout Session object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), '$session': { +/** + * Retrieve a Checkout Session + * + * Retrieves a Checkout Session object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), +/** + * Update a Checkout Session + * + * Updates a Checkout Session object. + * + * Related guide: [Dynamically update Checkout](/payments/checkout/dynamic-updates) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())), 'expire': { +/** + * Expire a Checkout Session + * + * A Checkout Session can be expired when it is in one of these statuses: `open` + * + * After it expires, a customer can’t complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CheckoutSession.parse(await json())) }, 'line_items': { +/** + * Retrieve a Checkout Session's line items + * + * When retrieving a Checkout Session, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } @@ -326,63 +866,182 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'climate': { 'orders': { +/** + * List orders + * + * Lists all Climate order objects. The orders are returned sorted by creation date, with the + * most recently created orders appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an order + * + * Creates a Climate order object for a given Climate product. The order will be processed immediately + * after creation and payment will be deducted your Stripe balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), '$order': { +/** + * Retrieve an order + * + * Retrieves the details of a Climate order object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), +/** + * Update an order + * + * Updates the specified order by setting the values of the parameters passed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())), 'cancel': { +/** + * Cancel an order + * + * Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + * reservation `amount_subtotal`, but not the `amount_fees` for user-triggered cancellations. Frontier + * might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + * provides 90 days advance notice and refunds the `amount_total`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ClimateOrder.parse(await json())) } } }, 'products': { +/** + * List products + * + * Lists all available Climate product objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$product': { +/** + * Retrieve a product + * + * Retrieves the details of a Climate product with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateProduct.parse(await json())) } }, 'suppliers': { +/** + * List suppliers + * + * Lists all available Climate supplier objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$supplier': { +/** + * Retrieve a supplier + * + * Retrieves a Climate supplier object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ClimateSupplier.parse(await json())) } } }, 'confirmation_tokens': { '$confirmation_token': { +/** + * Retrieve a ConfirmationToken + * + * Retrieves an existing ConfirmationToken object + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) } }, 'country_specs': { +/** + * List Country Specs + * + * Lists all Country Spec objects available in the API. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$country': { +/** + * Retrieve a Country Spec + * + * Returns a Country Spec for a given Country code. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CountrySpec.parse(await json())) } }, 'coupons': { +/** + * List all coupons + * + * Returns a list of your coupons. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a coupon + * + * You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. + * + * A coupon has either a `percent_off` or an `amount_off` and `currency`. If you set an `amount_off`, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an `amount_off` of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an `amount_off` of 200 is applied to it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())), '$coupon': { +/** + * Delete a coupon + * + * You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCoupon.parse(await json())), +/** + * Retrieve a coupon + * + * Retrieves the coupon with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Coupon.parse(await json())), +/** + * Update a coupon + * + * Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Coupon.parse(await json())) } }, 'credit_notes': { +/** + * List all credit notes + * + * Returns a list of credit notes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a credit note + * + * Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s `amount_remaining` (and `amount_due`), but not below zero. + * This amount is indicated by the credit note’s `pre_payment_amount`. The excess amount is indicated by `post_payment_amount`, and it can result in any combination of the following: + * + * - Refunds: create a new refund (using `refund_amount`) or link existing refunds (using `refunds`). + * + * - Customer balance credit: credit the customer’s balance (using `credit_amount`) which will be automatically applied to their next invoice when it’s finalized. + * + * - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using `out_of_band_amount`). + * + * The sum of refunds, customer balance credits, and outside of Stripe credits must equal the `post_payment_amount`. + * + * You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s `pre_payment_credit_notes_amount`, + * `post_payment_credit_notes_amount`, or both, depending on the invoice’s `amount_remaining` at the time of credit note creation. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'preview': { +/** + * Preview a credit note + * + * Get a preview of a credit note without creating it. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), expand: z.array(z.string()).optional(), invoice: z.string(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -409,6 +1068,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'shipping_rate': z.string().optional() }).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'lines': { +/** + * Retrieve a credit note preview's line items + * + * When retrieving a credit note preview, you’ll get a **lines** property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.number().int().optional(), credit_amount: z.number().int().optional(), effective_at: z.number().int().optional(), email_type: z.enum(['credit_note', 'none']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string(), limit: z.number().int().optional(), lines: z.array(z.object({ 'amount': z.number().int().optional(), 'description': z.string().optional(), @@ -438,93 +1102,268 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, '$credit_note': { 'lines': { +/** + * Retrieve a credit note's line items + * + * When retrieving a credit note, you’ll get a **lines** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } }, '$id': { +/** + * Retrieve a credit note + * + * Retrieves the credit note object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CreditNote.parse(await json())), +/** + * Update a credit note + * + * Updates an existing credit note. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())), 'void': { +/** + * Void a credit note + * + * Marks a credit note as void. Learn more about [voiding credit notes](/docs/billing/invoices/credit-notes#voiding). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CreditNote.parse(await json())) } } }, 'customer_sessions': { +/** + * Create a Customer Session + * + * Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerSession.parse(await json())) }, 'customers': { +/** + * List all customers + * + * Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), test_clock: z.string().optional() }).parse), +/** + * Create a customer + * + * Creates a new customer object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'search': { +/** + * Search customers + * + * Search for customers you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$customer': { +/** + * Delete a customer + * + * Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedCustomer.parse(await json())), +/** + * Retrieve a customer + * + * Retrieves a Customer object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a customer + * + * Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the **source** parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the **source** parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the `past_due` state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the **default_source** for a customer will not trigger this behavior. + * + * This request accepts mostly the same arguments as the customer creation call. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Customer.parse(await json())), 'balance_transactions': { +/** + * List customer balance transactions + * + * Returns a list of transactions that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a customer balance transaction + * + * Creates an immutable transaction that updates the customer’s credit [balance](/docs/billing/customer/balance). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), '$transaction': { +/** + * Retrieve a customer balance transaction + * + * Retrieves a specific customer balance transaction that updated the customer’s [balances](/docs/billing/customer/balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())), +/** + * Update a customer credit balance transaction + * + * Most credit balance transaction fields are immutable, but you may update its `description` and `metadata`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerBalanceTransaction.parse(await json())) } }, 'cash_balance': { +/** + * Retrieve a cash balance + * + * Retrieves a customer’s cash balance. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CashBalance.parse(await json())), +/** + * Update a cash balance's settings + * + * Changes the settings on a customer’s cash balance. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CashBalance.parse(await json())) }, 'cash_balance_transactions': { +/** + * List cash balance transactions + * + * Returns a list of transactions that modified the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$transaction': { +/** + * Retrieve a cash balance transaction + * + * Retrieves a specific cash balance transaction, which updated the customer’s [cash balance](/docs/payments/customer-balance). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } }, 'discount': { +/** + * Delete a customer discount + * + * Removes the currently applied discount on a customer. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())) }, 'funding_instructions': { +/** + * Create or retrieve funding instructions for a customer cash balance + * + * Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FundingInstructions.parse(await json())) }, 'payment_methods': { +/** + * List a Customer's PaymentMethods + * + * Returns a list of PaymentMethods for a given Customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ allow_redisplay: z.enum(['always', 'limited', 'unspecified']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), '$payment_method': { +/** + * Retrieve a Customer's PaymentMethod + * + * Retrieves a PaymentMethod object for a given Customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } }, 'sources': { +/** + * List sources for a specified customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a card + * + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](/docs/api#update_customer) to have a new `default_source`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentSource.parse(await json())), '$id': { +/** + * Delete a customer source + * + * Delete a specified source for a given customer. + */ 'DELETE': f.builder().def_json(), +/** + * Retrieve a specified source for a given customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentSource.parse(await json())), +/** + * Update a specified source for a given customer. + */ 'POST': f.builder().def_json(), 'verify': { +/** + * Verify a bank account + * + * Verify a specified bank account for a given customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.BankAccount.parse(await json())) } } }, 'tax_ids': { +/** + * List all Customer tax IDs + * + * Returns a list of tax IDs for a customer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Customer tax ID + * + * Creates a new `tax_id` object for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a Customer tax ID + * + * Deletes an existing `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a Customer tax ID + * + * Retrieves the `tax_id` object with the given identifier. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } } } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of your disputes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -532,36 +1371,100 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves the dispute with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Dispute.parse(await json())), +/** + * Update a dispute + * + * When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. + * + * Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](/docs/disputes/categories). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())), 'close': { +/** + * Close a dispute + * + * Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + * + * The status of the dispute will change from `needs_response` to `lost`. *Closing a dispute is irreversible*. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Dispute.parse(await json())) } } }, 'entitlements': { 'active_entitlements': { +/** + * List all active entitlements + * + * Retrieve a list of active entitlements for a customer + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve an active entitlement + * + * Retrieve an active entitlement + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsActiveEntitlement.parse(await json())) } }, 'features': { +/** + * List all features + * + * Retrieve a list of features + */ 'GET': f.builder().def_json().def_searchparams(z.object({ archived: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_key: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a feature + * + * Creates a feature + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), '$id': { +/** + * Retrieve a feature + * + * Retrieves a feature + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())), +/** + * Updates a feature + * + * Update a feature’s metadata or permanently deactivate it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EntitlementsFeature.parse(await json())) } } }, 'ephemeral_keys': { +/** + * Create an ephemeral key + * + * Creates a short-lived API key for a given resource. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())), '$key': { +/** + * Immediately invalidate an ephemeral key + * + * Invalidates a short-lived API key for a given resource. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.EphemeralKey.parse(await json())) } }, 'events': { +/** + * List all events + * + * List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -569,91 +1472,242 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), delivery_success: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.string().optional(), types: z.array(z.string()).optional() }).parse), '$id': { +/** + * Retrieve an event + * + * Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Event.parse(await json())) } }, 'exchange_rates': { +/** + * List all exchange rates + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$rate_id': { +/** + * Retrieve an exchange rate + * + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * Retrieves the exchange rates from the given currency to every supported currency. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExchangeRate.parse(await json())) } }, 'external_accounts': { +/** + * List all external accounts + * + * List external accounts for an account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), object: z.enum(['bank_account', 'card']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create an external account + * + * Create an external account for a given connected account. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), '$id': { +/** + * Delete an external account + * + * Delete a specified external account for a given account. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedExternalAccount.parse(await json())), +/** + * Retrieve an external account + * + * Retrieve a specified external account for a given account. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ExternalAccount.parse(await json())), +/** + * Updates the metadata, account holder name, account holder type of a bank account belonging to + * a connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + * You can only update bank accounts when [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes [Custom accounts](/connect/custom-accounts). + * + * You can re-enable a disabled bank account by performing an update call without providing any + * arguments or changes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ExternalAccount.parse(await json())) } }, 'file_links': { +/** + * List all file links + * + * Returns a list of file links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), expired: z.boolean().optional(), file: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a file link + * + * Creates a new file link object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())), '$link': { +/** + * Retrieve a file link + * + * Retrieves the file link with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FileLink.parse(await json())), +/** + * Update a file link + * + * Updates an existing file link object. Expired links can no longer be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FileLink.parse(await json())) } }, 'files': { +/** + * List all files + * + * 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. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), purpose: z.enum(['account_requirement', 'additional_verification', 'business_icon', 'business_logo', 'customer_signature', 'dispute_evidence', 'document_provider_identity_document', 'finance_report_run', 'financial_account_statement', 'identity_document', 'identity_document_downloadable', 'issuing_regulatory_reporting', 'pci_document', 'platform_terms_of_service', 'selfie', 'sigma_scheduled_query', 'tax_document_user_upload', 'terminal_android_apk', 'terminal_reader_splashscreen']).optional(), starting_after: z.string().optional() }).parse), +/** + * Create 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 support sending `multipart/form-data`. + */ 'POST': f.builder().def_json().def_body(z.instanceof(FormData).parse).def_response(async ({ json }) => Model.File.parse(await json())), '$file': { +/** + * Retrieve a file + * + * 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](/docs/file-upload#download-file-contents). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.File.parse(await json())) } }, 'financial_connections': { 'accounts': { +/** + * List Accounts + * + * Returns a list of Financial Connections `Account` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account_holder: z.object({ 'account': z.string().optional(), 'customer': z.string().optional(), 'customer_account': z.string().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), session: z.string().optional(), starting_after: z.string().optional() }).parse), '$account': { +/** + * Retrieve an Account + * + * Retrieves the details of an Financial Connections `Account`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())), 'disconnect': { +/** + * Disconnect an Account + * + * Disables your access to a Financial Connections `Account`. You will no longer be able to access data associated with the account (e.g. balances, transactions). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'inferred_balances': { +/** + * List Account's inferred balances + * + * Lists the recorded inferred balances for a Financial Connections `Account`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'owners': { +/** + * List Account Owners + * + * Lists all owners for a given `Account` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), ownership: z.string(), starting_after: z.string().optional() }).parse) }, 'refresh': { +/** + * Refresh Account data + * + * Refreshes the data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'subscribe': { +/** + * Subscribe to data refreshes for an Account + * + * Subscribes to periodic refreshes of data associated with a Financial Connections `Account`. When the account status is active, data is typically refreshed once a day. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) }, 'unsubscribe': { +/** + * Unsubscribe from data refreshes for an Account + * + * Unsubscribes from periodic refreshes of data associated with a Financial Connections `Account`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsAccount.parse(await json())) } } }, 'institutions': { +/** + * List Institutions + * + * Returns a list of Financial Connections `Institution` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$institution': { +/** + * Retrieve an Institution + * + * Retrieves the details of a Financial Connections `Institution`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsInstitution.parse(await json())) } }, 'sessions': { +/** + * Create a Session + * + * To launch the Financial Connections authorization flow, create a `Session`. The session’s `client_secret` can be used to launch the flow using Stripe.js. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())), '$session': { +/** + * Retrieve a Session + * + * Retrieves the details of a Financial Connections `Session` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsSession.parse(await json())) } }, 'transactions': { +/** + * List Transactions + * + * Returns a list of Financial Connections `Transaction` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ account: z.string(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transacted_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -663,33 +1717,73 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'after': z.string() }).optional() }).parse), '$transaction': { +/** + * Retrieve a Transaction + * + * Retrieves the details of a Financial Connections `Transaction` + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FinancialConnectionsTransaction.parse(await json())) } } }, 'forwarding': { 'requests': { +/** + * List all ForwardingRequests + * + * Lists all ForwardingRequest objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a ForwardingRequest + * + * Creates a ForwardingRequest object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())), '$id': { +/** + * Retrieve a ForwardingRequest + * + * Retrieves a ForwardingRequest object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ForwardingRequest.parse(await json())) } } }, 'fx_quotes': { +/** + * List active FX Quotes + * + * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an FX Quote + * + * Creates an FX Quote object + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.FxQuote.parse(await json())), '$id': { +/** + * Retrieve an FX Quote + * + * Retrieve an FX Quote object + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.FxQuote.parse(await json())) } }, 'identity': { 'verification_reports': { +/** + * List VerificationReports + * + * List all verification reports. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -697,30 +1791,102 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['document', 'id_number']).optional(), verification_session: z.string().optional() }).parse), '$report': { +/** + * Retrieve a VerificationReport + * + * Retrieves an existing VerificationReport + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationReport.parse(await json())) } }, 'verification_sessions': { +/** + * List VerificationSessions + * + * Returns a list of VerificationSessions + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_reference_id: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), related_customer: z.string().optional(), related_customer_account: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'processing', 'requires_input', 'verified']).optional() }).parse), +/** + * Create a VerificationSession + * + * Creates a VerificationSession object. + * + * After the VerificationSession is created, display a verification modal using the session `client_secret` or send your users to the session’s `url`. + * + * If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode. + * + * Related guide: [Verify your users’ identity documents](/docs/identity/verify-identity-documents) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), '$session': { +/** + * Retrieve a VerificationSession + * + * Retrieves the details of a VerificationSession that was previously created. + * + * When the session status is `requires_input`, you can use this method to retrieve a valid + * `client_secret` or `url` to allow re-submission. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), +/** + * Update a VerificationSession + * + * Updates a VerificationSession object. + * + * When the session status is `requires_input`, you can use this method to update the + * verification check and options. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())), 'cancel': { +/** + * Cancel a VerificationSession + * + * A VerificationSession object can be canceled when it is in `requires_input` [status](/docs/identity/how-sessions-work). + * + * Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](/docs/identity/verification-sessions#cancel). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) }, 'redact': { +/** + * Redact a VerificationSession + * + * Redact a VerificationSession to remove all collected information from Stripe. This will redact + * the VerificationSession and all objects related to it, including VerificationReports, Events, + * request logs, etc. + * + * A VerificationSession object can be redacted when it is in `requires_input` or `verified` + * [status](/docs/identity/how-sessions-work). Redacting a VerificationSession in `requires_action` + * state will automatically cancel it. + * + * The redaction process may take up to four days. When the redaction process is in progress, the + * VerificationSession’s `redaction.status` field will be set to `processing`; when the process is + * finished, it will change to `redacted` and an `identity.verification_session.redacted` event + * will be emitted. + * + * Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + * fields that contain personal data will be replaced by the string `[redacted]` or a similar + * placeholder. The `metadata` field will also be erased. Redacted objects cannot be updated or + * used for any purpose. + * + * [Learn more](/docs/identity/verification-sessions#redact). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IdentityVerificationSession.parse(await json())) } } } }, 'invoice_payments': { +/** + * List all payments for an invoice + * + * When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -732,36 +1898,91 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'type': z.enum(['payment_intent', 'payment_record']) }).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'open', 'paid']).optional() }).parse), '$invoice_payment': { +/** + * Retrieve an InvoicePayment + * + * Retrieves the invoice payment with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.InvoicePayment.parse(await json())) } }, 'invoice_rendering_templates': { +/** + * List all invoice rendering templates + * + * List all templates, ordered by creation date, with the most recently created template appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'archived']).optional() }).parse), '$template': { +/** + * Retrieve an invoice rendering template + * + * Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), version: z.number().int().optional() }).parse).def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())), 'archive': { +/** + * Archive an invoice rendering template + * + * Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) }, 'unarchive': { +/** + * Unarchive an invoice rendering template + * + * Unarchive an invoice rendering template so it can be used on new Stripe objects again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.InvoiceRenderingTemplate.parse(await json())) } } }, 'invoiceitems': { +/** + * List all invoice items + * + * Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), invoice: z.string().optional(), limit: z.number().int().optional(), pending: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an invoice item + * + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), '$invoiceitem': { +/** + * Delete an invoice item + * + * Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoiceitem.parse(await json())), +/** + * Retrieve an invoice item + * + * Retrieves the invoice item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoiceitem.parse(await json())), +/** + * Update an invoice item + * + * Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoiceitem.parse(await json())) } }, 'invoices': { +/** + * List all invoices + * + * You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -773,54 +1994,176 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['draft', 'open', 'paid', 'uncollectible', 'void']).optional(), subscription: z.string().optional() }).parse), +/** + * Create an invoice + * + * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize](#finalize_invoice) the invoice, which allows you to [pay](#pay_invoice) or [send](#send_invoice) the invoice to your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'create_preview': { +/** + * Create a preview invoice + * + * At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + * + * You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the `subscription_details.proration_date` parameter when doing the actual subscription update. + * + * The recommended way to get only the prorations being previewed on the invoice is to consider line items where `parent.subscription_item_details.proration` is `true`. + * + * Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount. + * + * Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'search': { +/** + * Search invoices + * + * Search for invoices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$invoice': { +/** + * Delete a draft invoice + * + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](#void_invoice). + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedInvoice.parse(await json())), +/** + * Retrieve an invoice + * + * Retrieves the invoice with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Invoice.parse(await json())), +/** + * Update an invoice + * + * Draft invoices are fully editable. Once an invoice is [finalized](/docs/billing/invoices/workflow#finalized), + * monetary values, as well as `collection_method`, become uneditable. + * + * If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or [automatically reconciling](/docs/billing/invoices/reconciliation) invoices, pass + * `auto_advance=false`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())), 'add_lines': { +/** + * Bulk add invoice line items + * + * Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'attach_payment': { +/** + * Attach a payment to an Invoice + * + * Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of `payments`. + * + * For the PaymentIntent, when the PaymentIntent’s status changes to `succeeded`, the payment is credited + * to the invoice, increasing its `amount_paid`. When the invoice is fully paid, the + * invoice’s status becomes `paid`. + * + * If the PaymentIntent’s status is already `succeeded` when it’s attached, it’s + * credited to the invoice immediately. + * + * See: [Partial payments](/docs/invoicing/partial-payments) to learn more. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'finalize': { +/** + * Finalize an invoice + * + * Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'lines': { +/** + * Retrieve an invoice's line items + * + * When retrieving an invoice, you’ll get a **lines** property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$line_item_id': { +/** + * Update an invoice's line item + * + * Updates an invoice’s line item. Some fields, such as `tax_amounts`, only live on the invoice line item, + * so they can only be updated through this endpoint. Other fields, such as `amount`, live on both the invoice + * item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + * Updating an invoice’s line item is only possible before the invoice is finalized. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.LineItem.parse(await json())) } }, 'mark_uncollectible': { +/** + * Mark an invoice as uncollectible + * + * Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'pay': { +/** + * Pay an invoice + * + * Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'remove_lines': { +/** + * Bulk remove invoice line items + * + * Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'send': { +/** + * Send an invoice for manual payment + * + * Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + * + * Requests made in test-mode result in no emails being sent, despite sending an `invoice.sent` event. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'update_lines': { +/** + * Bulk update invoice line items + * + * Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) }, 'void': { +/** + * Void an invoice + * + * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + * + * Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to [issue another invoice](#create_invoice) or [credit note](#create_credit_note) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Invoice.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * List all authorizations + * + * Returns a list of Issuing `Authorization` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -828,83 +2171,215 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'expired', 'pending', 'reversed']).optional() }).parse), '$authorization': { +/** + * Retrieve an authorization + * + * Retrieves an Issuing `Authorization` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), +/** + * Update an authorization + * + * Updates the specified Issuing `Authorization` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), 'approve': { +/** + * Approve an authorization + * + * [Deprecated] Approves a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real-time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'decline': { +/** + * Decline an authorization + * + * [Deprecated] Declines a pending Issuing `Authorization` object. This request should be made within the timeout window of the [real time authorization](/docs/issuing/controls/real-time-authorizations) flow. + * This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](/docs/issuing/controls/real-time-authorizations#authorization-handling). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } }, 'cardholders': { +/** + * List all cardholders + * + * Returns a list of Issuing `Cardholder` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), email: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), phone_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'blocked', 'inactive']).optional(), type: z.enum(['company', 'individual']).optional() }).parse), +/** + * Create a cardholder + * + * Creates a new Issuing `Cardholder` object that can be issued cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), '$cardholder': { +/** + * Retrieve a cardholder + * + * Retrieves an Issuing `Cardholder` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())), +/** + * Update a cardholder + * + * Updates the specified Issuing `Cardholder` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCardholder.parse(await json())) } }, 'cards': { +/** + * List all cards + * + * Returns a list of Issuing `Card` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), exp_month: z.number().int().optional(), exp_year: z.number().int().optional(), expand: z.array(z.string()).optional(), last4: z.string().optional(), limit: z.number().int().optional(), personalization_design: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'canceled', 'inactive']).optional(), type: z.enum(['physical', 'virtual']).optional() }).parse), +/** + * Create a card + * + * Creates an Issuing `Card` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())), '$card': { +/** + * Retrieve a card + * + * Retrieves an Issuing `Card` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCard.parse(await json())), +/** + * Update a card + * + * Updates the specified Issuing `Card` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } }, 'credit_underwriting_records': { +/** + * List all records + * + * Retrieves a list of `CreditUnderwritingRecord` objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), 'create_from_application': { +/** + * Create from an application + * + * Creates a `CreditUnderwritingRecord` object with information about a credit application submission. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCreditUnderwritingRecord.parse(await json())) }, 'create_from_proactive_review': { +/** + * Create from a proactive review + * + * Creates a `CreditUnderwritingRecord` object from an underwriting decision coming from a proactive review of an existing accountholder. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCreditUnderwritingRecord.parse(await json())) }, '$credit_underwriting_record': { +/** + * Retrieve a record + * + * Retrieves a `CreditUnderwritingRecord` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingCreditUnderwritingRecord.parse(await json())), 'correct': { +/** + * Correct an erroneous record + * + * Update a `CreditUnderwritingRecord` object to correct mistakes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCreditUnderwritingRecord.parse(await json())) }, 'report_decision': { +/** + * Report a decision + * + * Update a `CreditUnderwritingRecord` object from a decision made on a credit application. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCreditUnderwritingRecord.parse(await json())) } } }, 'dispute_settlement_details': { +/** + * List all dispute settlement details + * + * Returns a list of Issuing `DisputeSettlementDetail` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), settlement: z.string().optional(), starting_after: z.string().optional() }).parse), '$dispute_settlement_detail': { +/** + * Retrieve a dispute settlement detail + * + * Retrieves an Issuing `DisputeSettlementDetail` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingDisputeSettlementDetail.parse(await json())) } }, 'disputes': { +/** + * List all disputes + * + * Returns a list of Issuing `Dispute` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['expired', 'lost', 'submitted', 'unsubmitted', 'won']).optional(), transaction: z.string().optional() }).parse), +/** + * Create a dispute + * + * Creates an Issuing `Dispute` object. Individual pieces of evidence within the `evidence` object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), '$dispute': { +/** + * Retrieve a dispute + * + * Retrieves an Issuing `Dispute` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), +/** + * Update a dispute + * + * Updates the specified Issuing `Dispute` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the `evidence` object can be unset by passing in an empty string. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())), 'submit': { +/** + * Submit a dispute + * + * Submits an Issuing `Dispute` to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see [Dispute reasons and evidence](/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingDispute.parse(await json())) } } }, 'fraud_liability_debits': { +/** + * List all fraud liability debits + * + * Returns a list of Issuing `FraudLiabilityDebit` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -912,27 +2387,67 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$fraud_liability_debit': { +/** + * Retrieve an Issuing fraud liability debit + * + * Retrieves an Issuing `FraudLiabilityDebit` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingFraudLiabilityDebit.parse(await json())) } }, 'personalization_designs': { +/** + * List all personalization designs + * + * Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), lookup_keys: z.array(z.string()).optional(), preferences: z.object({ 'is_default': z.boolean().optional(), 'is_platform_default': z.boolean().optional() }).optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'rejected', 'review']).optional() }).parse), +/** + * Create a personalization design + * + * Creates a personalization design object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), '$personalization_design': { +/** + * Retrieve a personalization design + * + * Retrieves a personalization design object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())), +/** + * Update a personalization design + * + * Updates a card personalization object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } }, 'physical_bundles': { +/** + * List all physical bundles + * + * Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'review']).optional(), type: z.enum(['custom', 'standard']).optional() }).parse), '$physical_bundle': { +/** + * Retrieve a physical bundle + * + * Retrieves a physical bundle object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingPhysicalBundle.parse(await json())) } }, 'tokens': { +/** + * List all issuing tokens for card + * + * Lists all Issuing `Token` objects for a given card. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -940,11 +2455,26 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'deleted', 'requested', 'suspended']).optional() }).parse), '$token': { +/** + * Retrieve an issuing token + * + * Retrieves an Issuing `Token` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingToken.parse(await json())), +/** + * Update a token status + * + * Attempts to update the specified Issuing `Token` object to the status specified. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingToken.parse(await json())) } }, 'transactions': { +/** + * List all transactions + * + * Returns a list of Issuing `Transaction` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ card: z.string().optional(), cardholder: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -952,154 +2482,557 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), settlement: z.string().optional(), starting_after: z.string().optional(), type: z.enum(['capture', 'refund']).optional() }).parse), '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves an Issuing `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())), +/** + * Update a transaction + * + * Updates the specified Issuing `Transaction` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } }, 'mandates': { +/** + * List of Mandates for a PaymentMethod + * + * Retrieves a list of Mandates for a given PaymentMethod. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), on_behalf_of: z.string().optional(), payment_method: z.string(), starting_after: z.string().optional(), status: z.enum(['active', 'inactive', 'pending']) }).parse), '$mandate': { +/** + * Retrieve a Mandate + * + * Retrieves a Mandate object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Mandate.parse(await json())) } }, 'orders': { +/** + * List all orders + * + * Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create an order + * + * Creates a new `open` order object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())), '$id': { +/** + * Retrieve an order + * + * Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Order.parse(await json())), +/** + * Update an order + * + * Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())), 'cancel': { +/** + * Cancel an order + * + * Cancels the order as well as the payment intent if one is attached. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())) }, 'line_items': { +/** + * Retrieve an order's line items + * + * When retrieving an order, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'reopen': { +/** + * Reopen an order + * + * Reopens a `submitted` order. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())) }, 'submit': { +/** + * Submit an order + * + * Submitting an Order transitions the status to `processing` and creates a PaymentIntent object so the order can be paid. If the Order has an `amount_total` of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](#reopen_order) method is called. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Order.parse(await json())) } } }, 'payment_attempt_records': { +/** + * List Payment Attempt Records + * + * List all the Payment Attempt Records attached to the specified Payment Record. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_record: z.string(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a Payment Attempt Record + * + * Retrieves a Payment Attempt Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentAttemptRecord.parse(await json())) } }, 'payment_intents': { +/** + * List all PaymentIntents + * + * Returns a list of PaymentIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a PaymentIntent + * + * Creates a PaymentIntent object. + * + * After the PaymentIntent is created, attach a payment method and [confirm](/docs/api/payment_intents/confirm) + * to continue the payment. Learn more about the available payment flows + * with the Payment Intents API. + * + * When you use `confirm=true` during creation, it’s equivalent to creating + * and confirming the PaymentIntent in the same call. You can use any parameters + * available in the [confirm API](/docs/api/payment_intents/confirm) when you supply + * `confirm=true`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'search': { +/** + * Search PaymentIntents + * + * Search for PaymentIntents you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$intent': { +/** + * Retrieve a PaymentIntent + * + * Retrieves the details of a PaymentIntent that has previously been created. + * + * You can retrieve a PaymentIntent client-side using a publishable key when the `client_secret` is in the query string. + * + * If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](#payment_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), +/** + * Update a PaymentIntent + * + * Updates properties on a PaymentIntent object without confirming. + * + * 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](/docs/api/payment_intents/confirm) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())), 'amount_details_line_items': { +/** + * List all PaymentIntent LineItems + * + * Lists all LineItems of a given PaymentIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'apply_customer_balance': { +/** + * Reconcile a customer_balance PaymentIntent + * + * Manually reconcile the remaining amount for a `customer_balance` PaymentIntent. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'cancel': { +/** + * Cancel a PaymentIntent + * + * You can cancel a PaymentIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_action` or, [in rare cases](/docs/payments/intents), `processing`. + * + * After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a `status` of `requires_capture`, the remaining `amount_capturable` is automatically refunded. + * + * You can’t cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'capture': { +/** + * Capture a PaymentIntent + * + * Capture the funds of an existing uncaptured PaymentIntent when its status is `requires_capture`. + * + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + * + * Learn more about [separate authorization and capture](/docs/payments/capture-later). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a PaymentIntent + * + * Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment. + * + * If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If payment fails, + * the PaymentIntent transitions to the `requires_payment_method` status or the + * `canceled` status if the confirmation limit is reached. If + * payment succeeds, the PaymentIntent will transition to the `succeeded` + * status (or `requires_capture`, if `capture_method` is set to `manual`). + * + * If the `confirmation_method` is `automatic`, payment may be attempted + * using our [client SDKs](/docs/stripe-js/reference#stripe-handle-card-payment) + * and the PaymentIntent’s [client_secret](#payment_intent_object-client_secret). + * After `next_action`s are handled by the client, no additional + * confirmation is required to complete the payment. + * + * If the `confirmation_method` is `manual`, all payment attempts must be + * initiated using a secret key. + * + * If any actions are required for the payment, the PaymentIntent will + * return to the `requires_confirmation` state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. + * + * There is a variable upper limit on how many times a PaymentIntent can be confirmed. + * After this limit is reached, any further calls to this endpoint will + * transition the PaymentIntent to the `canceled` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'decrement_authorization': { +/** + * Decrement an authorization + * + * Perform a decremental authorization on an eligible + * [PaymentIntent](/docs/api/payment_intents/object). To be eligible, the + * PaymentIntent’s status must be `requires_capture` and + * [decremental_authorization.status](/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization) + * must be `available`. + * + * Decremental authorizations decrease the authorized amount on your customer’s card + * to the new, lower `amount` provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount. + * + * After decrement, the PaymentIntent object + * returns with the updated + * [amount](/docs/api/payment_intents/object#payment_intent_object-amount). + * The PaymentIntent will now be capturable up to the new authorized amount. + * + * Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines. + * After it’s fully captured, a PaymentIntent can no longer be decremented. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'increment_authorization': { +/** + * Increment an authorization + * + * Perform an incremental authorization on an eligible + * [PaymentIntent](/docs/api/payment_intents/object). To be eligible, the + * PaymentIntent’s status must be `requires_capture` and + * [incremental_authorization_supported](/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + * must be `true`. + * + * Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher `amount` provided. Similar to the + * initial authorization, incremental authorizations can be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount. + * + * If the incremental authorization succeeds, the PaymentIntent object + * returns with the updated + * [amount](/docs/api/payment_intents/object#payment_intent_object-amount). + * If the incremental authorization fails, a + * [card_declined](/docs/error-codes#card-declined) error returns, and no other + * fields on the PaymentIntent or Charge update. The PaymentIntent + * object remains capturable for the previously authorized amount. + * + * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * After it’s captured, a PaymentIntent can no longer be incremented. + * + * Learn more about [incremental authorizations](/docs/terminal/features/incremental-authorizations). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a PaymentIntent + * + * Verifies microdeposits on a PaymentIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) } } }, 'payment_links': { +/** + * List all payment links + * + * Returns a list of your payment links. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment link + * + * Creates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), '$payment_link': { +/** + * Retrieve payment link + * + * Retrieve a payment link. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentLink.parse(await json())), +/** + * Update a payment link + * + * Updates a payment link. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentLink.parse(await json())), 'line_items': { +/** + * Retrieve a payment link's line items + * + * When retrieving a payment link, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'payment_method_configurations': { +/** + * List payment method configurations + * + * List payment method configurations + */ 'GET': f.builder().def_json().def_searchparams(z.object({ application: z.union([z.string(), z.enum([''])]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method configuration + * + * Creates a payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), '$configuration': { +/** + * Retrieve payment method configuration + * + * Retrieve payment method configuration + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())), +/** + * Update payment method configuration + * + * Update payment method configuration + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodConfiguration.parse(await json())) } }, 'payment_method_domains': { +/** + * List payment method domains + * + * Lists the details of existing payment method domains. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ domain_name: z.string().optional(), enabled: z.boolean().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a payment method domain + * + * Creates a payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), '$payment_method_domain': { +/** + * Retrieve a payment method domain + * + * Retrieves the details of an existing payment method domain. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), +/** + * Update a payment method domain + * + * Updates an existing payment method domain. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())), 'validate': { +/** + * Validate an existing payment method domain + * + * Some payment methods might require additional steps to register a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain. + * The payment method doesn’t appear in Elements or Embedded Checkout for this domain until it is active. + * + * To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint. + * + * Related guides: [Payment method domains](/docs/payments/payment-methods/pmd-registration). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethodDomain.parse(await json())) } } }, 'payment_methods': { +/** + * List PaymentMethods + * + * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer’s PaymentMethods](/docs/api/payment_methods/customer_list) API instead. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ allow_redisplay: z.enum(['always', 'limited', 'unspecified']).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), type: z.enum(['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']).optional() }).parse), +/** + * Shares a PaymentMethod + * + * Creates a PaymentMethod object. Read the [Stripe.js reference](/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. + * + * Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents](/docs/payments/accept-a-payment) API to accept a payment immediately or the [SetupIntent](/docs/payments/save-and-reuse) API to collect payment method details ahead of a future payment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), '$payment_method': { +/** + * Retrieve a PaymentMethod + * + * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer’s PaymentMethods](/docs/api/payment_methods/customer) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), +/** + * Update a PaymentMethod + * + * Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())), 'attach': { +/** + * Attach a PaymentMethod to a Customer + * + * Attaches a PaymentMethod object to a Customer. + * + * To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](/docs/api/setup_intents) + * or a PaymentIntent with [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the `/v1/payment_methods/:id/attach` + * endpoint without first using a SetupIntent or PaymentIntent with `setup_future_usage` does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See [Optimizing cards for future payments](/docs/payments/payment-intents#future-usage) for more information about setting up + * future payments. + * + * To use this PaymentMethod as the default for invoice or subscription payments, + * set [`invoice_settings.default_payment_method`](/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + * on the Customer to the PaymentMethod’s ID. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) }, 'detach': { +/** + * Detach a PaymentMethod from a Customer + * + * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentMethod.parse(await json())) } } }, 'payment_records': { 'report_payment': { +/** + * Report a payment + * + * Report a new Payment Record. You may report a Payment Record as it is + * initialized and later report updates through the other report_* methods, or report Payment + * Records in a terminal state directly, through this method. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, '$id': { +/** + * Retrieve a Payment Record + * + * Retrieves a Payment Record with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PaymentRecord.parse(await json())), 'report_payment_attempt': { +/** + * Report a payment attempt + * + * Report a new payment attempt on the specified Payment Record. A new payment + * attempt can only be specified if all other payment attempts are canceled or failed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_canceled': { +/** + * Report payment attempt canceled + * + * Report that the most recent payment attempt on the specified Payment Record + * was canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_failed': { +/** + * Report payment attempt failed + * + * Report that the most recent payment attempt on the specified Payment Record + * failed or errored. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_guaranteed': { +/** + * Report payment attempt guaranteed + * + * Report that the most recent payment attempt on the specified Payment Record + * was guaranteed. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_payment_attempt_informational': { +/** + * Report payment attempt informational + * + * Report informational updates on the specified Payment Record. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) }, 'report_refund': { +/** + * Report a refund + * + * Report that the most recent payment attempt on the specified Payment Record + * was refunded. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentRecord.parse(await json())) } } }, 'payouts': { +/** + * List all payouts + * + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ arrival_date: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1111,33 +3044,94 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.string().optional() }).parse), +/** + * Create a payout + * + * To send funds to your own bank account, create a new payout object. Your [Stripe balance](#balance) must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. + * + * If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. + * + * If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](#balance_object) details available and pending amounts by source type. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), '$payout': { +/** + * Retrieve a payout + * + * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Payout.parse(await json())), +/** + * Update a payout + * + * Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())), 'cancel': { +/** + * Cancel a payout + * + * You can cancel a previously created payout if its status is `pending`. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) }, 'reverse': { +/** + * Reverse a payout + * + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the `pending` status, use `/v1/payouts/:id/cancel` instead. + * + * By requesting a reversal through `/v1/payouts/:id/reverse`, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Payout.parse(await json())) } } }, 'plans': { +/** + * List all plans + * + * Returns a list of your plans. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), product: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a plan + * + * You can now model subscriptions more flexibly using the [Prices API](#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())), '$plan': { +/** + * Delete a plan + * + * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedPlan.parse(await json())), +/** + * Retrieve a plan + * + * Retrieves the plan with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Plan.parse(await json())), +/** + * Update a plan + * + * Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Plan.parse(await json())) } }, 'prices': { +/** + * List all prices + * + * Returns a list of your active prices, excluding [inline prices](/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set `active` to false. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1148,128 +3142,366 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'meter': z.string().optional(), 'usage_type': z.enum(['licensed', 'metered']).optional() }).optional(), starting_after: z.string().optional(), type: z.enum(['one_time', 'recurring']).optional() }).parse), +/** + * Create a price + * + * Creates a new [Price](https://docs.stripe.com/api/prices) for an existing [Product](https://docs.stripe.com/api/products). The Price can be recurring or one-time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())), 'search': { +/** + * Search prices + * + * Search for prices you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$price': { +/** + * Retrieve a price + * + * Retrieves the price with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Price.parse(await json())), +/** + * Update a price + * + * Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Price.parse(await json())) } }, 'privacy': { 'redaction_jobs': { +/** + * List all redaction jobs + * + * Returns a list of redaction jobs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'canceling', 'created', 'failed', 'ready', 'redacting', 'succeeded', 'validating']).optional() }).parse), +/** + * Create a redaction job + * + * Creates a redaction job. When a job is created, it will start to validate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())), '$job': { +/** + * Retrieve a redaction job + * + * Retrieves the details of a previously created redaction job. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())), +/** + * Update a redaction job + * + * Updates the properties of a redaction job without running or canceling the job. + * + * If the job to update is in a `failed` status, it will not automatically start to validate. Once you applied all of the changes, use the validate API to start validation again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())), 'cancel': { +/** + * Cancel a redaction job + * + * You can cancel a redaction job when it’s in one of these statuses: `ready`, `failed`. + * + * Canceling the redaction job will abandon its attempt to redact the configured objects. A canceled job cannot be used again. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())) }, 'run': { +/** + * Run a redaction job + * + * Run a redaction job in a `ready` status. + * + * When you run a job, the configured objects will be redacted asynchronously. This action is irreversible and cannot be canceled once started. + * + * The status of the job will move to `redacting`. Once all of the objects are redacted, the status will become `succeeded`. If the job’s `validation_behavior` is set to `fix`, the automatic fixes will be applied to objects at this step. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())) }, 'validate': { +/** + * Validate a redaction job + * + * Validate a redaction job when it is in a `failed` status. + * + * When a job is created, it automatically begins to validate on the configured objects’ eligibility for redaction. Use this to validate the job again after its validation errors are resolved or the job’s `validation_behavior` is changed. + * + * The status of the job will move to `validating`. Once all of the objects are validated, the status of the job will become `ready`. If there are any validation errors preventing the job from running, the status will become `failed`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PrivacyRedactionJob.parse(await json())) }, 'validation_errors': { +/** + * List all validation errors + * + * Returns a list of validation errors for the specified redaction job. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } } }, 'products': { +/** + * List all products + * + * Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), ids: z.array(z.string()).optional(), limit: z.number().int().optional(), shippable: z.boolean().optional(), starting_after: z.string().optional(), type: z.enum(['good', 'service']).optional(), url: z.string().optional() }).parse), +/** + * Create a product + * + * Creates a new product object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())), 'search': { +/** + * Search products + * + * Search for products you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$id': { +/** + * Delete a product + * + * Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with `type=good` is only possible if it has no SKUs associated with it. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProduct.parse(await json())), +/** + * Retrieve a product + * + * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Product.parse(await json())), +/** + * Update a product + * + * Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Product.parse(await json())) }, '$product': { 'features': { +/** + * List all features attached to a product + * + * Retrieve a list of features for a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Attach a feature to a product + * + * Creates a product_feature, which represents a feature attachment to a product + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ProductFeature.parse(await json())), '$id': { +/** + * Remove a feature from a product + * + * Deletes the feature attachment to a product + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedProductFeature.parse(await json())), +/** + * Retrieve a product_feature + * + * Retrieves a product_feature, which represents a feature attachment to a product + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ProductFeature.parse(await json())) } } } }, 'promotion_codes': { +/** + * List all promotion codes + * + * Returns a list of your promotion codes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), code: z.string().optional(), coupon: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a promotion code + * + * A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())), '$promotion_code': { +/** + * Retrieve a promotion code + * + * Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing `code` use [list](/docs/api/promotion_codes/list) with the desired `code`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.PromotionCode.parse(await json())), +/** + * Update a promotion code + * + * Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PromotionCode.parse(await json())) } }, 'quotes': { +/** + * List all quotes + * + * Returns a list of your quotes. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), from_subscription: z.string().optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['accepted', 'accepting', 'canceled', 'draft', 'open', 'stale']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a quote + * + * A quote models prices and services for a customer. Default options for `header`, `description`, `footer`, and `expires_at` can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), '$quote': { +/** + * Retrieve a quote + * + * Retrieves the quote with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Quote.parse(await json())), +/** + * Update a quote + * + * A quote models prices and services for a customer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())), 'accept': { +/** + * Accept a quote + * + * Accepts the specified quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'cancel': { +/** + * Cancel a quote + * + * Cancels the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'computed_upfront_line_items': { +/** + * Retrieve a quote's upfront line items + * + * When retrieving a quote, there is an includable [**computed.upfront.line_items**](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'finalize': { +/** + * Finalize a quote + * + * Finalizes the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'line_items': { +/** + * Retrieve a quote's line items + * + * When retrieving a quote, there is an includable **line_items** property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'lines': { +/** + * Retrieve a quote's lines + * + * Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'mark_draft': { +/** + * Convert a quote to draft + * + * Converts a stale quote to draft. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'mark_stale': { +/** + * Convert a quote to stale + * + * Converts a draft or open quote to stale. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) }, 'pdf': { +/** + * Download quote PDF + * + * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse) }, 'preview_invoices': { +/** + * Retrieve a quote's preview invoices + * + * Preview the invoices that would be generated by accepting the quote. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$preview_invoice': { 'lines': { +/** + * Retrieve a quote's preview invoice line items + * + * Preview the invoice line items that would be generated by accepting the quote. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'preview_subscription_schedules': { +/** + * Retrieve a quote's preview schedules + * + * Preview the schedules that would be generated by accepting the quote + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'reestimate': { +/** + * Reestimate a quote + * + * Recompute the upcoming invoice estimate for the quote. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Quote.parse(await json())) } } }, 'radar': { 'early_fraud_warnings': { +/** + * List all early fraud warnings + * + * Returns a list of early fraud warnings. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1277,74 +3509,195 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), '$early_fraud_warning': { +/** + * Retrieve an early fraud warning + * + * Retrieves the details of an early fraud warning that has previously been created. + * + * Please refer to the [early fraud warning](#early_fraud_warning_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarEarlyFraudWarning.parse(await json())) } }, 'value_list_items': { +/** + * List all value list items + * + * Returns a list of `ValueListItem` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), value: z.string().optional(), value_list: z.string() }).parse), +/** + * Create a value list item + * + * Creates a new `ValueListItem` object, which is added to the specified parent value list. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())), '$item': { +/** + * Delete a value list item + * + * Deletes a `ValueListItem` object, removing it from its parent value list. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueListItem.parse(await json())), +/** + * Retrieve a value list item + * + * Retrieves a `ValueListItem` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueListItem.parse(await json())) } }, 'value_lists': { +/** + * List all value lists + * + * Returns a list of `ValueList` objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ alias: z.string().optional(), contains: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a value list + * + * Creates a new `ValueList` object, which can then be referenced in rules. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())), '$value_list': { +/** + * Delete a value list + * + * Deletes a `ValueList` object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedRadarValueList.parse(await json())), +/** + * Retrieve a value list + * + * Retrieves a `ValueList` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.RadarValueList.parse(await json())), +/** + * Update a value list + * + * Updates a `ValueList` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that `item_type` is immutable. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.RadarValueList.parse(await json())) } } }, 'refunds': { +/** + * List all refunds + * + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ charge: z.string().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_intent: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create customer balance refund + * + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. + * + * You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), '$refund': { +/** + * Retrieve a refund + * + * Retrieves the details of an existing refund. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Refund.parse(await json())), +/** + * Update a refund + * + * Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged. + * + * This request only accepts `metadata` as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())), 'cancel': { +/** + * Cancel a refund + * + * Cancels a refund with a status of `requires_action`. + * + * You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the `requires_action` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } }, 'reporting': { 'report_runs': { +/** + * List all Report Runs + * + * Returns a list of Report Runs, with the most recent appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Report Run + * + * Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())), '$report_run': { +/** + * Retrieve a Report Run + * + * Retrieves the details of an existing Report Run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportRun.parse(await json())) } }, 'report_types': { +/** + * List all Report Types + * + * Returns a full list of Report Types. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), '$report_type': { +/** + * Retrieve a Report Type + * + * Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ReportingReportType.parse(await json())) } } }, 'reviews': { +/** + * List all open reviews + * + * Returns a list of `Review` objects that have `open` set to `true`. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1352,13 +3705,28 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$review': { +/** + * Retrieve a review + * + * Retrieves a `Review` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Review.parse(await json())), 'approve': { +/** + * Approve a review + * + * Approves a `Review` object, closing it and removing it from the list of reviews. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Review.parse(await json())) } } }, 'setup_attempts': { +/** + * List all SetupAttempts + * + * Returns a list of SetupAttempts that associate with a provided SetupIntent. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1367,71 +3735,211 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), setup_intent: z.string(), starting_after: z.string().optional() }).parse) }, 'setup_intents': { +/** + * List all SetupIntents + * + * Returns a list of SetupIntents. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ attach_to_self: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payment_method: z.string().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a SetupIntent + * + * Creates a SetupIntent object. + * + * After you create the SetupIntent, attach a payment method and [confirm](/docs/api/setup_intents/confirm) + * it to collect any required permissions to charge the payment method later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), '$intent': { +/** + * Retrieve a SetupIntent + * + * Retrieves the details of a SetupIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the `client_secret` is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](#setup_intent_object) object reference for more details. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SetupIntent.parse(await json())), +/** + * Update a SetupIntent + * + * Updates a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())), 'cancel': { +/** + * Cancel a SetupIntent + * + * You can cancel a SetupIntent object when it’s in one of these statuses: `requires_payment_method`, `requires_confirmation`, or `requires_action`. + * + * After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can’t cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](/docs/api/checkout/sessions/expire) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'confirm': { +/** + * Confirm a SetupIntent + * + * Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website. + * + * If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * `succeeded` status. + * + * Otherwise, it will transition to the `requires_action` status and + * suggest additional actions via `next_action`. If setup fails, + * the SetupIntent will transition to the + * `requires_payment_method` status or the `canceled` status if the + * confirmation limit is reached. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) }, 'verify_microdeposits': { +/** + * Verify microdeposits on a SetupIntent + * + * Verifies microdeposits on a SetupIntent object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SetupIntent.parse(await json())) } } }, 'shipping_rates': { +/** + * List all shipping rates + * + * Returns a list of your shipping rates. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), currency: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a shipping rate + * + * Creates a new shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())), '$shipping_rate_token': { +/** + * Retrieve a shipping rate + * + * Returns the shipping rate object with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ShippingRate.parse(await json())), +/** + * Update a shipping rate + * + * Updates an existing shipping rate object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ShippingRate.parse(await json())) } }, 'sigma': { 'scheduled_query_runs': { +/** + * List all scheduled query runs + * + * Returns a list of scheduled query runs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$scheduled_query_run': { +/** + * Retrieve a scheduled query run + * + * Retrieves the details of an scheduled query run. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.ScheduledQueryRun.parse(await json())) } } }, 'sources': { +/** + * Shares a source + * + * Creates a new source object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), '$source': { +/** + * Retrieve a source + * + * Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ client_secret: z.string().optional(), expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Source.parse(await json())), +/** + * Update a source + * + * Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts the `metadata` and `owner` as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](/docs/sources) for more detail. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())), 'source_transactions': { +/** + * List source transactions for a given source. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) }, 'verify': { +/** + * Verify a given source. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Source.parse(await json())) } } }, 'subscription_items': { +/** + * List all subscription items + * + * Returns a list of your subscription items for a given subscription. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), subscription: z.string() }).parse), +/** + * Create a subscription item + * + * Adds a new item to an existing subscription. No existing items will be changed or replaced. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), '$item': { +/** + * Delete a subscription item + * + * Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedSubscriptionItem.parse(await json())), +/** + * Retrieve a subscription item + * + * Retrieves the subscription item with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())), +/** + * Update a subscription item + * + * Updates the plan or quantity of an item on a current subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionItem.parse(await json())) } }, 'subscription_schedules': { +/** + * List all schedules + * + * Retrieves the list of your subscription schedules. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ canceled_at: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1453,22 +3961,57 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), scheduled: z.boolean().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a schedule + * + * Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), '$schedule': { +/** + * Retrieve a schedule + * + * Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), +/** + * Update a schedule + * + * Updates an existing subscription schedule. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())), 'amend': { +/** + * Amend a schedule + * + * Amends an existing subscription schedule. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) }, 'cancel': { +/** + * Cancel a schedule + * + * Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is `not_started` or `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) }, 'release': { +/** + * Release a schedule + * + * Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is `not_started` or `active`. If the subscription schedule is currently associated with a subscription, releasing it will remove its `subscription` property and set the subscription’s ID to the `released_subscription` property. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.SubscriptionSchedule.parse(await json())) } } }, 'subscriptions': { +/** + * List subscriptions + * + * By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify `status=canceled`. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ automatic_tax: z.object({ 'enabled': z.boolean() }).optional(), collection_method: z.enum(['charge_automatically', 'send_invoice']).optional(), created: z.union([z.object({ @@ -1487,26 +4030,104 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), customer_account: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), plan: z.string().optional(), price: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']).optional(), test_clock: z.string().optional() }).parse), +/** + * Create a subscription + * + * Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. + * + * When you create a subscription with `collection_method=charge_automatically`, the first invoice is finalized as part of the request. + * The `payment_behavior` parameter determines the exact behavior of the initial payment. + * + * To start subscriptions where the first invoice always begins in a `draft` status, use [subscription schedules](/docs/billing/subscriptions/subscription-schedules#managing) instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'search': { +/** + * Search subscriptions + * + * Search for subscriptions you’ve previously created using Stripe’s [Search Query Language](/docs/search#search-query-language). + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), limit: z.number().int().optional(), page: z.string().optional(), query: z.string() }).parse) }, '$subscription_exposed_id': { +/** + * Cancel a subscription + * + * Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its [metadata](/metadata). + * + * Any pending invoice items that you’ve created are still charged at the end of the period, unless manually [deleted](#delete_invoiceitem). If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if `invoice_now` and `prorate` are both set to true. + * + * By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Retrieve a subscription + * + * Retrieves the subscription with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Subscription.parse(await json())), +/** + * Update a subscription + * + * Updates an existing subscription to match the specified parameters. + * When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + * To preview how the proration is calculated, use the [create preview](/docs/api/invoices/create_preview) endpoint. + * + * By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. + * + * Switching prices does not normally change the billing date or generate an immediate charge unless: + * + * - The billing interval is changed (for example, from monthly to yearly). + * + * - The subscription moves from free to paid. + * + * - A trial starts or ends. + * + * In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). + * + * If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass `create_prorations`, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually [invoice the customer](/docs/api/invoices/create). + * + * If you don’t want to prorate, set the `proration_behavior` option to `none`. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription. + * + * Updating the quantity on a subscription many times in an hour may result in [rate limiting](/docs/rate-limits). If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](/docs/billing/subscriptions/usage-based) instead. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())), 'discount': { +/** + * Delete a subscription discount + * + * Removes the currently applied discount on a subscription. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedDiscount.parse(await json())) } }, '$subscription': { 'attach_cadence': { +/** + * Attach a Billing Cadence + * + * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) }, 'migrate': { +/** + * Migrate a subscription + * + * Upgrade the billing_mode of an existing subscription. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) }, 'resume': { +/** + * Resume a subscription + * + * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become `active`, and if payment fails the subscription will be `past_due`. The resumption invoice will void automatically if not paid by the expiration date. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Subscription.parse(await json())) } } @@ -1514,149 +4135,417 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'tax': { 'associations': { 'find': { +/** + * Find a Tax Association + * + * Finds a tax association object by PaymentIntent id. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional(), payment_intent: z.string() }).parse).def_response(async ({ json }) => Model.TaxAssociation.parse(await json())) } }, 'calculations': { +/** + * Create a Tax Calculation + * + * Calculates tax based on the input and returns a Tax `Calculation` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), '$calculation': { +/** + * Retrieve a Tax Calculation + * + * Retrieves a Tax `Calculation` object, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCalculation.parse(await json())), 'line_items': { +/** + * Retrieve a calculation's line items + * + * Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } }, 'forms': { +/** + * List all tax forms + * + * Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), payee: z.object({ 'account': z.string().optional(), 'external_reference': z.string().optional(), 'type': z.enum(['account', 'external_reference']).optional() }), starting_after: z.string().optional(), type: z.enum(['au_serr', 'ca_mrdp', 'eu_dac7', 'gb_mrdp', 'nz_mrdp', 'us_1099_k', 'us_1099_misc', 'us_1099_nec']).optional() }).parse), '$id': { +/** + * Retrieve a tax form + * + * Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxForm.parse(await json())), 'pdf': { +/** + * Download tax form PDF + * + * Download the PDF for a tax form. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse) } } }, 'registrations': { +/** + * List registrations + * + * Returns a list of Tax `Registration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['active', 'all', 'expired', 'scheduled']).optional() }).parse), +/** + * Create a registration + * + * Creates a new Tax `Registration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), '$id': { +/** + * Retrieve a registration + * + * Returns a Tax `Registration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRegistration.parse(await json())), +/** + * Update a registration + * + * Updates an existing Tax `Registration` object. + * + * A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting `expires_at`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRegistration.parse(await json())) } }, 'settings': { +/** + * Retrieve settings + * + * Retrieves Tax `Settings` for a merchant. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxSettings.parse(await json())), +/** + * Update settings + * + * Updates Tax `Settings` parameters used in tax calculations. All parameters are editable but none can be removed once set. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxSettings.parse(await json())) }, 'transactions': { 'create_from_calculation': { +/** + * Create a transaction from a calculation + * + * Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, 'create_reversal': { +/** + * Create a reversal transaction + * + * Partially or fully reverses a previously created `Transaction`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxTransaction.parse(await json())) }, '$transaction': { +/** + * Retrieve a transaction + * + * Retrieves a Tax `Transaction` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxTransaction.parse(await json())), 'line_items': { +/** + * Retrieve a transaction's line items + * + * Retrieves the line items of a committed standalone transaction as a collection. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse) } } } }, 'tax_codes': { +/** + * List all tax codes + * + * A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), '$id': { +/** + * Retrieve a tax code + * + * Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxCode.parse(await json())) } }, 'tax_ids': { +/** + * List all tax IDs + * + * Returns a list of tax IDs. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), owner: z.object({ 'account': z.string().optional(), 'customer': z.string().optional(), 'customer_account': z.string().optional(), 'type': z.enum(['account', 'application', 'customer', 'self']) }).optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax ID + * + * Creates a new account or customer `tax_id` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxId.parse(await json())), '$id': { +/** + * Delete a tax ID + * + * Deletes an existing account or customer `tax_id` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTaxId.parse(await json())), +/** + * Retrieve a tax ID + * + * Retrieves an account or customer `tax_id` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxId.parse(await json())) } }, 'tax_rates': { +/** + * List all tax rates + * + * Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ active: z.boolean().optional(), created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), inclusive: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a tax rate + * + * Creates a new tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())), '$tax_rate': { +/** + * Retrieve a tax rate + * + * Retrieves a tax rate with the given ID + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TaxRate.parse(await json())), +/** + * Update a tax rate + * + * Updates an existing tax rate. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TaxRate.parse(await json())) } }, 'terminal': { 'configurations': { +/** + * List all Configurations + * + * Returns a list of `Configuration` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), is_account_default: z.boolean().optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Configuration + * + * Creates a new `Configuration` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConfiguration.parse(await json())), '$configuration': { +/** + * Delete a Configuration + * + * Deletes a `Configuration` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalConfiguration.parse(await json())), +/** + * Retrieve a Configuration + * + * Retrieves a `Configuration` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Configuration + * + * Updates a new `Configuration` object. + */ 'POST': f.builder().def_json() } }, 'connection_tokens': { +/** + * Create a Connection Token + * + * To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalConnectionToken.parse(await json())) }, 'locations': { +/** + * List all Locations + * + * Returns a list of `Location` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a Location + * + * Creates a new `Location` object. + * For further details, including which address fields are required in each country, see the [Manage locations](/docs/terminal/fleet/locations) guide. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalLocation.parse(await json())), '$location': { +/** + * Delete a Location + * + * Deletes a `Location` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalLocation.parse(await json())), +/** + * Retrieve a Location + * + * Retrieves a `Location` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Location + * + * Updates a `Location` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json() } }, 'onboarding_links': { +/** + * Create an Onboarding Link + * + * Creates a new `OnboardingLink` object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalOnboardingLink.parse(await json())) }, 'reader_collected_data': { '$reader_collected_data': { +/** + * Retrieve ReaderCollectedData + * + * Retrieve data collected using Reader hardware. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TerminalReaderCollectedData.parse(await json())) } }, 'readers': { +/** + * List all Readers + * + * Returns a list of `Reader` objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ device_type: z.enum(['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'verifone_P400']).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), location: z.string().optional(), serial_number: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['offline', 'online']).optional() }).parse), +/** + * Create a Reader + * + * Creates a new `Reader` object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())), '$reader': { +/** + * Delete a Reader + * + * Deletes a `Reader` object. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTerminalReader.parse(await json())), +/** + * Retrieve a Reader + * + * Retrieves a `Reader` object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse), +/** + * Update a Reader + * + * Updates a `Reader` object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + */ 'POST': f.builder().def_json(), 'cancel_action': { +/** + * Cancel the current reader action + * + * Cancels the current reader action. See [Programmatic Cancellation](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_inputs': { +/** + * Collect inputs using a Reader + * + * Initiates an [input collection flow](/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'collect_payment_method': { +/** + * Hand off a PaymentIntent to a Reader and collect card details + * + * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'confirm_payment_intent': { +/** + * Confirm a PaymentIntent on the Reader + * + * Finalizes a payment on a Reader. See [Confirming a Payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_payment_intent': { +/** + * Hand-off a PaymentIntent to a Reader + * + * Initiates a payment flow on a Reader. See [process the payment](/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'process_setup_intent': { +/** + * Hand-off a SetupIntent to a Reader + * + * Initiates a SetupIntent flow on a Reader. See [Save directly without charging](/docs/terminal/features/saving-payment-details/save-directly) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'refund_payment': { +/** + * Refund a Charge or a PaymentIntent in-person + * + * Initiates an in-person refund on a Reader. See [Refund an Interac Payment](/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'set_reader_display': { +/** + * Set reader display + * + * Sets the reader display to show [cart details](/docs/terminal/features/display). + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } @@ -1666,6 +4555,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'payment_intents': { '$intent': { 'trigger_action': { +/** + * Trigger an external action on a PaymentIntent. + * + * Trigger an external action on a PaymentIntent. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.PaymentIntent.parse(await json())) } } @@ -1673,37 +4567,82 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'test_helpers': { 'confirmation_tokens': { +/** + * Create a test Confirmation Token + * + * Creates a test mode Confirmation Token server side for your integration tests. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ConfirmationToken.parse(await json())) }, 'customers': { '$customer': { 'fund_cash_balance': { +/** + * Fund a test mode cash balance + * + * Create an incoming testmode bank transfer + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.CustomerCashBalanceTransaction.parse(await json())) } } }, 'issuing': { 'authorizations': { +/** + * Create a test-mode authorization + * + * Create a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())), '$authorization': { 'capture': { +/** + * Capture a test-mode authorization + * + * Capture a test-mode authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'expire': { +/** + * Expire a test-mode authorization + * + * Expire a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'finalize_amount': { +/** + * Finalize a test-mode authorization's amount + * + * Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'fraud_challenges': { 'respond': { +/** + * Respond to fraud challenge + * + * Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } }, 'increment': { +/** + * Increment a test-mode authorization + * + * Increment a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) }, 'reverse': { +/** + * Reverse a test-mode authorization + * + * Reverse a test-mode Authorization. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingAuthorization.parse(await json())) } } @@ -1712,18 +4651,43 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { '$card': { 'shipping': { 'deliver': { +/** + * Deliver a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `delivered`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'fail': { +/** + * Fail a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `failure`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'return': { +/** + * Return a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `returned`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'ship': { +/** + * Ship a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `shipped`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) }, 'submit': { +/** + * Submit a testmode card + * + * Updates the shipping status of the specified Issuing `Card` object to `submitted`. This method requires Stripe Version ‘2024-09-30.acacia’ or later. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingCard.parse(await json())) } } @@ -1732,25 +4696,55 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'personalization_designs': { '$personalization_design': { 'activate': { +/** + * Activate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `active`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'deactivate': { +/** + * Deactivate a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `inactive`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) }, 'reject': { +/** + * Reject a testmode personalization design + * + * Updates the `status` of the specified testmode personalization design object to `rejected`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingPersonalizationDesign.parse(await json())) } } }, 'transactions': { 'create_force_capture': { +/** + * Create a test-mode force capture + * + * Allows the user to capture an arbitrary amount, also known as a forced capture. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, 'create_unlinked_refund': { +/** + * Create a test-mode unlinked refund + * + * Allows the user to refund an arbitrary amount, also known as a unlinked refund. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) }, '$transaction': { 'refund': { +/** + * Refund a test-mode transaction + * + * Refund a test-mode Transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.IssuingTransaction.parse(await json())) } } @@ -1759,6 +4753,11 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'refunds': { '$refund': { 'expire': { +/** + * Expire a pending refund. + * + * Expire a refund with a status of `requires_action`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Refund.parse(await json())) } } @@ -1767,24 +4766,64 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'readers': { '$reader': { 'present_payment_method': { +/** + * Simulate presenting a payment method + * + * Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'succeed_input_collection': { +/** + * Simulate a successful input collection + * + * Use this endpoint to trigger a successful input collection on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) }, 'timeout_input_collection': { +/** + * Simulate an input collection timeout + * + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TerminalReader.parse(await json())) } } } }, 'test_clocks': { +/** + * List all test clocks + * + * Returns a list of your test clocks. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a test clock + * + * Creates a new test clock that can be attached to new customers and quotes. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), '$test_clock': { +/** + * Delete a test clock + * + * Deletes a test clock. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedTestHelpersTestClock.parse(await json())), +/** + * Retrieve a test clock + * + * Retrieves a test clock. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())), 'advance': { +/** + * Advance a test clock + * + * Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to `Ready`. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TestHelpersTestClock.parse(await json())) } } @@ -1793,53 +4832,124 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'inbound_transfers': { '$id': { 'fail': { +/** + * Test mode: Fail an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `failed` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an InboundTransfer + * + * Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the `succeeded` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, 'succeed': { +/** + * Test mode: Succeed an InboundTransfer + * + * Transitions a test mode created InboundTransfer to the `succeeded` status. The InboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { '$id': { +/** + * Test mode: Update an OutboundPayment + * + * Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `failed` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundPayment + * + * Transitions a test mode created OutboundPayment to the `returned` status. The OutboundPayment must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { '$outbound_transfer': { +/** + * Test mode: Update an OutboundTransfer + * + * Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the `canceled` or `failed` states. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'fail': { +/** + * Test mode: Fail an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `failed` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) }, 'return': { +/** + * Test mode: Return an OutboundTransfer + * + * Transitions a test mode created OutboundTransfer to the `returned` status. The OutboundTransfer must already be in the `processing` state. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * Test mode: Create a ReceivedCredit + * + * Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) }, 'received_debits': { +/** + * Test mode: Create a ReceivedDebit + * + * Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } } }, 'tokens': { +/** + * Create a CVC update token + * + * Creates a single-use token that represents a bank account’s details. + * You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](#accounts) where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Token.parse(await json())), '$token': { +/** + * Retrieve a token + * + * Retrieves the token with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Token.parse(await json())) } }, 'topups': { +/** + * List all top-ups + * + * Returns a list of top-ups. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ amount: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1851,35 +4961,103 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'pending', 'succeeded']).optional() }).parse), +/** + * Create a top-up + * + * Top up the balance of an account + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), '$topup': { +/** + * Retrieve a top-up + * + * Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Topup.parse(await json())), +/** + * Update a top-up + * + * Updates the metadata of a top-up. Other top-up details are not editable by design. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())), 'cancel': { +/** + * Cancel a top-up + * + * Cancels a top-up. Only pending top-ups can be canceled. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Topup.parse(await json())) } } }, 'transfers': { +/** + * List all transfers + * + * Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), destination: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), transfer_group: z.string().optional() }).parse), +/** + * Create a transfer + * + * To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](#balance) must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), '$id': { 'reversals': { +/** + * List all reversals + * + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional reversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a transfer reversal + * + * When you create a new reversal, you must specify a transfer to create it on. + * + * When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. + * + * Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } }, '$transfer': { +/** + * Retrieve a transfer + * + * Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.Transfer.parse(await json())), +/** + * Update a transfer + * + * Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request accepts only metadata as an argument. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.Transfer.parse(await json())), 'reversals': { '$id': { +/** + * Retrieve a reversal + * + * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TransferReversal.parse(await json())), +/** + * Update a reversal + * + * Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata and description as arguments. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TransferReversal.parse(await json())) } } @@ -1887,91 +5065,241 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }, 'treasury': { 'credit_reversals': { +/** + * List all CreditReversals + * + * Returns a list of CreditReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_credit: z.string().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'posted', 'processing']).optional() }).parse), +/** + * Create a CreditReversal + * + * Reverses a ReceivedCredit and creates a CreditReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())), '$credit_reversal': { +/** + * Retrieve a CreditReversal + * + * Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryCreditReversal.parse(await json())) } }, 'debit_reversals': { +/** + * List all DebitReversals + * + * Returns a list of DebitReversals. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), received_debit: z.string().optional(), resolution: z.enum(['lost', 'won']).optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'completed', 'processing']).optional() }).parse), +/** + * Create a DebitReversal + * + * Reverses a ReceivedDebit and creates a DebitReversal object. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())), '$debit_reversal': { +/** + * Retrieve a DebitReversal + * + * Retrieves a DebitReversal object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryDebitReversal.parse(await json())) } }, 'financial_accounts': { +/** + * List all FinancialAccounts + * + * Returns a list of FinancialAccounts. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['closed', 'open']).optional() }).parse), +/** + * Create a FinancialAccount + * + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), '$financial_account': { +/** + * Retrieve a FinancialAccount + * + * Retrieves the details of a FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), +/** + * Update a FinancialAccount + * + * Updates the details of a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())), 'close': { +/** + * Close a FinancialAccount + * + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccount.parse(await json())) }, 'features': { +/** + * Retrieve FinancialAccount Features + * + * Retrieves Features information associated with the FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())), +/** + * Update FinancialAccount Features + * + * Updates the Features associated with a FinancialAccount. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryFinancialAccountFeatures.parse(await json())) } } }, 'inbound_transfers': { +/** + * List all InboundTransfers + * + * Returns a list of InboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'processing', 'succeeded']).optional() }).parse), +/** + * Create an InboundTransfer + * + * Creates an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())), '$id': { +/** + * Retrieve an InboundTransfer + * + * Retrieves the details of an existing InboundTransfer. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) }, '$inbound_transfer': { 'cancel': { +/** + * Cancel an InboundTransfer + * + * Cancels an InboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryInboundTransfer.parse(await json())) } } }, 'outbound_payments': { +/** + * List all OutboundPayments + * + * Returns a list of OutboundPayments sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), 'lt': z.number().int().optional(), 'lte': z.number().int().optional() }), z.number().int()]).optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundPayment + * + * Creates an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), '$id': { +/** + * Retrieve an OutboundPayment + * + * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())), 'cancel': { +/** + * Cancel an OutboundPayment + * + * Cancel an OutboundPayment. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundPayment.parse(await json())) } } }, 'outbound_transfers': { +/** + * List all OutboundTransfers + * + * Returns a list of OutboundTransfers sent from the specified FinancialAccount. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['canceled', 'failed', 'posted', 'processing', 'returned']).optional() }).parse), +/** + * Create an OutboundTransfer + * + * Creates an OutboundTransfer. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), '$outbound_transfer': { +/** + * Retrieve an OutboundTransfer + * + * Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())), 'cancel': { +/** + * Cancel an OutboundTransfer + * + * An OutboundTransfer can be canceled if the funds have not yet been paid out. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.TreasuryOutboundTransfer.parse(await json())) } } }, 'received_credits': { +/** + * List all ReceivedCredits + * + * Returns a list of ReceivedCredits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), linked_flows: z.object({ 'source_flow_type': z.enum(['credit_reversal', 'other', 'outbound_payment', 'outbound_transfer', 'payout']) }).optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedCredit + * + * Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedCredit.parse(await json())) } }, 'received_debits': { +/** + * List all ReceivedDebits + * + * Returns a list of ReceivedDebits. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), starting_after: z.string().optional(), status: z.enum(['failed', 'succeeded']).optional() }).parse), '$id': { +/** + * Retrieve a ReceivedDebit + * + * Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryReceivedDebit.parse(await json())) } }, 'transaction_entries': { +/** + * List all TransactionEntries + * + * Retrieves a list of TransactionEntry objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -1984,10 +5312,20 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'lte': z.number().int().optional() }), z.number().int()]).optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), financial_account: z.string(), limit: z.number().int().optional(), order_by: z.enum(['created', 'effective_at']).optional(), starting_after: z.string().optional(), transaction: z.string().optional() }).parse), '$id': { +/** + * Retrieve a TransactionEntry + * + * Retrieves a TransactionEntry object. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransactionEntry.parse(await json())) } }, 'transactions': { +/** + * List all Transactions + * + * Retrieves a list of Transaction objects. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ created: z.union([z.object({ 'gt': z.number().int().optional(), 'gte': z.number().int().optional(), @@ -2002,16 +5340,46 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { }), z.number().int()]).optional() }).optional() }).parse), '$id': { +/** + * Retrieve a Transaction + * + * Retrieves the details of an existing Transaction. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.TreasuryTransaction.parse(await json())) } } }, 'webhook_endpoints': { +/** + * List all webhook endpoints + * + * Returns a list of your webhook endpoints. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.number().int().optional(), starting_after: z.string().optional() }).parse), +/** + * Create a webhook endpoint + * + * A webhook endpoint must have a `url` and a list of `enabled_events`. You may optionally specify the Boolean `connect` parameter. If set to true, then a Connect webhook endpoint that notifies the specified `url` about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified `url` only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), '$webhook_endpoint': { +/** + * Delete a webhook endpoint + * + * You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + */ 'DELETE': f.builder().def_json().def_response(async ({ json }) => Model.DeletedWebhookEndpoint.parse(await json())), +/** + * Retrieve a webhook endpoint + * + * Retrieves the webhook endpoint with the given ID. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ expand: z.array(z.string()).optional() }).parse).def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())), +/** + * Update a webhook endpoint + * + * Updates the webhook endpoint. You may edit the `url`, the list of `enabled_events`, and the status of your endpoint. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.WebhookEndpoint.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/models.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/models.ts index 9dcb27a..356a880 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/models.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe_3/models.ts @@ -3,189 +3,635 @@ import { z } from 'zod'; // Helper types for schemas export type AccountAnnualRevenueModel = { + /** + * A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount': number; + /** + * 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; + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + */ 'fiscal_year_end': string; }; export type AccountMonthlyEstimatedRevenueModel = { + /** + * A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + */ 'amount': number; + /** + * 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; }; export type AddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; export type AccountBusinessProfileModel = { + /** + * The applicant's gross annual revenue for its preceding fiscal year. + */ 'annual_revenue'?: AccountAnnualRevenueModel | undefined; + /** + * An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + */ 'estimated_worker_count'?: number | undefined; + /** + * [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + */ 'mcc': string; + /** + * Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. + */ 'minority_owned_business_designation': Array<'lgbtqi_owned_business' | 'minority_owned_business' | 'none_of_these_apply' | 'prefer_not_to_answer' | 'women_owned_business'>; 'monthly_estimated_revenue'?: AccountMonthlyEstimatedRevenueModel | undefined; + /** + * The customer-facing business name. + */ 'name': string; + /** + * Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + */ 'product_description'?: string | undefined; + /** + * A link to the business's publicly available terms related to the Specified Commercial Transaction Act. Only used for accounts in Japan. + */ 'specified_commercial_transactions_act_url'?: string | undefined; + /** + * A publicly available mailing address for sending support issues to. + */ 'support_address': AddressModel; + /** + * A publicly available email address for sending support issues to. + */ 'support_email': string; + /** + * A publicly available phone number to call with support issues. + */ 'support_phone': string; + /** + * A publicly available website for handling support issues. + */ 'support_url': string; + /** + * The business's publicly available website. + */ 'url': string; }; export type AccountCapabilitiesModel = { + /** + * The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + */ 'acss_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + */ 'affirm_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + */ 'afterpay_clearpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Alma capability of the account, or whether the account can directly process Alma payments. + */ 'alma_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + */ 'amazon_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + */ 'au_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the automatic_indirect_tax capability of the account. + */ 'automatic_indirect_tax'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + */ 'bacs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + */ 'bancontact_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + */ 'bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Billie capability of the account, or whether the account can directly process Billie payments. + */ 'billie_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the blik payments capability of the account, or whether the account can directly process blik charges. + */ 'blik_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + */ 'boleto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + */ 'card_issuing'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + */ 'card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + */ 'cartes_bancaires_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + */ 'cashapp_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + */ 'crypto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + */ 'eps_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + */ 'fpx_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + */ 'gb_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + */ 'giropay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. + */ 'gopay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + */ 'grabpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. + */ 'id_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of Bank BCA onboarding of the account. + */ 'id_bank_transfer_payments_bca'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + */ 'ideal_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + */ 'india_international_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + */ 'jcb_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + */ 'jp_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + */ 'kakao_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + */ 'klarna_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + */ 'konbini_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + */ 'kr_card_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the legacy payments capability of the account. + */ 'legacy_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the link_payments capability of the account, or whether the account can directly process Link charges. + */ 'link_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. + */ 'mb_way_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + */ 'mobilepay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + */ 'multibanco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + */ 'mx_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + */ 'naver_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges. + */ 'nz_bank_account_becs_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + */ 'oxxo_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + */ 'p24_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges. + */ 'pay_by_bank_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Payco capability of the account, or whether the account can directly process Payco payments. + */ 'payco_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + */ 'paynow_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. + */ 'paypal_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Paypay capability of the account, or whether the account can directly process Paypay payments. + */ 'paypay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. + */ 'payto_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the pix payments capability of the account, or whether the account can directly process pix charges. + */ 'pix_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + */ 'promptpay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Qris capability of the account, or whether the account can directly process Qris payments. + */ 'qris_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. + */ 'rechnung_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + */ 'revolut_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + */ 'samsung_pay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Satispay capability of the account, or whether the account can directly process Satispay payments. + */ 'satispay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + */ 'sepa_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + */ 'sepa_debit_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. + */ 'shopeepay_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + */ 'sofort_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the stripe_balance payments capability of the account, or whether the account can directly process stripe_balance charges. + */ 'stripe_balance_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Swish capability of the account, or whether the account can directly process Swish payments. + */ 'swish_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-K (US) capability of the account. + */ 'tax_reporting_us_1099_k'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the tax reporting 1099-MISC (US) capability of the account. + */ 'tax_reporting_us_1099_misc'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + */ 'transfers'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the banking capability, or whether the account can have bank accounts. + */ 'treasury'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the treasury_evolve capability of the account. + */ 'treasury_evolve'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the treasury_fifth_third capability of the account. + */ 'treasury_fifth_third'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the treasury_goldman_sachs capability of the account. + */ 'treasury_goldman_sachs'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + */ 'twint_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + */ 'us_bank_account_ach_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + */ 'us_bank_transfer_payments'?: 'active' | 'inactive' | 'pending' | undefined; + /** + * The status of the Zip capability of the account, or whether the account can directly process Zip charges. + */ 'zip_payments'?: 'active' | 'inactive' | 'pending' | undefined; }; export type LegalEntityJapanAddressModel = { + /** + * City/Ward. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Block/Building number. + */ 'line1': string; + /** + * Building details. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * Prefecture. + */ 'state': string; + /** + * Town/cho-me. + */ 'town': string; }; export type LegalEntityDirectorshipDeclarationModel = { + /** + * The Unix timestamp marking when the directorship declaration attestation was made. + */ 'date': number; + /** + * The IP address from which the directorship declaration attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the directorship declaration attestation was made. + */ 'user_agent': string; }; export type LegalEntityUboDeclarationModel = { + /** + * The Unix timestamp marking when the beneficial owner attestation was made. + */ 'date': number; + /** + * The IP address from which the beneficial owner attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the beneficial owner attestation was made. + */ 'user_agent': string; }; export type LegalEntityRegistrationDateModel = { + /** + * The day of registration, between 1 and 31. + */ 'day': number; + /** + * The month of registration, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of registration. + */ 'year': number; }; export type LegalEntityRepresentativeDeclarationModel = { + /** + * The Unix timestamp marking when the representative declaration attestation was made. + */ 'date': number; + /** + * The IP address from which the representative declaration attestation was made. + */ 'ip': string; + /** + * The user-agent string from the browser where the representative declaration attestation was made. + */ 'user_agent': string; }; +/** + * To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that you can use to + * retrieve the contents of the file without authentication. + */ export type FileLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Returns if the link is already expired. + */ 'expired': boolean; + /** + * Time that the link expires. + */ 'expires_at': number; + /** + * The file object this link points to. + */ 'file': string | FileModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file_link'; + /** + * The publicly accessible URL to download the file. + */ 'url': string; }; +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export type FileModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The file expires and isn't available at this time in epoch seconds. + */ 'expires_at': number; + /** + * The suitable name for saving the file to a filesystem. + */ 'filename': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ 'links'?: { + /** + * Details about each object. + */ 'data': FileLinkModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'file'; + /** + * The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + */ 'purpose': 'account_requirement' | 'additional_verification' | 'business_icon' | 'business_logo' | 'customer_signature' | 'dispute_evidence' | 'document_provider_identity_document' | 'finance_report_run' | 'financial_account_statement' | 'identity_document' | 'identity_document_downloadable' | 'issuing_regulatory_reporting' | 'pci_document' | 'platform_terms_of_service' | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' | 'terminal_android_apk' | 'terminal_reader_splashscreen'; + /** + * The size of the file object in bytes. + */ 'size': number; + /** + * A suitable title for the document. + */ 'title': string; + /** + * The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + */ 'type': string; + /** + * Use your live secret API key to download the file from this URL. + */ 'url': string; }; export type LegalEntityCompanyVerificationDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'back': string | FileModel; + /** + * A user-displayable string describing the verification state of this document. + */ 'details': string; + /** + * One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + */ 'details_code': string; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file). + */ 'front': string | FileModel; }; @@ -195,48 +641,129 @@ export type LegalEntityCompanyVerificationModel = { export type LegalEntityCompanyModel = { 'address'?: AddressModel | undefined; + /** + * The Kana variation of the company's primary address (Japan only). + */ 'address_kana'?: LegalEntityJapanAddressModel | undefined; + /** + * The Kanji variation of the company's primary address (Japan only). + */ 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + */ 'directors_provided'?: boolean | undefined; + /** + * This hash is used to attest that the director information provided to Stripe is both current and correct. + */ 'directorship_declaration'?: LegalEntityDirectorshipDeclarationModel | undefined; + /** + * Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + */ 'executives_provided'?: boolean | undefined; + /** + * The export license ID number of the company, also referred as Import Export Code (India only). + */ 'export_license_id'?: string | undefined; + /** + * The purpose code to use for export transactions (India only). + */ 'export_purpose_code'?: string | undefined; + /** + * The company's legal name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name'?: string | undefined; + /** + * The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kana'?: string | undefined; + /** + * The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'name_kanji'?: string | undefined; + /** + * Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + */ 'owners_provided'?: boolean | undefined; + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + */ 'ownership_declaration'?: LegalEntityUboDeclarationModel | undefined; + /** + * This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + */ 'ownership_exemption_reason'?: 'qualified_entity_exceeds_ownership_threshold' | 'qualifies_as_financial_institution' | undefined; + /** + * The company's phone number (used for verification). + */ 'phone'?: string | undefined; 'registration_date'?: LegalEntityRegistrationDateModel | undefined; + /** + * This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + */ 'representative_declaration'?: LegalEntityRepresentativeDeclarationModel | undefined; + /** + * The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + */ 'structure'?: 'free_zone_establishment' | 'free_zone_llc' | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' | 'private_company' | 'private_corporation' | 'private_partnership' | 'public_company' | 'public_corporation' | 'public_partnership' | 'registered_charity' | 'single_member_llc' | 'sole_establishment' | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' | 'unincorporated_non_profit' | 'unincorporated_partnership' | undefined; + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided'?: boolean | undefined; + /** + * The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + */ 'tax_id_registrar'?: string | undefined; + /** + * Whether the company's business VAT number was provided. + */ 'vat_id_provided'?: boolean | undefined; + /** + * Information on the verification state of the company. + */ 'verification'?: LegalEntityCompanyVerificationModel | undefined; }; export type AccountUnificationAccountControllerApplicationModel = { + /** + * `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. + */ 'loss_liable': boolean; + /** + * `true` if the Connect application is responsible for onboarding the account. + */ 'onboarding_owner': boolean; + /** + * `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. + */ 'pricing_controls': boolean; }; export type AccountUnificationAccountControllerDashboardModel = { + /** + * Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). + */ 'type': 'express' | 'full' | 'none'; }; export type AccountUnificationAccountControllerFeesModel = { + /** + * A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + */ 'payer': 'account' | 'application' | 'application_custom' | 'application_express' | 'application_unified_accounts_beta'; }; export type AccountUnificationAccountControllerLossesModel = { + /** + * A value indicating who is liable when this account can't pay back negative balances from payments. + */ 'payments': 'application' | 'stripe'; }; export type AccountUnificationAccountControllerStripeDashboardModel = { + /** + * A value indicating the Stripe dashboard this account has access to independent of the Connect application. + */ 'type': 'express' | 'full' | 'none'; }; @@ -244,76 +771,229 @@ export type AccountUnificationAccountControllerModel = { 'application'?: AccountUnificationAccountControllerApplicationModel | undefined; 'dashboard'?: AccountUnificationAccountControllerDashboardModel | undefined; 'fees'?: AccountUnificationAccountControllerFeesModel | undefined; + /** + * `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + */ 'is_controller'?: boolean | undefined; 'losses'?: AccountUnificationAccountControllerLossesModel | undefined; + /** + * A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + */ 'requirement_collection'?: 'application' | 'stripe' | undefined; 'stripe_dashboard'?: AccountUnificationAccountControllerStripeDashboardModel | undefined; + /** + * The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + */ 'type': 'account' | 'application'; }; export type CustomerBalanceCustomerBalanceSettingsModel = { + /** + * The configuration for how funds that land in the customer cash balance are reconciled. + */ 'reconciliation_mode': 'automatic' | 'manual'; + /** + * A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + */ 'using_merchant_default': boolean; }; +/** + * A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ export type CashBalanceModel = { + /** + * A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'available': { [key: string]: number; }; + /** + * The ID of the customer whose cash balance this object represents. + */ 'customer': string; + /** + * The ID of the account whose cash balance this object represents. + */ 'customer_account'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'cash_balance'; 'settings': CustomerBalanceCustomerBalanceSettingsModel; }; export type DeletedCustomerModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; }; export type TokenCardNetworksModel = { + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred': string; }; +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export type CardModel = { 'account'?: string | AccountModel | undefined; + /** + * City/District/Suburb/Town/Village. + */ 'address_city': string; + /** + * Billing address country, if provided when creating card. + */ 'address_country': string; + /** + * Address line 1 (Street address/PO Box/Company name). + */ 'address_line1': string; + /** + * If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * Address line 2 (Apartment/Suite/Unit/Building). + */ 'address_line2': string; + /** + * State/County/Province/Region. + */ 'address_state': string; + /** + * ZIP or postal code. + */ 'address_zip': string; + /** + * If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_zip_check': string; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; + /** + * A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Card brand. Can be `American Express`, `Cartes Bancaires`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ 'brand_product'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'currency'?: string | undefined; + /** + * The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + */ 'cvc_check': string; + /** + * Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + */ 'default_for_currency'?: boolean | undefined; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * 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': { [key: string]: string; }; + /** + * Cardholder name. + */ 'name': string; 'networks'?: TokenCardNetworksModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. + */ 'status'?: string | undefined; + /** + * If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + */ 'tokenization_method': string; }; @@ -423,7 +1103,13 @@ export type SourceTypeCardPresentModel = { }; export type SourceCodeVerificationFlowModel = { + /** + * The number of attempts remaining to authenticate the source object with a verification code. + */ 'attempts_remaining': number; + /** + * The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + */ 'status': string; }; @@ -489,13 +1175,37 @@ export type SourceTypeMultibancoModel = { }; export type SourceOwnerModel = { + /** + * Owner's address. + */ 'address': AddressModel; + /** + * Owner's email address. + */ 'email': string; + /** + * Owner's full name. + */ 'name': string; + /** + * Owner's phone number (including extension). + */ 'phone': string; + /** + * Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_address': AddressModel; + /** + * Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email': string; + /** + * Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; + /** + * Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_phone': string; }; @@ -516,18 +1226,48 @@ export type SourceTypePaypalModel = { }; export type SourceReceiverFlowModel = { + /** + * The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + */ 'address': string; + /** + * The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + */ 'amount_charged': number; + /** + * The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + */ 'amount_received': number; + /** + * The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + */ 'amount_returned': number; + /** + * Type of refund attribute method, one of `email`, `manual`, or `none`. + */ 'refund_attributes_method': string; + /** + * Type of refund attribute status, one of `missing`, `requested`, or `available`. + */ 'refund_attributes_status': string; }; export type SourceRedirectFlowModel = { + /** + * The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + */ 'failure_reason': string; + /** + * The URL you provide to redirect the customer to after they authenticated their payment. + */ 'return_url': string; + /** + * The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (successful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + */ 'status': string; + /** + * The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + */ 'url': string; }; @@ -566,26 +1306,68 @@ export type SourceTypeSofortModel = { }; export type SourceOrderItemModel = { + /** + * The amount (price) for this order item. + */ 'amount': number; + /** + * This currency of this order item. Required when `amount` is present. + */ 'currency': string; + /** + * Human-readable description for this order item. + */ 'description': string; + /** + * The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + */ 'parent': string; + /** + * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + */ 'quantity'?: number | undefined; + /** + * The type of this order item. Must be `sku`, `tax`, or `shipping`. + */ 'type': string; }; export type ShippingModel = { 'address'?: AddressModel | undefined; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ 'carrier'?: string | undefined; + /** + * Recipient name. + */ 'name'?: string | undefined; + /** + * Recipient phone (including extension). + */ 'phone'?: string | undefined; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'tracking_number'?: string | undefined; }; export type SourceOrderModel = { + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + */ 'amount': number; + /** + * 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; + /** + * The email address of the customer placing the order. + */ 'email'?: string | undefined; + /** + * List of items constituting the order. + */ 'items': SourceOrderItemModel[]; 'shipping'?: ShippingModel | undefined; }; @@ -620,34 +1402,82 @@ export type SourceTypeWechatModel = { 'statement_descriptor'?: string | undefined; }; +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export type SourceModel = { 'ach_credit_transfer'?: SourceTypeAchCreditTransferModel | undefined; 'ach_debit'?: SourceTypeAchDebitModel | undefined; 'acss_debit'?: SourceTypeAcssDebitModel | undefined; 'alipay'?: SourceTypeAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay': 'always' | 'limited' | 'unspecified'; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'amount': number; 'au_becs_debit'?: SourceTypeAuBecsDebitModel | undefined; 'bancontact'?: SourceTypeBancontactModel | undefined; 'card'?: SourceTypeCardModel | undefined; 'card_present'?: SourceTypeCardPresentModel | undefined; + /** + * The client secret of the source. Used for client-side retrieval using a publishable key. + */ 'client_secret': string; 'code_verification'?: SourceCodeVerificationFlowModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + */ 'currency': string; + /** + * The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + */ 'customer'?: string | undefined; 'eps'?: SourceTypeEpsModel | undefined; + /** + * The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + */ 'flow': string; 'giropay'?: SourceTypeGiropayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'ideal'?: SourceTypeIdealModel | undefined; 'klarna'?: SourceTypeKlarnaModel | undefined; + /** + * 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': { [key: string]: string; }; 'multibanco'?: SourceTypeMultibancoModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source'; + /** + * Information about the owner of the payment instrument that may be used or required by particular source types. + */ 'owner': SourceOwnerModel; 'p24'?: SourceTypeP24Model | undefined; 'paypal'?: SourceTypePaypalModel | undefined; @@ -657,10 +1487,22 @@ export type SourceModel = { 'sepa_debit'?: SourceTypeSepaDebitModel | undefined; 'sofort'?: SourceTypeSofortModel | undefined; 'source_order'?: SourceOrderModel | undefined; + /** + * Extra information about a source. This will appear on your customer's statement every time you charge the source. + */ 'statement_descriptor': string; + /** + * The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + */ 'status': string; 'three_d_secure'?: SourceTypeThreeDSecureModel | undefined; + /** + * The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'alipay' | 'au_becs_debit' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'paypal' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; + /** + * Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + */ 'usage': string; 'wechat'?: SourceTypeWechatModel | undefined; }; @@ -668,114 +1510,324 @@ export type SourceModel = { export type PaymentSourceModel = AccountModel | BankAccountModel | CardModel | SourceModel; export type CouponAppliesToModel = { + /** + * A list of product IDs this coupon applies to + */ 'products': string[]; }; export type CouponCurrencyOptionModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off': number; }; export type ScriptModel = { + /** + * The configuration values of the script. The keys and values are specific to the script implementation. + */ 'configuration': {}; + /** + * The name of the script used to calculate the discount. + */ 'display_name': string; + /** + * The script implementation ID for this coupon. + */ 'id': string; }; +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export type CouponModel = { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ 'amount_off': number; 'applies_to'?: CouponAppliesToModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + */ 'currency': string; + /** + * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CouponCurrencyOptionModel; } | undefined; + /** + * One of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount. + */ 'duration': 'forever' | 'once' | 'repeating'; + /** + * If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + */ 'duration_in_months': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + */ 'max_redemptions': number; + /** + * 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': { [key: string]: string; }; + /** + * Name of the coupon displayed to customers on for instance invoices or receipts. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; + /** + * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + */ 'percent_off': number; + /** + * Date after which the coupon can no longer be redeemed. + */ 'redeem_by': number; + /** + * Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount. + */ 'script'?: ScriptModel | undefined; + /** + * Number of times this coupon has been applied to a customer. + */ 'times_redeemed': number; + /** + * One of `amount_off`, `percent_off`, or `script`. Describes the type of coupon logic used to calculate the discount. + */ 'type'?: 'amount_off' | 'percent_off' | 'script' | undefined; + /** + * Taking account of the above properties, whether this coupon can still be applied to a customer. + */ 'valid': boolean; }; export type PromotionCodesResourcePromotionModel = { + /** + * If promotion `type` is `coupon`, the coupon for this promotion. + */ 'coupon': string | CouponModel; + /** + * The type of promotion. + */ 'type': 'coupon'; }; export type PromotionCodeCurrencyOptionModel = { + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount': number; }; export type PromotionCodesResourceRestrictionsModel = { + /** + * Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: PromotionCodeCurrencyOptionModel; } | undefined; + /** + * A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + */ 'first_time_transaction': boolean; + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ 'minimum_amount': number; + /** + * Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + */ 'minimum_amount_currency': string; }; +/** + * A Promotion Code represents a customer-redeemable code for an underlying promotion. + * You can create multiple codes for a single promotion. + * + * If you enable promotion codes in your [customer portal configuration](https://stripe.com/docs/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal. + * Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal. + */ export type PromotionCodeModel = { + /** + * Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + */ 'active': boolean; + /** + * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + */ 'code': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The customer that this promotion code can be used by. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The account that this promotion code can be used by. + */ 'customer_account'?: string | undefined; + /** + * Date at which the promotion code can no longer be redeemed. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Maximum number of times this promotion code can be redeemed. + */ 'max_redemptions': number; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'promotion_code'; 'promotion': PromotionCodesResourcePromotionModel; 'restrictions': PromotionCodesResourceRestrictionsModel; + /** + * Number of times this promotion code has been used. + */ 'times_redeemed': number; }; export type DiscountSourceModel = { + /** + * The coupon that was redeemed to create this discount. + */ 'coupon': string | CouponModel; + /** + * The source type of the discount. + */ 'type': 'coupon'; }; +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export type DiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session': string; + /** + * The ID of the customer associated with this discount. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The ID of the account associated with this discount. + */ 'customer_account'?: string | undefined; + /** + * If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + */ 'end': number; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice': string; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code': string | PromotionCodeModel; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription': string; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item': string; }; export type InvoiceSettingCustomFieldModel = { + /** + * The name of the custom field. + */ 'name': string; + /** + * The value of the custom field. + */ 'value': string; }; export type PaymentMethodAcssDebitModel = { + /** + * Account number of the bank account. + */ 'account_number'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Institution number of the bank account. + */ 'institution_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Transit number of the bank account. + */ 'transit_number': string; }; @@ -800,14 +1852,32 @@ export type PaymentMethodAmazonPayModel = { }; export type PaymentMethodAuBecsDebitModel = { + /** + * Six-digit number identifying bank and branch associated with this bank account. + */ 'bsb_number': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; }; export type PaymentMethodBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code': string; }; @@ -820,10 +1890,25 @@ export type PaymentMethodBillieModel = { }; export type BillingDetailsModel = { + /** + * Billing address. + */ 'address': AddressModel; + /** + * Email address. + */ 'email': string; + /** + * Full name. + */ 'name': string; + /** + * Billing phone number (including extension). + */ 'phone': string; + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + */ 'tax_id': string; }; @@ -832,72 +1917,206 @@ export type PaymentMethodBlikModel = { }; export type PaymentMethodBoletoModel = { + /** + * Uniquely identifies the customer tax id (CNPJ or CPF) + */ 'tax_id': string; }; export type PaymentMethodCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type PaymentMethodDetailsCardPresentOfflineModel = { + /** + * Time at which the payment was collected while offline + */ 'stored_at': number; + /** + * The method used to process this payment method offline. Only deferred is allowed. + */ 'type': 'deferred'; }; export type PaymentMethodDetailsCardPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'credit' | 'prepaid' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram': string; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name': string; + /** + * Identifier for this transaction. + */ 'authorization_code': string; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code': string; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method': string; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name': string; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results': string; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information': string; }; export type PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel = { + /** + * The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + */ 'type': 'apple_pay' | 'google_pay' | 'samsung_pay' | 'unknown'; }; export type PaymentMethodDetailsCardPresentModel = { + /** + * The authorized amount + */ 'amount_authorized': number; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product': string; + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ 'incremental_authorization_supported': boolean; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * Details about payments collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; + /** + * Defines whether the authorized amount can be over-captured or not + */ 'overcapture_supported': boolean; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt': PaymentMethodDetailsCardPresentReceiptModel; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type CardGeneratedFromPaymentMethodDetailsModel = { 'card_present'?: PaymentMethodDetailsCardPresentModel | undefined; + /** + * The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + */ 'type': string; }; export type ApplicationModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; @@ -922,26 +2141,56 @@ export type OfflineAcceptanceModel = { }; export type OnlineAcceptanceModel = { + /** + * The customer accepts the mandate from this IP address. + */ 'ip_address': string; + /** + * The customer accepts the mandate using the user agent of the browser. + */ 'user_agent': string; }; export type CustomerAcceptanceModel = { + /** + * The time that the customer accepts the mandate. + */ 'accepted_at': number; 'offline'?: OfflineAcceptanceModel | undefined; 'online'?: OnlineAcceptanceModel | undefined; + /** + * The mandate includes the type of customer acceptance information, such as: `online` or `offline`. + */ 'type': 'offline' | 'online'; }; export type MandateMultiUseModel = { + /** + * The amount of the payment on a multi use mandate. + */ 'amount'?: number | undefined; + /** + * The currency of the payment on a multi use mandate. + */ 'currency'?: string | undefined; }; export type MandateAcssDebitModel = { + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; @@ -950,13 +2199,28 @@ export type MandateAmazonPayModel = { }; export type MandateAuBecsDebitModel = { + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateBacsDebitModel = { + /** + * The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + */ 'network_status': 'accepted' | 'pending' | 'refused' | 'revoked'; + /** + * The unique reference identifying the mandate on the Bacs network. + */ 'reference': string; + /** + * When the mandate is revoked on the Bacs network this field displays the reason for the revocation. + */ 'revocation_reason': 'account_closed' | 'bank_account_restricted' | 'bank_ownership_changed' | 'could_not_process' | 'debit_not_authorized'; + /** + * The URL that will contain the mandate that the customer has signed. + */ 'url': string; }; @@ -993,28 +2257,80 @@ export type MandateNzBankAccountModel = { }; export type MandatePaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id': string; + /** + * Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; + /** + * Owner's verified email. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email'?: string | undefined; }; export type MandatePaytoModel = { + /** + * Amount that will be collected. It is required when `amount_type` is `fixed`. + */ 'amount': number; + /** + * The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + */ 'end_date': string; + /** + * The periodicity at which payments will be collected. Defaults to `adhoc`. + */ 'payment_schedule': 'adhoc' | 'annual' | 'daily' | 'fortnightly' | 'monthly' | 'quarterly' | 'semi_annual' | 'weekly'; + /** + * The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + */ 'payments_per_period': number; + /** + * The purpose for which payments are made. Has a default value based on your merchant category code. + */ 'purpose': 'dependant_support' | 'government' | 'loan' | 'mortgage' | 'other' | 'pension' | 'personal' | 'retail' | 'salary' | 'tax' | 'utility'; + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + */ 'start_date': string; }; export type MandatePixModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * Type of amount. + */ 'amount_type'?: 'fixed' | 'maximum' | undefined; + /** + * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + */ 'end_date'?: string | undefined; + /** + * Schedule at which the future payments will be charged. + */ 'payment_schedule'?: 'halfyearly' | 'monthly' | 'quarterly' | 'weekly' | 'yearly' | undefined; + /** + * Subscription name displayed to buyers in their bank app. + */ 'reference'?: string | undefined; + /** + * Start date of the mandate, in `YYYY-MM-DD`. + */ 'start_date'?: string | undefined; }; @@ -1023,11 +2339,20 @@ export type MandateRevolutPayModel = { }; export type MandateSepaDebitModel = { + /** + * The unique reference of the mandate. + */ 'reference': string; + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ 'url': string; }; export type MandateUsBankAccountModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; @@ -1049,37 +2374,96 @@ export type MandatePaymentMethodDetailsModel = { 'pix'?: MandatePixModel | undefined; 'revolut_pay'?: MandateRevolutPayModel | undefined; 'sepa_debit'?: MandateSepaDebitModel | undefined; + /** + * This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. + */ 'type': string; 'us_bank_account'?: MandateUsBankAccountModel | undefined; }; export type MandateSingleUseModel = { + /** + * The amount of the payment on a single use mandate. + */ 'amount': number; + /** + * The currency of the payment on a single use mandate. + */ 'currency': string; }; +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export type MandateModel = { 'customer_acceptance': CustomerAcceptanceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'multi_use'?: MandateMultiUseModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'mandate'; + /** + * The account (if any) that the mandate is intended for. + */ 'on_behalf_of'?: string | undefined; + /** + * ID of the payment method associated with this mandate. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': MandatePaymentMethodDetailsModel; 'single_use'?: MandateSingleUseModel | undefined; + /** + * The mandate status indicates whether or not you can use it to initiate a payment. + */ 'status': 'active' | 'inactive' | 'pending'; + /** + * The type of the mandate. + */ 'type': 'multi_use' | 'single_use'; }; export type SetupAttemptPaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1088,17 +2472,48 @@ export type SetupAttemptPaymentMethodDetailsBoletoModel = { }; export type SetupAttemptPaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type ThreeDSecureDetailsModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow': 'challenge' | 'frictionless'; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator': '01' | '02' | '05' | '06' | '07'; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error'; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason': 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected'; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id': string; + /** + * The version of 3D Secure that was used. + */ 'version': '1.0.2' | '2.1.0' | '2.2.0'; }; @@ -1113,28 +2528,81 @@ export type PaymentMethodDetailsCardWalletGooglePayModel = { export type SetupAttemptPaymentMethodDetailsCardWalletModel = { 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'apple_pay' | 'google_pay' | 'link'; }; export type SetupAttemptPaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Check results by Card networks on Card address and CVC at the time of authorization + */ 'checks': SetupAttemptPaymentMethodDetailsCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * Populated if this authorization used 3D Secure authentication. + */ 'three_d_secure': ThreeDSecureDetailsModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': SetupAttemptPaymentMethodDetailsCardWalletModel; }; export type SetupAttemptPaymentMethodDetailsCardPresentModel = { + /** + * The ID of the Card PaymentMethod which was generated by this SetupAttempt. + */ 'generated_card': string | PaymentMethodModel; + /** + * Details about payments collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; }; @@ -1143,18 +2611,49 @@ export type SetupAttemptPaymentMethodDetailsCashappModel = { }; export type SetupAttemptPaymentMethodDetailsIdBankTransferModel = { + /** + * Bank where the account is located. + */ 'bank': 'bca' | 'bni' | 'bri' | 'cimb' | 'permata'; + /** + * Local bank code of the bank. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + */ 'display_name': string; }; export type SetupAttemptPaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1175,6 +2674,9 @@ export type SetupAttemptPaymentMethodDetailsLinkModel = { }; export type SetupAttemptPaymentMethodDetailsNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id'?: string | undefined; }; @@ -1203,13 +2705,39 @@ export type SetupAttemptPaymentMethodDetailsSepaDebitModel = { }; export type SetupAttemptPaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Sofort directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -1246,6 +2774,9 @@ export type SetupAttemptPaymentMethodDetailsModel = { 'sepa_debit'?: SetupAttemptPaymentMethodDetailsSepaDebitModel | undefined; 'sofort'?: SetupAttemptPaymentMethodDetailsSofortModel | undefined; 'stripe_balance'?: SetupAttemptPaymentMethodDetailsStripeBalanceModel | undefined; + /** + * The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + */ 'type': string; 'us_bank_account'?: SetupAttemptPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -1266,8 +2797,17 @@ export type PaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLin }; export type PaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptionsModel = { + /** + * Type of the line item. + */ 'category'?: 'digital_goods' | 'donation' | 'physical_goods' | undefined; + /** + * Description of the line item. + */ 'description'?: string | undefined; + /** + * The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + */ 'sold_by'?: string | undefined; }; @@ -1279,42 +2819,118 @@ export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResour }; export type PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount': number; }; export type PaymentIntentAmountDetailsLineItemModel = { + /** + * The discount applied on this line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[discount_amount]` field. + */ 'discount_amount': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent_amount_details_line_item'; + /** + * Payment method-specific information for line items. + */ 'payment_method_options': PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptionsModel; + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long. + */ 'product_code': string; + /** + * The product name of the line item. Required for L3 rates. At most 1024 characters long. + * + * For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters. + */ 'product_name': string; + /** + * The quantity of items. Required for L3 rates. An integer greater than 0. + */ 'quantity': number; + /** + * Contains information about the tax on the item. + */ 'tax': PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTaxModel; + /** + * The unit cost of the line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0. + */ 'unit_cost': number; + /** + * A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long. + */ 'unit_of_measure': string; }; export type PaymentFlowsAmountDetailsResourceShippingModel = { + /** + * If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than or equal to 0. + */ 'amount': number; + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'from_postal_code': string; + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed. + */ 'to_postal_code': string; }; export type PaymentFlowsAmountDetailsResourceTaxModel = { + /** + * The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + */ 'total_tax_amount': number; }; export type PaymentFlowsAmountDetailsClientResourceTipModel = { + /** + * Portion of the amount that corresponds to a tip. + */ 'amount'?: number | undefined; }; export type PaymentFlowsAmountDetailsModel = { + /** + * The total discount applied on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0. + * + * This field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field. + */ 'discount_amount'?: number | undefined; + /** + * A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': PaymentIntentAmountDetailsLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'shipping'?: PaymentFlowsAmountDetailsResourceShippingModel | undefined; @@ -1323,11 +2939,22 @@ export type PaymentFlowsAmountDetailsModel = { }; export type PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel = { + /** + * Controls whether this PaymentIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled': boolean; }; export type PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTaxModel = { + /** + * The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + */ 'calculation': string; }; @@ -1340,51 +2967,126 @@ export type PaymentFlowsPaymentIntentAsyncWorkflowsModel = { }; export type FeeModel = { + /** + * Amount of the fee, in cents. + */ 'amount': number; + /** + * ID of the Connect application that earned the fee. + */ 'application': string; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + */ 'type': string; }; export type ConnectCollectionTransferModel = { + /** + * Amount transferred, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * ID of the account that funds are being collected for. + */ 'destination': string | AccountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'connect_collection_transfer'; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + */ 'linked_transaction': string | CustomerCashBalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. + */ 'payment_intent': string | PaymentIntentModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel = { + /** + * The BIC of the bank of the sender of the funding. + */ 'bic': string; + /** + * The last 4 digits of the IBAN of the sender of the funding. + */ 'iban_last4': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel = { + /** + * The last 4 digits of the account number of the sender of the funding. + */ 'account_number_last4': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; + /** + * The sort code of the bank of the sender of the funding + */ 'sort_code': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel = { + /** + * The name of the bank of the sender of the funding. + */ 'sender_bank': string; + /** + * The name of the bank branch of the sender of the funding. + */ 'sender_branch': string; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel = { + /** + * The banking network used for this funding. + */ 'network'?: 'ach' | 'domestic_wire_us' | 'swift' | undefined; + /** + * The full name of the sender, as supplied by the sending bank. + */ 'sender_name': string; }; @@ -1392,7 +3094,13 @@ export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransacti 'eu_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferModel | undefined; 'gb_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferModel | undefined; 'jp_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferModel | undefined; + /** + * The user-supplied reference field on the bank transfer. + */ 'reference': string; + /** + * The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; 'us_bank_transfer'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferModel | undefined; }; @@ -1406,84 +3114,186 @@ export type DestinationDetailsUnimplementedModel = { }; export type RefundDestinationDetailsBlikModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsBrBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsCardModel = { + /** + * Value of the reference number assigned to the refund. + */ 'reference'?: string | undefined; + /** + * Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status'?: string | undefined; + /** + * Type of the reference number assigned to the refund. + */ 'reference_type'?: string | undefined; + /** + * The type of refund. This can be `refund`, `reversal`, or `pending`. + */ 'type': 'pending' | 'refund' | 'reversal'; }; export type RefundDestinationDetailsCryptoModel = { + /** + * The transaction hash of the refund. + */ 'reference': string; }; export type RefundDestinationDetailsEuBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsGbBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsIdBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsJpBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMbWayModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMultibancoModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsMxBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsP24Model = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsPaypalModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; }; export type RefundDestinationDetailsSwishModel = { + /** + * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + */ 'network_decline_code': string; + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsThBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; export type RefundDestinationDetailsUsBankTransferModel = { + /** + * The reference assigned to the refund. + */ 'reference': string; + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ 'reference_status': string; }; @@ -1521,6 +3331,9 @@ export type RefundDestinationDetailsModel = { 'swish'?: RefundDestinationDetailsSwishModel | undefined; 'th_bank_transfer'?: RefundDestinationDetailsThBankTransferModel | undefined; 'twint'?: DestinationDetailsUnimplementedModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. + */ 'type': string; 'us_bank_transfer'?: RefundDestinationDetailsUsBankTransferModel | undefined; 'wechat_pay'?: DestinationDetailsUnimplementedModel | undefined; @@ -1528,163 +3341,485 @@ export type RefundDestinationDetailsModel = { }; export type EmailSentModel = { + /** + * The timestamp when the email was sent. + */ 'email_sent_at': number; + /** + * The recipient's email address. + */ 'email_sent_to': string; }; export type RefundNextActionDisplayDetailsModel = { 'email_sent': EmailSentModel; + /** + * The expiry timestamp. + */ 'expires_at': number; }; export type RefundNextActionModel = { 'display_details'?: RefundNextActionDisplayDetailsModel | undefined; + /** + * Type of the next action to perform. + */ 'type': string; }; export type PaymentFlowsPaymentIntentPresentmentDetailsModel = { + /** + * Amount intended to be collected by this payment, denominated in `presentment_currency`. + */ 'presentment_amount': number; + /** + * Currency presented to the customer during payment. + */ 'presentment_currency': string; }; +/** + * A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) + */ export type TransferModel = { + /** + * Amount in cents (or local equivalent) to be transferred. + */ 'amount': number; + /** + * Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + */ 'amount_reversed': number; + /** + * Balance transaction that describes the impact of this transfer on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time that this record of the transfer was first created. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * ID of the Stripe account the transfer was sent to. + */ 'destination': string | AccountModel; + /** + * If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + */ 'destination_payment'?: string | ChargeModel | undefined; + /** + * The FX Quote used for the transfer. + */ 'fx_quote'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer'; + /** + * A list of reversals that have been applied to the transfer. + */ 'reversals': { + /** + * Details about each object. + */ 'data': TransferReversalModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + */ 'reversed': boolean; + /** + * ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + */ 'source_transaction': string | ChargeModel; + /** + * The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + */ 'source_type'?: string | undefined; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group': string; }; +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export type TransferReversalModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Linked payment refund for the transfer reversal. + */ 'destination_payment_refund': string | RefundModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'transfer_reversal'; + /** + * ID of the refund responsible for the transfer reversal. + */ 'source_refund': string | RefundModel; + /** + * ID of the transfer that was reversed. + */ 'transfer': string | TransferModel; }; +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export type RefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * ID of the charge that's refunded. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + */ 'description'?: string | undefined; 'destination_details'?: RefundDestinationDetailsModel | undefined; + /** + * After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + */ 'failure_balance_transaction'?: string | BalanceTransactionModel | undefined; + /** + * Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + */ 'failure_reason'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + */ 'instructions_email'?: string | undefined; + /** + * 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': { [key: string]: string; }; 'next_action'?: RefundNextActionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'refund'; + /** + * ID of the PaymentIntent that's refunded. + */ 'payment_intent': string | PaymentIntentModel; + /** + * Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + */ 'pending_reason'?: 'charge_pending' | 'insufficient_funds' | 'processing' | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + */ 'reason': 'duplicate' | 'expired_uncaptured_charge' | 'fraudulent' | 'requested_by_customer'; + /** + * This is the transaction number that appears on email receipts sent for this refund. + */ 'receipt_number': string; + /** + * The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + */ 'source_transfer_reversal': string | TransferReversalModel; + /** + * Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + */ 'status': string; + /** + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + */ 'transfer_reversal': string | TransferReversalModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel = { + /** + * The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. + */ 'refund': string | RefundModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel = { + /** + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. + */ 'balance_transaction': string | BalanceTransactionModel; }; export type CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel = { + /** + * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export type CustomerCashBalanceTransactionModel = { 'adjusted_for_overdraft'?: CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftModel | undefined; 'applied_to_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer whose available cash balance changed as a result of this transaction. + */ 'customer': string | CustomerModel; 'customer_account'?: string | undefined; + /** + * The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'ending_balance': number; 'funded'?: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + */ 'net_amount': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_cash_balance_transaction'; 'refunded_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionModel | undefined; 'transferred_to_balance'?: CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceModel | undefined; + /** + * The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + */ 'type': 'adjusted_for_overdraft' | 'applied_to_payment' | 'funded' | 'funding_reversed' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'transferred_to_balance' | 'unapplied_from_payment'; 'unapplied_from_payment'?: CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionModel | undefined; }; export type DisputeTransactionShippingAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; export type DisputeVisaCompellingEvidence3DisputedTransactionModel = { + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id': string; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint': string; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id': string; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * Categorization of disputed payment. + */ 'merchandise_or_services': 'merchandise' | 'services'; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address': DisputeTransactionShippingAddressModel; }; export type DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel = { + /** + * Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + */ 'charge': string; + /** + * User Account ID used to log into business platform. Must be recognizable by the user. + */ 'customer_account_id': string; + /** + * Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + */ 'customer_device_fingerprint': string; + /** + * Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + */ 'customer_device_id': string; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + */ 'shipping_address': DisputeTransactionShippingAddressModel; }; export type DisputeEnhancedEvidenceVisaCompellingEvidence3Model = { + /** + * Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + */ 'disputed_transaction': DisputeVisaCompellingEvidence3DisputedTransactionModel; + /** + * List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + */ 'prior_undisputed_transactions': DisputeVisaCompellingEvidence3PriorUndisputedTransactionModel[]; }; export type DisputeEnhancedEvidenceVisaComplianceModel = { + /** + * A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + */ 'fee_acknowledged': boolean; }; @@ -1694,42 +3829,132 @@ export type DisputeEnhancedEvidenceModel = { }; export type DisputeEvidenceModel = { + /** + * Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + */ 'access_activity_log': string; + /** + * The billing address provided by the customer. + */ 'billing_address': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + */ 'cancellation_policy': string | FileModel; + /** + * An explanation of how and when the customer was shown your refund policy prior to purchase. + */ 'cancellation_policy_disclosure': string; + /** + * A justification for why the customer's subscription was not canceled. + */ 'cancellation_rebuttal': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + */ 'customer_communication': string | FileModel; + /** + * The email address of the customer. + */ 'customer_email_address': string; + /** + * The name of the customer. + */ 'customer_name': string; + /** + * The IP address that the customer used when making the purchase. + */ 'customer_purchase_ip': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + */ 'customer_signature': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + */ 'duplicate_charge_documentation': string | FileModel; + /** + * An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + */ 'duplicate_charge_explanation': string; + /** + * The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + */ 'duplicate_charge_id': string; 'enhanced_evidence': DisputeEnhancedEvidenceModel; + /** + * A description of the product or service that was sold. + */ 'product_description': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + */ 'receipt': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + */ 'refund_policy': string | FileModel; + /** + * Documentation demonstrating that the customer was shown your refund policy prior to purchase. + */ 'refund_policy_disclosure': string; + /** + * A justification for why the customer is not entitled to a refund. + */ 'refund_refusal_explanation': string; + /** + * The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + */ 'service_date': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + */ 'service_documentation': string | FileModel; + /** + * The address to which a physical product was shipped. You should try to include as complete address information as possible. + */ 'shipping_address': string; + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + */ 'shipping_carrier': string; + /** + * The date on which a physical product began its route to the shipping address, in a clear human-readable format. + */ 'shipping_date': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + */ 'shipping_documentation': string | FileModel; + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ 'shipping_tracking_number': string; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + */ 'uncategorized_file': string | FileModel; + /** + * Any additional evidence or statements. + */ 'uncategorized_text': string; }; export type DisputeEnhancedEligibilityVisaCompellingEvidence3Model = { + /** + * List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + */ 'required_actions': Array<'missing_customer_identifiers' | 'missing_disputed_transaction_description' | 'missing_merchandise_or_services' | 'missing_prior_undisputed_transaction_description' | 'missing_prior_undisputed_transactions'>; + /** + * Visa Compelling Evidence 3.0 eligibility status. + */ 'status': 'not_qualified' | 'qualified' | 'requires_action'; }; export type DisputeEnhancedEligibilityVisaComplianceModel = { + /** + * Visa compliance eligibility status. + */ 'status': 'fee_acknowledged' | 'requires_fee_acknowledgement'; }; @@ -1739,31 +3964,70 @@ export type DisputeEnhancedEligibilityModel = { }; export type DisputeEvidenceDetailsModel = { + /** + * Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. + */ 'due_by': number; 'enhanced_eligibility': DisputeEnhancedEligibilityModel; + /** + * Whether evidence has been staged for this dispute. + */ 'has_evidence': boolean; + /** + * Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + */ 'past_due': boolean; + /** + * The number of times evidence has been submitted. Typically, you may only submit evidence once. + */ 'submission_count': number; + /** + * Whether the dispute was submitted manually, with Smart Disputes, or not submitted. + */ 'submission_method'?: 'manual' | 'not_submitted' | 'smart_disputes' | undefined; }; export type DisputePaymentMethodDetailsAmazonPayModel = { + /** + * The AmazonPay dispute type, chargeback or claim + */ 'dispute_type': 'chargeback' | 'claim'; }; export type DisputePaymentMethodDetailsCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The type of dispute opened. Different case types may have varying fees and financial impact. + */ 'case_type': 'block' | 'chargeback' | 'compliance' | 'inquiry' | 'resolution'; + /** + * The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + */ 'network_reason_code': string; }; export type DisputePaymentMethodDetailsKlarnaModel = { + /** + * Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason + */ 'chargeback_loss_reason_code'?: string | undefined; + /** + * The reason for the dispute as defined by Klarna + */ 'reason_code': string; }; export type DisputePaymentMethodDetailsPaypalModel = { + /** + * The ID of the dispute in PayPal. + */ 'case_id': string; + /** + * The reason for the dispute as defined by PayPal + */ 'reason_code': string; }; @@ -1772,54 +4036,155 @@ export type DisputePaymentMethodDetailsModel = { 'card'?: DisputePaymentMethodDetailsCardModel | undefined; 'klarna'?: DisputePaymentMethodDetailsKlarnaModel | undefined; 'paypal'?: DisputePaymentMethodDetailsPaypalModel | undefined; + /** + * Payment method type. + */ 'type': 'amazon_pay' | 'card' | 'klarna' | 'paypal'; }; export type DisputeSmartDisputesModel = { + /** + * Evidence that could be provided to improve the SmartDisputes packet + */ 'recommended_evidence': string[][]; + /** + * Smart Disputes auto representment packet availability status. + */ 'status': 'available' | 'processing' | 'requires_evidence' | 'unavailable'; }; +/** + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. + * + * Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) + */ export type DisputeModel = { + /** + * Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + */ 'amount': number; + /** + * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + */ 'balance_transactions': BalanceTransactionModel[]; + /** + * ID of the charge that's disputed. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * List of eligibility types that are included in `enhanced_evidence`. + */ 'enhanced_eligibility_types': Array<'visa_compelling_evidence_3' | 'visa_compliance'>; 'evidence': DisputeEvidenceModel; 'evidence_details': DisputeEvidenceDetailsModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Intended submission method for the dispute. + */ 'intended_submission_method'?: 'manual' | 'prefer_manual' | 'prefer_smart_disputes' | 'smart_disputes' | undefined; + /** + * If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + */ 'is_charge_refundable': boolean; + /** + * 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': { [key: string]: string; }; + /** + * Network-dependent reason code for the dispute. + */ 'network_reason_code'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'dispute'; + /** + * ID of the PaymentIntent that's disputed. + */ 'payment_intent': string | PaymentIntentModel; 'payment_method_details'?: DisputePaymentMethodDetailsModel | undefined; + /** + * Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + */ 'reason': string; 'smart_disputes'?: DisputeSmartDisputesModel | undefined; + /** + * The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`. + */ 'status': 'lost' | 'needs_response' | 'prevented' | 'under_review' | 'warning_closed' | 'warning_needs_response' | 'warning_under_review' | 'won'; }; +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export type FeeRefundModel = { + /** + * Amount, in cents (or local equivalent). + */ 'amount': number; + /** + * Balance transaction that describes the impact on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the application fee that was refunded. + */ 'fee': string | ApplicationFeeModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'fee_refund'; }; export type IssuingAuthorizationAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee': number; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount': number; }; @@ -1828,451 +4193,1255 @@ export type IssuingCardholderAddressModel = { }; export type IssuingCardholderCompanyModel = { + /** + * Whether the company's business ID number was provided. + */ 'tax_id_provided': boolean; }; export type IssuingCardholderUserTermsAcceptanceModel = { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. + */ 'date': number; + /** + * The IP address from which the cardholder accepted the Authorized User Terms. + */ 'ip': string; + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ 'user_agent': string; }; export type IssuingCardholderCardIssuingModel = { + /** + * Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + */ 'user_terms_acceptance': IssuingCardholderUserTermsAcceptanceModel; }; export type IssuingCardholderIndividualDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type IssuingCardholderIdDocumentModel = { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back': string | FileModel; + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front': string | FileModel; }; export type IssuingCardholderVerificationModel = { + /** + * An identifying document, either a passport or local ID card. + */ 'document': IssuingCardholderIdDocumentModel; }; export type IssuingCardholderIndividualModel = { + /** + * Information related to the card_issuing program for this cardholder. + */ 'card_issuing'?: IssuingCardholderCardIssuingModel | undefined; + /** + * The date of birth of this cardholder. + */ 'dob': IssuingCardholderIndividualDobModel; + /** + * The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'first_name': string; + /** + * The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ 'last_name': string; + /** + * Government-issued ID document for this cardholder. + */ 'verification': IssuingCardholderVerificationModel; }; export type IssuingCardholderRequirementsModel = { + /** + * If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + */ 'disabled_reason': 'listed' | 'rejected.listed' | 'requirements.past_due' | 'under_review'; + /** + * Array of fields that need to be collected in order to verify and re-enable the cardholder. + */ 'past_due': Array<'company.tax_id' | 'individual.card_issuing.user_terms_acceptance.date' | 'individual.card_issuing.user_terms_acceptance.ip' | 'individual.dob.day' | 'individual.dob.month' | 'individual.dob.year' | 'individual.first_name' | 'individual.last_name' | 'individual.verification.document'>; }; export type IssuingCardholderSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardholderAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries': string[]; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries': string[]; + /** + * Limit spending with amount-based rules that apply across this cardholder's cards. + */ 'spending_limits': IssuingCardholderSpendingLimitModel[]; + /** + * Currency of the amounts within `spending_limits`. + */ 'spending_limits_currency': string; }; +/** + * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + */ export type IssuingCardholderModel = { 'billing': IssuingCardholderAddressModel; + /** + * Additional information about a `company` cardholder. + */ 'company': IssuingCardholderCompanyModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The cardholder's email address. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Additional information about an `individual` cardholder. + */ 'individual': IssuingCardholderIndividualModel; + /** + * 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': { [key: string]: string; }; + /** + * The cardholder's name. This will be printed on cards issued to them. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.cardholder'; + /** + * The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + */ 'phone_number': string; + /** + * The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + * This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + */ 'preferred_locales': Array<'de' | 'en' | 'es' | 'fr' | 'it'>; 'requirements': IssuingCardholderRequirementsModel; + /** + * Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ 'spending_controls': IssuingCardholderAuthorizationControlsModel; + /** + * Specifies whether to permit authorizations on this cardholder's cards. + */ 'status': 'active' | 'blocked' | 'inactive'; + /** + * One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + */ 'type': 'company' | 'individual'; }; export type IssuingCardFraudWarningModel = { + /** + * Timestamp of the most recent fraud warning. + */ 'started_at': number; + /** + * The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card. + */ 'type': 'card_testing_exposure' | 'fraud_dispute_filed' | 'third_party_reported' | 'user_indicated_fraud'; }; export type IssuingPersonalizationDesignCarrierTextModel = { + /** + * The footer body text of the carrier letter. + */ 'footer_body': string; + /** + * The footer title text of the carrier letter. + */ 'footer_title': string; + /** + * The header body text of the carrier letter. + */ 'header_body': string; + /** + * The header title text of the carrier letter. + */ 'header_title': string; }; export type IssuingPhysicalBundleFeaturesModel = { + /** + * The policy for how to use card logo images in a card design with this physical bundle. + */ 'card_logo': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use carrier letter text in a card design with this physical bundle. + */ 'carrier_text': 'optional' | 'required' | 'unsupported'; + /** + * The policy for how to use a second line on a card with this physical bundle. + */ 'second_line': 'optional' | 'required' | 'unsupported'; }; +/** + * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. + */ export type IssuingPhysicalBundleModel = { 'features': IssuingPhysicalBundleFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Friendly display name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.physical_bundle'; + /** + * Whether this physical bundle can be used to create cards. + */ 'status': 'active' | 'inactive' | 'review'; + /** + * Whether this physical bundle is a standard Stripe offering or custom-made for you. + */ 'type': 'custom' | 'standard'; }; export type IssuingPersonalizationDesignPreferencesModel = { + /** + * 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; + /** + * Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + */ 'is_platform_default': boolean; }; export type IssuingPersonalizationDesignRejectionReasonsModel = { + /** + * The reason(s) the card logo was rejected. + */ 'card_logo': Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_binary_image' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'>; + /** + * The reason(s) the carrier text was rejected. + */ 'carrier_text': Array<'geographic_location' | 'inappropriate' | 'network_name' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material'>; }; +/** + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. + */ export type IssuingPersonalizationDesignModel = { + /** + * 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 | FileModel; + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ 'carrier_text': IssuingPersonalizationDesignCarrierTextModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key': string; + /** + * 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': { [key: string]: string; }; + /** + * Friendly display name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.personalization_design'; + /** + * The physical bundle object belonging to this personalization design. + */ 'physical_bundle': string | IssuingPhysicalBundleModel; 'preferences': IssuingPersonalizationDesignPreferencesModel; 'rejection_reasons': IssuingPersonalizationDesignRejectionReasonsModel; + /** + * Whether this personalization design can be used to create cards. + */ 'status': 'active' | 'inactive' | 'rejected' | 'review'; }; export type IssuingCardShippingAddressValidationModel = { + /** + * The address validation capabilities to use. + */ 'mode': 'disabled' | 'normalization_only' | 'validation_and_normalization'; + /** + * The normalized shipping address. + */ 'normalized_address': AddressModel; + /** + * The validation result for the shipping address. + */ 'result': 'indeterminate' | 'likely_deliverable' | 'likely_undeliverable'; }; export type IssuingCardShippingCustomsModel = { + /** + * A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. + */ 'eori_number': string; }; export type IssuingCardShippingModel = { 'address': AddressModel; + /** + * Address validation details for the shipment. + */ 'address_validation': IssuingCardShippingAddressValidationModel; + /** + * The delivery company that shipped a card. + */ 'carrier': 'dhl' | 'fedex' | 'royal_mail' | 'usps'; + /** + * Additional information that may be required for clearing customs. + */ 'customs': IssuingCardShippingCustomsModel; + /** + * A unix timestamp representing a best estimate of when the card will be delivered. + */ 'eta': number; + /** + * Recipient name. + */ 'name': string; + /** + * The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. + */ 'phone_number': string; + /** + * Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + */ 'require_signature': boolean; + /** + * Shipment service, such as `standard` or `express`. + */ 'service': 'express' | 'priority' | 'standard'; + /** + * The delivery status of the card. + */ 'status': 'canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped' | 'submitted'; + /** + * A tracking number for a card shipment. + */ 'tracking_number': string; + /** + * A link to the shipping carrier's site where you can view detailed information about a card shipment. + */ 'tracking_url': string; + /** + * Packaging options. + */ 'type': 'bulk' | 'individual'; }; export type IssuingCardSpendingLimitModel = { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ 'categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Interval (or event) to which the amount applies. + */ 'interval': 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly'; }; export type IssuingCardAuthorizationControlsModel = { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ 'allowed_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + */ 'allowed_merchant_countries': string[]; + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ 'blocked_categories': Array<'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_building_materials_stores' | 'manual_cash_disburse' | 'marinas_service_and_supplies' | 'marketplaces' | 'masonry_stonework_and_plaster' | 'massage_parlors' | 'medical_and_dental_labs' | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' | 'medical_services' | 'membership_organizations' | 'mens_and_boys_clothing_and_accessories_stores' | 'mens_womens_clothing_stores' | 'metal_service_centers' | 'miscellaneous' | 'miscellaneous_apparel_and_accessory_shops' | 'miscellaneous_auto_dealers' | 'miscellaneous_business_services' | 'miscellaneous_food_stores' | 'miscellaneous_general_merchandise' | 'miscellaneous_general_services' | 'miscellaneous_home_furnishing_specialty_stores' | 'miscellaneous_publishing_and_printing' | 'miscellaneous_recreation_services' | 'miscellaneous_repair_shops' | 'miscellaneous_specialty_retail' | 'mobile_home_dealers' | 'motion_picture_theaters' | 'motor_freight_carriers_and_trucking' | 'motor_homes_dealers' | 'motor_vehicle_supplies_and_new_parts' | 'motorcycle_shops_and_dealers' | 'motorcycle_shops_dealers' | 'music_stores_musical_instruments_pianos_and_sheet_music' | 'news_dealers_and_newsstands' | 'non_fi_money_orders' | 'non_fi_stored_value_card_purchase_load' | 'nondurable_goods' | 'nurseries_lawn_and_garden_supply_stores' | 'nursing_personal_care' | 'office_and_commercial_furniture' | 'opticians_eyeglasses' | 'optometrists_ophthalmologist' | 'orthopedic_goods_prosthetic_devices' | 'osteopaths' | 'package_stores_beer_wine_and_liquor' | 'paints_varnishes_and_supplies' | 'parking_lots_garages' | 'passenger_railways' | 'pawn_shops' | 'pet_shops_pet_food_and_supplies' | 'petroleum_and_petroleum_products' | 'photo_developing' | 'photographic_photocopy_microfilm_equipment_and_supplies' | 'photographic_studios' | 'picture_video_production' | 'piece_goods_notions_and_other_dry_goods' | 'plumbing_heating_equipment_and_supplies' | 'political_organizations' | 'postal_services_government_only' | 'precious_stones_and_metals_watches_and_jewelry' | 'professional_services' | 'public_warehousing_and_storage' | 'quick_copy_repro_and_blueprint' | 'railroads' | 'real_estate_agents_and_managers_rentals' | 'record_stores' | 'recreational_vehicle_rentals' | 'religious_goods_stores' | 'religious_organizations' | 'roofing_siding_sheet_metal' | 'secretarial_support_services' | 'security_brokers_dealers' | 'service_stations' | 'sewing_needlework_fabric_and_piece_goods_stores' | 'shoe_repair_hat_cleaning' | 'shoe_stores' | 'small_appliance_repair' | 'snowmobile_dealers' | 'special_trade_services' | 'specialty_cleaning' | 'sporting_goods_stores' | 'sporting_recreation_camps' | 'sports_and_riding_apparel_stores' | 'sports_clubs_fields' | 'stamp_and_coin_stores' | 'stationary_office_supplies_printing_and_writing_paper' | 'stationery_stores_office_and_school_supply_stores' | 'swimming_pools_sales' | 't_ui_travel_germany' | 'tailors_alterations' | 'tax_payments_government_agencies' | 'tax_preparation_services' | 'taxicabs_limousines' | 'telecommunication_equipment_and_telephone_sales' | 'telecommunication_services' | 'telegraph_services' | 'tent_and_awning_shops' | 'testing_laboratories' | 'theatrical_ticket_agencies' | 'timeshares' | 'tire_retreading_and_repair' | 'tolls_bridge_fees' | 'tourist_attractions_and_exhibits' | 'towing_services' | 'trailer_parks_campgrounds' | 'transportation_services' | 'travel_agencies_tour_operators' | 'truck_stop_iteration' | 'truck_utility_trailer_rentals' | 'typesetting_plate_making_and_related_services' | 'typewriter_stores' | 'u_s_federal_government_agencies_or_departments' | 'uniforms_commercial_clothing' | 'used_merchandise_and_secondhand_stores' | 'utilities' | 'variety_stores' | 'veterinary_services' | 'video_amusement_game_supplies' | 'video_game_arcades' | 'video_tape_rental_stores' | 'vocational_trade_schools' | 'watch_jewelry_repair' | 'welding_repair' | 'wholesale_clubs' | 'wig_and_toupee_stores' | 'wires_money_orders' | 'womens_accessory_and_specialty_shops' | 'womens_ready_to_wear_stores' | 'wrecking_and_salvage_yards'>; + /** + * Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + */ 'blocked_merchant_countries': string[]; + /** + * Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + */ 'spending_limits': IssuingCardSpendingLimitModel[]; + /** + * Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + */ 'spending_limits_currency': string; }; export type IssuingCardApplePayModel = { + /** + * Apple Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Apple Pay + */ 'ineligible_reason': 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region'; }; export type IssuingCardGooglePayModel = { + /** + * Google Pay Eligibility + */ 'eligible': boolean; + /** + * Reason the card is ineligible for Google Pay + */ 'ineligible_reason': 'missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region'; }; export type IssuingCardWalletsModel = { 'apple_pay': IssuingCardApplePayModel; 'google_pay': IssuingCardGooglePayModel; + /** + * Unique identifier for a card used with digital wallets + */ 'primary_account_identifier': string; }; +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export type IssuingCardModel = { + /** + * The brand of the card. + */ 'brand': string; + /** + * The reason why the card was canceled. + */ 'cancellation_reason': 'design_rejected' | 'lost' | 'stolen'; 'cardholder': IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + */ 'currency': string; + /** + * The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'cvc'?: string | undefined; + /** + * The expiration month of the card. + */ 'exp_month': number; + /** + * The expiration year of the card. + */ 'exp_year': number; + /** + * The financial account this card is attached to. + */ 'financial_account'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last 4 digits of the card number. + */ 'last4': string; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ 'latest_fraud_warning': IssuingCardFraudWarningModel; + /** + * 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': { [key: string]: string; }; + /** + * The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ 'number'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.card'; + /** + * The personalization design object belonging to this card. + */ 'personalization_design': string | IssuingPersonalizationDesignModel; + /** + * The latest card that replaces this card, if any. + */ 'replaced_by': string | IssuingCardModel; + /** + * The card this card replaces, if any. + */ 'replacement_for': string | IssuingCardModel; + /** + * The reason why the previous card needed to be replaced. + */ 'replacement_reason': 'damaged' | 'expired' | 'lost' | 'stolen'; + /** + * Text separate from cardholder name, printed on the card. + */ 'second_line': string; + /** + * Where and how the card will be shipped. + */ 'shipping': IssuingCardShippingModel; 'spending_controls': IssuingCardAuthorizationControlsModel; + /** + * Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + */ 'status': 'active' | 'canceled' | 'inactive'; + /** + * The type of the card. + */ 'type': 'physical' | 'virtual'; + /** + * Information relating to digital wallets (like Apple Pay and Google Pay). + */ 'wallets': IssuingCardWalletsModel; }; export type IssuingAuthorizationFleetCardholderPromptDataModel = { + /** + * [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + */ 'alphanumeric_id': string; + /** + * Driver ID. + */ 'driver_id': string; + /** + * Odometer reading. + */ 'odometer': number; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id': string; + /** + * User ID. + */ 'user_id': string; + /** + * Vehicle number. + */ 'vehicle_number': string; }; export type IssuingAuthorizationFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingAuthorizationFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingAuthorizationFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'local_amount_decimal': string; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + */ 'national_amount_decimal': string; }; export type IssuingAuthorizationFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel': IssuingAuthorizationFleetFuelPriceDataModel; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel': IssuingAuthorizationFleetNonFuelPriceDataModel; + /** + * Information about tax included in this transaction. + */ 'tax': IssuingAuthorizationFleetTaxDataModel; }; export type IssuingAuthorizationFleetDataModel = { + /** + * Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + */ 'cardholder_prompt_data': IssuingAuthorizationFleetCardholderPromptDataModel; + /** + * The type of purchase. + */ 'purchase_type': 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase'; + /** + * More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown': IssuingAuthorizationFleetReportedBreakdownModel; + /** + * The type of fuel service. + */ 'service_type': 'full_service' | 'non_fuel_transaction' | 'self_service'; }; export type IssuingAuthorizationFraudChallengeModel = { + /** + * The method by which the fraud challenge was delivered to the cardholder. + */ 'channel': 'sms'; + /** + * The status of the fraud challenge. + */ 'status': 'expired' | 'pending' | 'rejected' | 'undeliverable' | 'verified'; + /** + * If the challenge is not deliverable, the reason why. + */ 'undeliverable_reason': 'no_phone_number' | 'unsupported_phone_number'; }; export type IssuingAuthorizationFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code': string; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal': string; + /** + * The type of fuel that was purchased. + */ 'type': 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super'; + /** + * The units for `quantity_decimal`. + */ 'unit': 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon'; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal': string; }; export type IssuingAuthorizationMerchantDataModel = { + /** + * A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + */ 'category': string; + /** + * The merchant category code for the seller’s business + */ 'category_code': string; + /** + * City where the seller is located + */ 'city': string; + /** + * Country where the seller is located + */ 'country': string; + /** + * Name of the seller + */ 'name': string; + /** + * Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + */ 'network_id': string; + /** + * Postal code where the seller is located + */ 'postal_code': string; + /** + * State where the seller is located + */ 'state': string; + /** + * The seller's tax identification number. Currently populated for French merchants only. + */ 'tax_id': string; + /** + * An ID assigned by the seller to the location of the sale. + */ 'terminal_id': string; + /** + * URL provided by the merchant on a 3DS request + */ 'url': string; }; export type IssuingAuthorizationNetworkDataModel = { + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + */ 'acquiring_institution_id': string; + /** + * The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. + */ 'system_trace_audit_number': string; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id': string; }; export type IssuingAuthorizationPendingRequestModel = { + /** + * The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * 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; + /** + * If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + */ 'is_amount_controllable': boolean; + /** + * The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The local currency the merchant is requesting to authorize. + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score': number; }; export type IssuingAuthorizationRequest_1Model = { + /** + * The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * Whether this request was approved. + */ 'approved': boolean; + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'merchant_amount': number; + /** + * The currency that was collected by the merchant and presented to the cardholder for the authorization. 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). + */ 'merchant_currency': string; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + */ 'network_risk_score': number; + /** + * When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + */ 'reason': 'account_disabled' | 'card_active' | 'card_canceled' | 'card_expired' | 'card_inactive' | 'cardholder_blocked' | 'cardholder_inactive' | 'cardholder_verification_required' | 'insecure_authorization_method' | 'insufficient_funds' | 'network_fallback' | 'not_allowed' | 'pin_blocked' | 'spending_controls' | 'suspected_fraud' | 'verification_failed' | 'webhook_approved' | 'webhook_declined' | 'webhook_error' | 'webhook_timeout'; + /** + * If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. + */ 'reason_message': string; + /** + * Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. + */ 'requested_at': number; }; export type IssuingNetworkTokenDeviceModel = { + /** + * An obfuscated ID derived from the device ID. + */ 'device_fingerprint'?: string | undefined; + /** + * The IP address of the device at provisioning time. + */ 'ip_address'?: string | undefined; + /** + * The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + */ 'location'?: string | undefined; + /** + * The name of the device used for tokenization. + */ 'name'?: string | undefined; + /** + * The phone number of the device used for tokenization. + */ 'phone_number'?: string | undefined; + /** + * The type of device used for tokenization. + */ 'type'?: 'other' | 'phone' | 'watch' | undefined; }; export type IssuingNetworkTokenMastercardModel = { + /** + * A unique reference ID from MasterCard to represent the card account number. + */ 'card_reference_id'?: string | undefined; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to MasterCard. + */ 'token_requestor_id': string; + /** + * The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + */ 'token_requestor_name'?: string | undefined; }; export type IssuingNetworkTokenVisaModel = { + /** + * A unique reference ID from Visa to represent the card account number. + */ 'card_reference_id': string; + /** + * The network-unique identifier for the token. + */ 'token_reference_id': string; + /** + * The ID of the entity requesting tokenization, specific to Visa. + */ 'token_requestor_id': string; + /** + * Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + */ 'token_risk_score'?: string | undefined; }; export type IssuingNetworkTokenAddressModel = { + /** + * The street address of the cardholder tokenizing the card. + */ 'line1': string; + /** + * The postal code of the cardholder tokenizing the card. + */ 'postal_code': string; }; export type IssuingNetworkTokenWalletProviderModel = { + /** + * The wallet provider-given account ID of the digital wallet the token belongs to. + */ 'account_id'?: string | undefined; + /** + * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + */ 'account_trust_score'?: number | undefined; + /** + * The method used for tokenizing a card. + */ 'card_number_source'?: 'app' | 'manual' | 'on_file' | 'other' | undefined; 'cardholder_address'?: IssuingNetworkTokenAddressModel | undefined; + /** + * The name of the cardholder tokenizing the card. + */ 'cardholder_name'?: string | undefined; + /** + * An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + */ 'device_trust_score'?: number | undefined; + /** + * The hashed email address of the cardholder's account with the wallet provider. + */ 'hashed_account_email_address'?: string | undefined; + /** + * The reasons for suggested tokenization given by the card network. + */ 'reason_codes'?: Array<'account_card_too_new' | 'account_recently_changed' | 'account_too_new' | 'account_too_new_since_launch' | 'additional_device' | 'data_expired' | 'defer_id_v_decision' | 'device_recently_lost' | 'good_activity_history' | 'has_suspended_tokens' | 'high_risk' | 'inactive_account' | 'long_account_tenure' | 'low_account_score' | 'low_device_score' | 'low_phone_number_score' | 'network_service_error' | 'outside_home_territory' | 'provisioning_cardholder_mismatch' | 'provisioning_device_and_cardholder_mismatch' | 'provisioning_device_mismatch' | 'same_device_no_prior_authentication' | 'same_device_successful_prior_authentication' | 'software_update' | 'suspicious_activity' | 'too_many_different_cardholders' | 'too_many_recent_attempts' | 'too_many_recent_tokens'> | undefined; + /** + * The recommendation on responding to the tokenization request. + */ 'suggested_decision'?: 'approve' | 'decline' | 'require_auth' | undefined; + /** + * The version of the standard for mapping reason codes followed by the wallet provider. + */ 'suggested_decision_version'?: string | undefined; }; export type IssuingNetworkTokenNetworkDataModel = { 'device'?: IssuingNetworkTokenDeviceModel | undefined; 'mastercard'?: IssuingNetworkTokenMastercardModel | undefined; + /** + * The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + */ 'type': 'mastercard' | 'visa'; 'visa'?: IssuingNetworkTokenVisaModel | undefined; 'wallet_provider'?: IssuingNetworkTokenWalletProviderModel | undefined; }; +/** + * An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. + */ export type IssuingTokenModel = { + /** + * Card associated with this token. + */ 'card': string | IssuingCardModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The hashed ID derived from the device ID from the card network associated with the token. + */ 'device_fingerprint': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the token. + */ 'last4'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The token service provider / card network associated with the token. + */ 'network': 'mastercard' | 'visa'; 'network_data'?: IssuingNetworkTokenNetworkDataModel | undefined; + /** + * Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + */ 'network_updated_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.token'; + /** + * The usage state of the token. + */ 'status': 'active' | 'deleted' | 'requested' | 'suspended'; + /** + * The digital wallet for this token, if one was used. + */ 'wallet_provider'?: 'apple_pay' | 'google_pay' | 'samsung_pay' | undefined; }; export type IssuingTransactionAmountDetailsModel = { + /** + * The fee charged by the ATM for the cash withdrawal. + */ 'atm_fee': number; + /** + * The amount of cash requested by the cardholder. + */ 'cashback_amount': number; }; export type IssuingDisputeCanceledEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when order was canceled. + */ 'canceled_at': number; + /** + * Whether the cardholder was provided with a cancellation policy. + */ 'cancellation_policy_provided': boolean; + /** + * Reason for canceling the order. + */ 'cancellation_reason': string; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at': number; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status': 'merchant_rejected' | 'successful'; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at': number; }; export type IssuingDisputeDuplicateEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + */ 'card_statement': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + */ 'cash_receipt': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + */ 'check_image': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + */ 'original_transaction': string; }; export type IssuingDisputeFraudulentEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; }; export type IssuingDisputeMerchandiseNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Date when the product was received. + */ 'received_at': number; + /** + * Description of the cardholder's attempt to return the product. + */ 'return_description': string; + /** + * Result of cardholder's attempt to return the product. + */ 'return_status': 'merchant_rejected' | 'successful'; + /** + * Date when the product was returned or attempted to be returned. + */ 'returned_at': number; }; export type IssuingDisputeNoValidAuthorizationEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; }; export type IssuingDisputeNotReceivedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when the cardholder expected to receive the product. + */ 'expected_at': number; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; }; export type IssuingDisputeOtherEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Description of the merchandise or service that was purchased. + */ 'product_description': string; + /** + * Whether the product was a merchandise or service. + */ 'product_type': 'merchandise' | 'service'; }; export type IssuingDisputeServiceNotAsDescribedEvidenceModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ 'additional_documentation': string | FileModel; + /** + * Date when order was canceled. + */ 'canceled_at': number; + /** + * Reason for canceling the order. + */ 'cancellation_reason': string; + /** + * Explanation of why the cardholder is disputing this transaction. + */ 'explanation': string; + /** + * Date when the product was received. + */ 'received_at': number; }; @@ -2284,377 +5453,1160 @@ export type IssuingDisputeEvidenceModel = { 'no_valid_authorization'?: IssuingDisputeNoValidAuthorizationEvidenceModel | undefined; 'not_received'?: IssuingDisputeNotReceivedEvidenceModel | undefined; 'other'?: IssuingDisputeOtherEvidenceModel | undefined; + /** + * The reason for filing the dispute. Its value will match the field containing the evidence. + */ 'reason': 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'no_valid_authorization' | 'not_received' | 'other' | 'service_not_as_described'; 'service_not_as_described'?: IssuingDisputeServiceNotAsDescribedEvidenceModel | undefined; }; export type IssuingDisputeTreasuryModel = { + /** + * The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + */ 'debit_reversal': string; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + */ 'received_debit': string; }; +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export type IssuingDisputeModel = { + /** + * Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + */ 'amount': number; + /** + * List of balance transactions associated with the dispute. + */ 'balance_transactions'?: BalanceTransactionModel[] | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency the `transaction` was made in. + */ 'currency': string; 'evidence': IssuingDisputeEvidenceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + */ 'loss_reason'?: 'cardholder_authentication_issuer_liability' | 'eci5_token_transaction_with_tavv' | 'excess_disputes_in_timeframe' | 'has_not_met_the_minimum_dispute_amount_requirements' | 'invalid_duplicate_dispute' | 'invalid_incorrect_amount_dispute' | 'invalid_no_authorization' | 'invalid_use_of_disputes' | 'merchandise_delivered_or_shipped' | 'merchandise_or_service_as_described' | 'not_cancelled' | 'other' | 'refund_issued' | 'submitted_beyond_allowable_time_limit' | 'transaction_3ds_required' | 'transaction_approved_after_prior_fraud_dispute' | 'transaction_authorized' | 'transaction_electronically_read' | 'transaction_qualifies_for_visa_easy_payment_service' | 'transaction_unattended' | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.dispute'; + /** + * Current status of the dispute. + */ 'status': 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won'; + /** + * The transaction being disputed. + */ 'transaction': string | IssuingTransactionModel; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingDisputeTreasuryModel | undefined; }; export type IssuingTransactionNetworkDataModel = { + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + */ 'authorization_code': string; + /** + * The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + */ 'processing_date': string; + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + */ 'transaction_id': string; }; export type IssuingTransactionFleetCardholderPromptDataModel = { + /** + * Driver ID. + */ 'driver_id': string; + /** + * Odometer reading. + */ 'odometer': number; + /** + * An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + */ 'unspecified_id': string; + /** + * User ID. + */ 'user_id': string; + /** + * Vehicle number. + */ 'vehicle_number': string; }; export type IssuingTransactionFleetFuelPriceDataModel = { + /** + * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingTransactionFleetNonFuelPriceDataModel = { + /** + * Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + */ 'gross_amount_decimal': string; }; export type IssuingTransactionFleetTaxDataModel = { + /** + * Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'local_amount_decimal': string; + /** + * Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + */ 'national_amount_decimal': string; }; export type IssuingTransactionFleetReportedBreakdownModel = { + /** + * Breakdown of fuel portion of the purchase. + */ 'fuel': IssuingTransactionFleetFuelPriceDataModel; + /** + * Breakdown of non-fuel portion of the purchase. + */ 'non_fuel': IssuingTransactionFleetNonFuelPriceDataModel; + /** + * Information about tax included in this transaction. + */ 'tax': IssuingTransactionFleetTaxDataModel; }; export type IssuingTransactionFleetDataModel = { + /** + * Answers to prompts presented to cardholder at point of sale. + */ 'cardholder_prompt_data': IssuingTransactionFleetCardholderPromptDataModel; + /** + * The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + */ 'purchase_type': string; + /** + * More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + */ 'reported_breakdown': IssuingTransactionFleetReportedBreakdownModel; + /** + * The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + */ 'service_type': string; }; export type IssuingTransactionFlightDataLegModel = { + /** + * The three-letter IATA airport code of the flight's destination. + */ 'arrival_airport_code': string; + /** + * The airline carrier code. + */ 'carrier': string; + /** + * The three-letter IATA airport code that the flight departed from. + */ 'departure_airport_code': string; + /** + * The flight number. + */ 'flight_number': string; + /** + * The flight's service class. + */ 'service_class': string; + /** + * Whether a stopover is allowed on this flight. + */ 'stopover_allowed': boolean; }; export type IssuingTransactionFlightDataModel = { + /** + * The time that the flight departed. + */ 'departure_at': number; + /** + * The name of the passenger. + */ 'passenger_name': string; + /** + * Whether the ticket is refundable. + */ 'refundable': boolean; + /** + * The legs of the trip. + */ 'segments': IssuingTransactionFlightDataLegModel[]; + /** + * The travel agency that issued the ticket. + */ 'travel_agency': string; }; export type IssuingTransactionFuelDataModel = { + /** + * [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + */ 'industry_product_code': string; + /** + * The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + */ 'quantity_decimal': string; + /** + * The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + */ 'type': string; + /** + * The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + */ 'unit': string; + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ 'unit_cost_decimal': string; }; export type IssuingTransactionLodgingDataModel = { + /** + * The time of checking into the lodging. + */ 'check_in_at': number; + /** + * The number of nights stayed at the lodging. + */ 'nights': number; }; export type IssuingTransactionReceiptDataModel = { + /** + * The description of the item. The maximum length of this field is 26 characters. + */ 'description': string; + /** + * The quantity of the item. + */ 'quantity': number; + /** + * The total for this line item in cents. + */ 'total': number; + /** + * The unit cost of the item in cents. + */ 'unit_cost': number; }; export type IssuingTransactionPurchaseDetailsModel = { + /** + * Fleet-specific information for transactions using Fleet cards. + */ 'fleet': IssuingTransactionFleetDataModel; + /** + * Information about the flight that was purchased with this transaction. + */ 'flight': IssuingTransactionFlightDataModel; + /** + * Information about fuel that was purchased with this transaction. + */ 'fuel': IssuingTransactionFuelDataModel; + /** + * Information about lodging that was purchased with this transaction. + */ 'lodging': IssuingTransactionLodgingDataModel; + /** + * The line items in the purchase. + */ 'receipt': IssuingTransactionReceiptDataModel[]; + /** + * A merchant-specific order number. + */ 'reference': string; }; +/** + * When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + */ export type IssuingSettlementModel = { + /** + * The Bank Identification Number reflecting this settlement record. + */ 'bin': string; + /** + * The date that the transactions are cleared and posted to user's accounts. + */ 'clearing_date': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The total interchange received as reimbursement for the transactions. + */ 'interchange_fees_amount': 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': { [key: string]: string; }; + /** + * The total net amount required to settle with the network. + */ 'net_total_amount': number; + /** + * The card network for this settlement report. One of ["visa", "maestro"] + */ 'network': 'maestro' | 'visa'; + /** + * The total amount of fees owed to the network. + */ 'network_fees_amount': number; + /** + * The Settlement Identification Number assigned by the network. + */ 'network_settlement_identifier': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.settlement'; + /** + * The total amount of any additional fees assessed by the card network. + */ 'other_fees_amount'?: number | undefined; + /** + * The total number of additional fees assessed by the card network. + */ 'other_fees_count'?: number | undefined; + /** + * One of `international` or `uk_national_net`. + */ 'settlement_service': string; + /** + * The current processing status of this settlement. + */ 'status': 'complete' | 'pending'; + /** + * The total transaction amount reflected in this settlement. + */ 'transaction_amount': number; + /** + * The total number of transactions reflected in this settlement. + */ 'transaction_count': number; }; export type IssuingTransactionTreasuryModel = { + /** + * The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + */ 'received_credit': string; + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + */ 'received_debit': string; }; +/** + * Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) + */ export type IssuingTransactionModel = { + /** + * The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingTransactionAmountDetailsModel; + /** + * The `Authorization` object that led to this transaction. + */ 'authorization': string | IssuingAuthorizationModel; + /** + * ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * The card used to make this transaction. + */ 'card': string | IssuingCardModel; + /** + * The cardholder to whom this transaction belongs. + */ 'cardholder': string | IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * If you've disputed the transaction, the ID of the dispute. + */ 'dispute': string | IssuingDisputeModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + */ 'merchant_amount': number; + /** + * The currency with which the merchant is taking payment. + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the transaction, such as processing dates, set by the card network. + */ 'network_data': IssuingTransactionNetworkDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.transaction'; + /** + * Additional purchase information that is optionally provided by the merchant. + */ 'purchase_details'?: IssuingTransactionPurchaseDetailsModel | undefined; + /** + * The ID of the [settlement](https://stripe.com/docs/api/issuing/settlements) to which this transaction belongs. + */ 'settlement'?: string | IssuingSettlementModel | undefined; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ 'treasury'?: IssuingTransactionTreasuryModel | undefined; + /** + * The nature of the transaction. + */ 'type': 'capture' | 'refund'; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + */ 'wallet': 'apple_pay' | 'google_pay' | 'samsung_pay'; }; export type IssuingAuthorizationTreasuryModel = { + /** + * The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + */ 'received_credits': string[]; + /** + * The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + */ 'received_debits': string[]; + /** + * The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + */ 'transaction': string; }; export type IssuingAuthorizationAuthenticationExemptionModel = { + /** + * The entity that requested the exemption, either the acquiring merchant or the Issuing user. + */ 'claimed_by': 'acquirer' | 'issuer'; + /** + * The specific exemption claimed for this authorization. + */ 'type': 'low_value_transaction' | 'transaction_risk_analysis' | 'unknown'; }; export type IssuingAuthorizationThreeDSecureModel = { + /** + * The outcome of the 3D Secure authentication request. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'failed' | 'required'; }; export type IssuingAuthorizationVerificationDataModel = { + /** + * Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + */ 'address_line1_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + */ 'address_postal_code_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The exemption applied to this authorization. + */ 'authentication_exemption': IssuingAuthorizationAuthenticationExemptionModel; + /** + * Whether the cardholder provided a CVC and if it matched Stripe’s record. + */ 'cvc_check': 'match' | 'mismatch' | 'not_provided'; + /** + * Whether the cardholder provided an expiry date and if it matched Stripe’s record. + */ 'expiry_check': 'match' | 'mismatch' | 'not_provided'; + /** + * The postal code submitted as part of the authorization used for postal code verification. + */ 'postal_code': string; + /** + * 3D Secure details. + */ 'three_d_secure': IssuingAuthorizationThreeDSecureModel; }; +/** + * When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + */ export type IssuingAuthorizationModel = { + /** + * The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + */ 'amount': number; + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_details': IssuingAuthorizationAmountDetailsModel; + /** + * Whether the authorization has been approved. + */ 'approved': boolean; + /** + * How the card details were provided. + */ 'authorization_method': 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe'; + /** + * List of balance transactions associated with this authorization. + */ 'balance_transactions': BalanceTransactionModel[]; 'card': IssuingCardModel; + /** + * The cardholder to whom this authorization belongs. + */ 'cardholder': string | IssuingCardholderModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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; + /** + * Fleet-specific information for authorizations using Fleet cards. + */ 'fleet': IssuingAuthorizationFleetDataModel; + /** + * Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + */ 'fraud_challenges'?: IssuingAuthorizationFraudChallengeModel[] | undefined; + /** + * Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + */ 'fuel': IssuingAuthorizationFuelDataModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + */ 'merchant_amount': number; + /** + * The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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). + */ 'merchant_currency': string; 'merchant_data': IssuingAuthorizationMerchantDataModel; + /** + * 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': { [key: string]: string; }; + /** + * Details about the authorization, such as identifiers, set by the card network. + */ 'network_data': IssuingAuthorizationNetworkDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.authorization'; + /** + * The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + */ 'pending_request': IssuingAuthorizationPendingRequestModel; + /** + * History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + */ 'request_history': IssuingAuthorizationRequest_1Model[]; + /** + * The current status of the authorization in its lifecycle. + */ 'status': 'closed' | 'expired' | 'pending' | 'reversed'; + /** + * [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + */ 'token'?: string | IssuingTokenModel | undefined; + /** + * List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + */ 'transactions': IssuingTransactionModel[]; + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + */ 'treasury'?: IssuingAuthorizationTreasuryModel | undefined; 'verification_data': IssuingAuthorizationVerificationDataModel; + /** + * Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + */ 'verified_by_fraud_challenge': boolean; + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + */ 'wallet': string; }; export type DeletedBankAccountModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; }; export type DeletedCardModel = { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'card'; }; export type DeletedExternalAccountModel = DeletedBankAccountModel | DeletedCardModel; export type PayoutsTraceIdModel = { + /** + * Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + */ 'status': string; + /** + * The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + */ 'value': string; }; +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export type PayoutModel = { + /** + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + */ 'amount': number; + /** + * The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee': string | ApplicationFeeModel; + /** + * The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + */ 'application_fee_amount': number; + /** + * Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + */ 'arrival_date': number; + /** + * Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + */ 'automatic': boolean; + /** + * ID of the balance transaction that describes the impact of this payout on your account balance. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * ID of the bank account or card the payout is sent to. + */ 'destination': string | ExternalAccountModel | DeletedExternalAccountModel; + /** + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + */ 'failure_balance_transaction': string | BalanceTransactionModel; + /** + * Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + */ 'failure_code': string; + /** + * Message that provides the reason for a payout failure, if available. + */ 'failure_message': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + */ 'method': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payout'; + /** + * If the payout reverses another, this is the ID of the original payout. + */ 'original_payout': string | PayoutModel; + /** + * ID of the v2 FinancialAccount the funds are sent to. + */ 'payout_method': string; + /** + * If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + */ 'reconciliation_status': 'completed' | 'in_progress' | 'not_applicable'; + /** + * If the payout reverses, this is the ID of the payout that reverses this payout. + */ 'reversed_by': string | PayoutModel; + /** + * The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + */ 'source_type': string; + /** + * Extra information about a payout that displays on the user's bank statement. + */ 'statement_descriptor': string; + /** + * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + */ 'status': string; + /** + * A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + */ 'trace_id': PayoutsTraceIdModel; + /** + * Can be `bank_account` or `card`. + */ 'type': 'bank_account' | 'card'; }; export type ReserveTransactionModel = { 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reserve_transaction'; }; export type TaxDeductedAtSourceModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_deducted_at_source'; + /** + * The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_end': number; + /** + * The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ 'period_start': number; + /** + * The TAN that was supplied to Stripe when TDS was assessed + */ 'tax_deduction_account_number': string; }; +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export type TopupModel = { + /** + * Amount transferred. + */ 'amount': number; + /** + * ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + */ 'expected_availability_date': number; + /** + * Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + */ 'failure_code': string; + /** + * Message to user further explaining reason for top-up failure if available. + */ 'failure_message': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'topup'; + /** + * The source field is deprecated. It might not always be present in the API response. + */ 'source': SourceModel; + /** + * Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + */ 'statement_descriptor': string; + /** + * The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + */ 'status': 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded'; + /** + * A string that identifies this top-up as part of a group. + */ 'transfer_group': string; }; export type BalanceTransactionSourceModel = ApplicationFeeModel | ChargeModel | ConnectCollectionTransferModel | CustomerCashBalanceTransactionModel | DisputeModel | FeeRefundModel | IssuingAuthorizationModel | IssuingDisputeModel | IssuingTransactionModel | PayoutModel | RefundModel | ReserveTransactionModel | TaxDeductedAtSourceModel | TopupModel | TransferModel | TransferReversalModel; +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export type BalanceTransactionModel = { + /** + * Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + */ 'amount': number; + /** + * The date that the transaction's net funds become available in the Stripe balance. + */ 'available_on': number; + /** + * The balance that this transaction impacts. + */ 'balance_type'?: 'issuing' | 'payments' | 'refund_and_dispute_prefunding' | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + */ 'exchange_rate': number; + /** + * Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + */ 'fee': number; + /** + * Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + */ 'fee_details': FeeModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + */ 'net': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_transaction'; + /** + * Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + */ 'reporting_category': string; + /** + * This transaction relates to the Stripe object. + */ 'source': string | BalanceTransactionSourceModel; + /** + * The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + */ 'status': string; + /** + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + */ 'type': 'adjustment' | 'advance' | 'advance_funding' | 'anticipation_repayment' | 'application_fee' | 'application_fee_refund' | 'charge' | 'climate_order_purchase' | 'climate_order_refund' | 'connect_collection_transfer' | 'contribution' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'issuing_dispute' | 'issuing_transaction' | 'obligation_outbound' | 'obligation_reversal_inbound' | 'payment' | 'payment_failure_refund' | 'payment_network_reserve_hold' | 'payment_network_reserve_release' | 'payment_refund' | 'payment_reversal' | 'payment_unreconciled' | 'payout' | 'payout_cancel' | 'payout_failure' | 'payout_minimum_balance_hold' | 'payout_minimum_balance_release' | 'refund' | 'refund_failure' | 'reserve_transaction' | 'reserved_funds' | 'stripe_balance_payment_debit' | 'stripe_balance_payment_debit_reversal' | 'stripe_fee' | 'stripe_fx_fee' | 'tax_fee' | 'topup' | 'topup_reversal' | 'transfer' | 'transfer_cancel' | 'transfer_failure' | 'transfer_refund'; }; export type PlatformEarningFeeSourceModel = { + /** + * Charge ID that created this application fee. + */ 'charge'?: string | undefined; + /** + * Payout ID that created this application fee. + */ 'payout'?: string | undefined; + /** + * Type of object that created the application fee. + */ 'type': 'charge' | 'payout'; }; export type ApplicationFeeModel = { + /** + * ID of the Stripe account this fee was taken from. + */ 'account': string | AccountModel; + /** + * Amount earned, in cents (or local equivalent). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + */ 'amount_refunded': number; + /** + * ID of the Connect application that earned the fee. + */ 'application': string | ApplicationModel; + /** + * Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * ID of the charge that the application fee was taken from. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + */ 'fee_source': PlatformEarningFeeSourceModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application_fee'; + /** + * ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + */ 'originating_transaction': string | ChargeModel; + /** + * Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the fee. + */ 'refunds': { + /** + * Details about each object. + */ 'data': FeeRefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; export type ChargeFraudDetailsModel = { + /** + * Assessments from Stripe. If set, the value is `fraudulent`. + */ 'stripe_report'?: string | undefined; + /** + * Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + */ 'user_report'?: string | undefined; }; @@ -2677,185 +6629,463 @@ export type Level3Model = { }; export type RuleModel = { + /** + * The action taken on the payment. + */ 'action': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The predicate to evaluate the payment against. + */ 'predicate': string; }; export type ChargeOutcomeModel = { + /** + * An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines). + */ 'advice_code': 'confirm_card_data' | 'do_not_try_again' | 'try_again_later'; + /** + * For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + */ 'network_advice_code': string; + /** + * For charges declined by the network, an alphanumeric code which indicates the reason the charge failed. + */ 'network_decline_code': string; + /** + * Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + */ 'network_status': string; + /** + * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + */ 'reason': string; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + */ 'risk_level'?: string | undefined; + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + */ 'risk_score'?: number | undefined; + /** + * The ID of the Radar rule that matched the payment, if applicable. + */ 'rule'?: string | RuleModel | undefined; + /** + * A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + */ 'seller_message': string; + /** + * Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + */ 'type': string; }; export type PaymentMethodDetailsAchCreditTransferModel = { + /** + * Account number to transfer funds to. + */ 'account_number': string; + /** + * Name of the bank associated with the routing number. + */ 'bank_name': string; + /** + * Routing transit number for the bank account to transfer funds to. + */ 'routing_number': string; + /** + * SWIFT code of the bank associated with the routing number. + */ 'swift_code': string; }; export type PaymentMethodDetailsAchDebitModel = { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Routing transit number of the bank account. + */ 'routing_number': string; }; export type PaymentMethodDetailsAcssDebitModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Institution number of the bank account + */ 'institution_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; + /** + * Transit number of the bank account. + */ 'transit_number': string; }; export type PaymentMethodDetailsAffirmModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * The Affirm transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsAfterpayClearpayModel = { + /** + * The Afterpay order ID associated with this payment intent. + */ 'order_id': string; + /** + * Order identifier shown to the merchant in Afterpay’s online portal. + */ 'reference': string; }; export type PaymentFlowsPrivatePaymentMethodsAlipayDetailsModel = { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'buyer_id'?: string | undefined; + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ 'fingerprint': string; + /** + * Transaction ID of this particular Alipay transaction. + */ 'transaction_id': string; }; export type AlmaInstallmentsModel = { + /** + * The number of installments. + */ 'count': number; }; export type PaymentMethodDetailsAlmaModel = { 'installments'?: AlmaInstallmentsModel | undefined; + /** + * The Alma transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsPassthroughCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ 'brand_product'?: string | undefined; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * The last four digits of the card. + */ 'last4': string; }; export type AmazonPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type': 'card'; }; export type PaymentMethodDetailsAmazonPayModel = { 'funding'?: AmazonPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Amazon Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsAuBecsDebitModel = { + /** + * Bank-State-Branch number of the bank account. + */ 'bsb_number': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; }; export type PaymentMethodDetailsBacsDebitModel = { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate': string; + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ 'sort_code': string; }; export type PaymentMethodDetailsBancontactModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; export type PaymentMethodDetailsBillieModel = { + /** + * The Billie transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsBlikModel = { + /** + * A unique and immutable identifier assigned by BLIK to every buyer. + */ 'buyer_id': string; }; export type PaymentMethodDetailsBoletoModel = { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ 'tax_id': string; }; export type PaymentMethodDetailsCardChecksModel = { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_line1_check': string; + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'address_postal_code_check': string; + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ 'cvc_check': string; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesDecrementalAuthorizationDecrementalAuthorizationModel = { + /** + * Indicates whether or not the decremental authorization feature is supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel = { + /** + * Indicates whether or not the capture window is extended beyond the standard authorization. + */ 'status': 'disabled' | 'enabled'; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel = { + /** + * Indicates whether or not the incremental authorization feature is supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardInstallmentsPlanModel = { + /** + * For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + */ 'count': number; + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ 'interval': 'month'; + /** + * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + */ 'type': 'bonus' | 'fixed_count' | 'revolving'; }; export type PaymentMethodDetailsCardInstallmentsModel = { + /** + * Installment plan selected for the payment. + */ 'plan': PaymentMethodDetailsCardInstallmentsPlanModel; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel = { + /** + * Indicates whether or not multiple captures are supported. + */ 'status': 'available' | 'unavailable'; }; export type PaymentMethodDetailsCardNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel = { + /** + * The maximum amount that can be captured. + */ 'maximum_amount_capturable': number; + /** + * Indicates whether or not the authorized amount can be over-captured. + */ 'status': 'available' | 'unavailable'; }; export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesPartialAuthorizationPartialAuthorizationModel = { + /** + * Indicates whether the transaction requested for partial authorization feature and the authorization outcome. + */ 'status': 'declined' | 'fully_authorized' | 'not_requested' | 'partially_authorized'; }; export type ThreeDSecureDetailsChargeModel = { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ 'authentication_flow': 'challenge' | 'frictionless'; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ 'electronic_commerce_indicator': '01' | '02' | '05' | '06' | '07'; + /** + * The exemption requested via 3DS and accepted by the issuer at authentication time. + */ 'exemption_indicator': 'low_risk' | 'none'; + /** + * Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + * the outcome of Stripe's internal risk assessment. + */ 'exemption_indicator_applied'?: boolean | undefined; + /** + * Indicates the outcome of 3D Secure authentication. + */ 'result': 'attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error'; + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ 'result_reason': 'abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected'; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ 'transaction_id': string; + /** + * The version of 3D Secure that was used. + */ 'version': '1.0.2' | '2.1.0' | '2.2.0'; }; @@ -2868,9 +7098,21 @@ export type PaymentMethodDetailsCardWalletLinkModel = { }; export type PaymentMethodDetailsCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; @@ -2879,67 +7121,182 @@ export type PaymentMethodDetailsCardWalletSamsungPayModel = { }; export type PaymentMethodDetailsCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; export type PaymentMethodDetailsCardWalletModel = { 'amex_express_checkout'?: PaymentMethodDetailsCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodDetailsCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; 'google_pay'?: PaymentMethodDetailsCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodDetailsCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodDetailsCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodDetailsCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodDetailsCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodDetailsCardModel = { + /** + * The authorized amount. + */ 'amount_authorized': number; + /** + * The latest amount intended to be authorized by this charge. + */ 'amount_requested'?: number | undefined; + /** + * Authorization code on the charge. + */ 'authorization_code': string; + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks': PaymentMethodDetailsCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; 'decremental_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesDecrementalAuthorizationDecrementalAuthorizationModel | undefined; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; 'extended_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationModel | undefined; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; 'incremental_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationModel | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments': PaymentMethodDetailsCardInstallmentsModel; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * ID of the mandate used to make this payment or created by it. + */ 'mandate': string; + /** + * True if this payment was marked as MOTO and out of scope for SCA. + */ 'moto'?: boolean | undefined; 'multicapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureModel | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentMethodDetailsCardNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; 'overcapture'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureModel | undefined; 'partial_authorization'?: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesPartialAuthorizationPartialAuthorizationModel | undefined; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure': ThreeDSecureDetailsChargeModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentMethodDetailsCardWalletModel; }; export type PaymentMethodDetailsCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id': string; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag': string; + /** + * A unique and immutable identifier of payments assigned by Cash App + */ 'transaction_id': string; }; export type PaymentMethodDetailsCryptoModel = { + /** + * The wallet address of the customer. + */ 'buyer_address'?: string | undefined; + /** + * The blockchain network that the transaction was sent on. + */ 'network'?: 'base' | 'ethereum' | 'polygon' | 'solana' | undefined; + /** + * The token currency that the transaction was sent with. + */ 'token_currency'?: 'usdc' | 'usdg' | 'usdp' | undefined; + /** + * The blockchain transaction hash of the crypto payment. + */ 'transaction_hash'?: string | undefined; }; @@ -2948,20 +7305,51 @@ export type PaymentMethodDetailsCustomerBalanceModel = { }; export type PaymentMethodDetailsEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank': 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau'; + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; export type PaymentMethodDetailsFpxModel = { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; + /** + * Unique transaction id generated by FPX for every request from the merchant + */ 'transaction_id': string; }; export type PaymentMethodDetailsGiropayModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; @@ -2970,95 +7358,263 @@ export type PaymentMethodDetailsGopayModel = { }; export type PaymentMethodDetailsGrabpayModel = { + /** + * Unique transaction id generated by GrabPay + */ 'transaction_id': string; }; export type PaymentMethodDetailsIdBankTransferModel = { + /** + * Account number of the bank account to transfer funds to. + */ 'account_number': string; + /** + * Bank where the account is located. + */ 'bank': 'bca' | 'bni' | 'bri' | 'cimb' | 'permata'; + /** + * Local bank code of the bank. + */ 'bank_code'?: string | undefined; + /** + * Name of the bank associated with the bank account. + */ 'bank_name'?: string | undefined; + /** + * Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + */ 'display_name'?: string | undefined; }; export type PaymentMethodDetailsIdealModel = { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Unique transaction ID generated by iDEAL. + */ 'transaction_id': string; + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; export type PaymentMethodDetailsInteracPresentReceiptModel = { + /** + * The type of account being debited or credited + */ 'account_type'?: 'checking' | 'savings' | 'unknown' | undefined; + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. + */ 'application_cryptogram': string; + /** + * The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. + */ 'application_preferred_name': string; + /** + * Identifier for this transaction. + */ 'authorization_code': string; + /** + * EMV tag 8A. A code returned by the card issuer. + */ 'authorization_response_code': string; + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ 'cardholder_verification_method': string; + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. + */ 'dedicated_file_name': string; + /** + * A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ 'terminal_verification_results': string; + /** + * An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. + */ 'transaction_status_information': string; }; export type PaymentMethodDetailsInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Authorization response cryptogram. + */ 'emv_auth_data': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': string; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ 'receipt': PaymentMethodDetailsInteracPresentReceiptModel; }; export type PaymentMethodDetailsKakaoPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Kakao Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type KlarnaAddressModel = { + /** + * The payer address country + */ 'country': string; }; export type KlarnaPayerDetailsModel = { + /** + * The payer's address + */ 'address': KlarnaAddressModel; }; export type PaymentMethodDetailsKlarnaModel = { + /** + * The payer details for this transaction. + */ 'payer_details': KlarnaPayerDetailsModel; + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ 'payment_method_category': string; + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ 'preferred_locale': string; }; export type PaymentMethodDetailsKonbiniStoreModel = { + /** + * The name of the convenience store chain where the payment was completed. + */ 'chain': 'familymart' | 'lawson' | 'ministop' | 'seicomart'; }; export type PaymentMethodDetailsKonbiniModel = { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ 'store': PaymentMethodDetailsKonbiniStoreModel; }; export type PaymentMethodDetailsKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand': 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori'; + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4': string; + /** + * The Korean Card transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsLinkModel = { + /** + * 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; }; @@ -3067,43 +7623,105 @@ export type PaymentMethodDetailsMbWayModel = { }; export type InternalCardModel = { + /** + * Brand of the card used in the transaction + */ 'brand': string; + /** + * Two-letter ISO code representing the country of the card + */ 'country': string; + /** + * Two digit number representing the card's expiration month + */ 'exp_month': number; + /** + * Two digit number representing the card's expiration year + */ 'exp_year': number; + /** + * The last 4 digits of the card + */ 'last4': string; }; export type PaymentMethodDetailsMobilepayModel = { + /** + * Internal card details + */ 'card': InternalCardModel; }; export type PaymentMethodDetailsMultibancoModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity': string; + /** + * Reference number associated with this Multibanco payment. + */ 'reference': string; }; export type PaymentMethodDetailsNaverPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Naver Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name': string; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix': string; }; export type PaymentMethodDetailsOxxoModel = { + /** + * OXXO reference number + */ 'number': string; }; export type PaymentMethodDetailsP24Model = { + /** + * The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ 'bank': 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank'; + /** + * Unique reference for this Przelewy24 payment. + */ 'reference': string; + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ 'verified_name': string; }; @@ -3112,31 +7730,90 @@ export type PaymentMethodDetailsPayByBankModel = { }; export type PaymentMethodDetailsPaycoModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Payco transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsPaynowModel = { + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Reference number associated with this PayNow payment + */ 'reference': string; }; export type PaypalSellerProtectionModel = { + /** + * An array of conditions that are covered for the transaction, if applicable. + */ 'dispute_categories': Array<'fraudulent' | 'product_not_received'>; + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + */ 'status': 'eligible' | 'not_eligible' | 'partially_eligible'; }; export type PaymentMethodDetailsPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country': string; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email': string; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; + /** + * Owner's full name. Values provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_name': string; + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + */ 'seller_protection': PaypalSellerProtectionModel; + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ 'shipping'?: AddressModel | undefined; + /** + * A unique ID generated by PayPal for this transaction. + */ 'transaction_id': string; + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ 'verified_address'?: AddressModel | undefined; + /** + * Owner's verified email. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email'?: string | undefined; + /** + * Owner's verified full name. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name'?: string | undefined; }; @@ -3145,18 +7822,39 @@ export type PaymentMethodDetailsPaypayModel = { }; export type PaymentMethodDetailsPaytoModel = { + /** + * Bank-State-Branch number of the bank account. + */ 'bsb_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | undefined; + /** + * The PayID alias for the bank account. + */ 'pay_id': string; }; export type PaymentMethodDetailsPixModel = { + /** + * Unique transaction id generated by BCB + */ 'bank_transaction_id'?: string | undefined; + /** + * ID of the multi use Mandate generated by the PaymentIntent + */ 'mandate'?: string | undefined; }; export type PaymentMethodDetailsPromptpayModel = { + /** + * Bill reference generated by PromptPay + */ 'reference': string; }; @@ -3165,40 +7863,85 @@ export type PaymentMethodDetailsQrisModel = { }; export type PaymentMethodDetailsRechnungModel = { + /** + * Payment portal URL. + */ 'payment_portal_url': string; }; export type RevolutPayUnderlyingPaymentMethodFundingDetailsModel = { 'card'?: PaymentMethodDetailsPassthroughCardModel | undefined; + /** + * funding type of the underlying payment method. + */ 'type': 'card'; }; export type PaymentMethodDetailsRevolutPayModel = { 'funding'?: RevolutPayUnderlyingPaymentMethodFundingDetailsModel | undefined; + /** + * The Revolut Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSamsungPayModel = { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ 'buyer_id': string; + /** + * The Samsung Pay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSatispayModel = { + /** + * The Satispay transaction ID associated with this payment. + */ 'transaction_id': string; }; export type PaymentMethodDetailsSepaCreditTransferModel = { + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * IBAN of the bank account to transfer funds to. + */ 'iban': string; }; export type PaymentMethodDetailsSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four characters of the IBAN. + */ 'last4': string; + /** + * Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + */ 'mandate': string; }; @@ -3207,14 +7950,43 @@ export type PaymentMethodDetailsShopeepayModel = { }; export type PaymentMethodDetailsSofortModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Bank Identifier Code of the bank associated with the bank account. + */ 'bic': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit': string | PaymentMethodModel; + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ 'generated_sepa_debit_mandate': string | MandateModel; + /** + * Last four characters of the IBAN. + */ 'iban_last4': string; + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ 'preferred_language': 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl'; + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_name': string; }; @@ -3223,13 +7995,28 @@ export type PaymentMethodDetailsStripeAccountModel = { }; export type PaymentMethodDetailsStripeBalanceModel = { + /** + * The connected account ID whose Stripe balance to use as the source of payment + */ 'account'?: string | undefined; + /** + * The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + */ 'source_type': 'bank_account' | 'card' | 'fpx'; }; export type PaymentMethodDetailsSwishModel = { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + */ 'fingerprint': string; + /** + * Payer bank reference number for the payment + */ 'payment_reference': string; + /** + * The last four digits of the Swish account phone number + */ 'verified_phone_last4': string; }; @@ -3238,13 +8025,37 @@ export type PaymentMethodDetailsTwintModel = { }; export type PaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * Reference number to locate ACH payments with customer's bank. + */ 'payment_reference': string; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; @@ -3253,9 +8064,21 @@ export type PaymentMethodDetailsWechatModel = { }; export type PaymentMethodDetailsWechatPayModel = { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ 'fingerprint': string; + /** + * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to. + */ 'location'?: string | undefined; + /** + * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on. + */ 'reader'?: string | undefined; + /** + * Transaction ID of this particular WeChat Pay transaction. + */ 'transaction_id': string; }; @@ -3324,6 +8147,11 @@ export type PaymentMethodDetailsModel = { 'stripe_balance'?: PaymentMethodDetailsStripeBalanceModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentMethodDetailsUsBankAccountModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -3331,324 +8159,907 @@ export type PaymentMethodDetailsModel = { 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export type RadarRadarOptionsModel = { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ 'session'?: string | undefined; }; export type RadarReviewResourceLocationModel = { + /** + * The city where the payment originated. + */ 'city': string; + /** + * Two-letter ISO code representing the country where the payment originated. + */ 'country': string; + /** + * The geographic latitude where the payment originated. + */ 'latitude': number; + /** + * The geographic longitude where the payment originated. + */ 'longitude': number; + /** + * The state/county/province/region where the payment originated. + */ 'region': string; }; export type RadarReviewResourceSessionModel = { + /** + * The browser used in this browser session (e.g., `Chrome`). + */ 'browser': string; + /** + * Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + */ 'device': string; + /** + * The platform for the browser session (e.g., `Macintosh`). + */ 'platform': string; + /** + * The version for the browser session (e.g., `61.0.3163.100`). + */ 'version': string; }; +/** + * Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ export type ReviewModel = { + /** + * The ZIP or postal code of the card used, if applicable. + */ 'billing_zip': string; + /** + * The charge associated with this review. + */ 'charge': string | ChargeModel; + /** + * The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'closed_reason': 'acknowledged' | 'approved' | 'canceled' | 'disputed' | 'payment_never_settled' | 'redacted' | 'refunded' | 'refunded_as_fraud'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The IP address where the payment originated. + */ 'ip_address': string; + /** + * Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + */ 'ip_address_location': RadarReviewResourceLocationModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'review'; + /** + * If `true`, the review needs action. + */ 'open': boolean; + /** + * The reason the review was opened. One of `rule` or `manual`. + */ 'opened_reason': 'manual' | 'rule'; + /** + * The PaymentIntent ID associated with this review, if one exists. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`. + */ 'reason': string; + /** + * Information related to the browsing session of the user who initiated the payment. + */ 'session': RadarReviewResourceSessionModel; }; export type ChargeTransferDataModel = { + /** + * The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + */ 'amount': number; + /** + * ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + */ 'destination': string | AccountModel; }; +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export type ChargeModel = { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + */ 'amount_captured': number; + /** + * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + */ 'amount_refunded': number; + /** + * ID of the Connect application that created the charge. + */ 'application': string | ApplicationModel; + /** + * The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee': string | ApplicationFeeModel; + /** + * The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + */ 'application_fee_amount': number; + /** + * Authorization code on the charge. + */ 'authorization_code'?: string | undefined; + /** + * ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + */ 'balance_transaction': string | BalanceTransactionModel; 'billing_details': BillingDetailsModel; + /** + * The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + */ 'calculated_statement_descriptor': string; + /** + * If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + */ 'captured': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer this charge is for if one exists. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Whether the charge has been disputed. + */ 'disputed': boolean; + /** + * ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + */ 'failure_balance_transaction': string | BalanceTransactionModel; + /** + * Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + */ 'failure_code': string; + /** + * Message to user further explaining reason for charge failure if available. + */ 'failure_message': string; + /** + * Information on fraud assessments for the charge. + */ 'fraud_details': ChargeFraudDetailsModel; + /** + * Unique identifier for the object. + */ 'id': string; 'level3'?: Level3Model | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'charge'; + /** + * The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + */ 'outcome': ChargeOutcomeModel; + /** + * `true` if the charge succeeded, or was successfully authorized for later capture. + */ 'paid': boolean; + /** + * ID of the PaymentIntent associated with this charge, if one exists. + */ 'payment_intent': string | PaymentIntentModel; + /** + * ID of the payment method used in this charge. + */ 'payment_method': string; + /** + * Details about the payment method at the time of the transaction. + */ 'payment_method_details': PaymentMethodDetailsModel; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; 'radar_options'?: RadarRadarOptionsModel | undefined; + /** + * This is the email address that the receipt for this charge was sent to. + */ 'receipt_email': string; + /** + * This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + */ 'receipt_number': string; + /** + * This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + */ 'receipt_url': string; + /** + * Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + */ 'refunded': boolean; + /** + * A list of refunds that have been applied to the charge. + */ 'refunds'?: { + /** + * Details about each object. + */ 'data': RefundModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the review associated with this charge if one exists. + */ 'review': string | ReviewModel; + /** + * Shipping information for the charge. + */ 'shipping': ShippingModel; + /** + * This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. + */ 'source': PaymentSourceModel; + /** + * The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + */ 'source_transfer': string | TransferModel; + /** + * For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + */ 'statement_descriptor': string; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + */ 'statement_descriptor_suffix': string; + /** + * The status of the payment is either `succeeded`, `pending`, or `failed`. + */ 'status': 'failed' | 'pending' | 'succeeded'; + /** + * ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + */ 'transfer'?: string | TransferModel | undefined; + /** + * An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ 'transfer_data': ChargeTransferDataModel; + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + */ 'transfer_group': string; }; export type PaymentIntentNextActionAlipayHandleRedirectModel = { + /** + * The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + */ 'native_data': string; + /** + * The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + */ 'native_url': string; + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url': string; }; export type PaymentIntentNextActionBoletoModel = { + /** + * The timestamp after which the boleto expires. + */ 'expires_at': number; + /** + * The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + */ 'hosted_voucher_url': string; + /** + * The boleto number. + */ 'number': string; + /** + * The URL to the downloadable boleto voucher PDF. + */ 'pdf': string; }; export type PaymentIntentNextActionCardAwaitNotificationModel = { + /** + * The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ 'charge_attempt_at': number; + /** + * For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + */ 'customer_approval_required': boolean; }; export type PaymentIntentNextActionCashappQrCodeModel = { + /** + * The date (unix timestamp) when the QR code expires. + */ 'expires_at': number; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + */ 'hosted_instructions_url': string; + /** + * The url for mobile redirect based auth + */ 'mobile_auth_url': string; 'qr_code': PaymentIntentNextActionCashappQrCodeModel; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type FundingInstructionsBankTransferAbaRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The ABA account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The ABA routing number + */ 'routing_number': string; }; +/** + * Iban Records contain E.U. bank account details per the SEPA format. + */ export type FundingInstructionsBankTransferIbanRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The BIC/SWIFT code of the account. + */ 'bic': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * The IBAN of the account. + */ 'iban': string; }; +/** + * Sort Code Records contain U.K. bank account details per the sort code format. + */ export type FundingInstructionsBankTransferSortCodeRecordModel = { 'account_holder_address': AddressModel; + /** + * The name of the person or business that owns the bank account + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; 'bank_address': AddressModel; + /** + * The six-digit sort code + */ 'sort_code': string; }; +/** + * SPEI Records contain Mexico bank account details per the SPEI format. + */ export type FundingInstructionsBankTransferSpeiRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; 'bank_address': AddressModel; + /** + * The three-digit bank code + */ 'bank_code': string; + /** + * The short banking institution name + */ 'bank_name': string; + /** + * The CLABE number + */ 'clabe': string; }; +/** + * SWIFT Records contain U.S. bank account details per the SWIFT format. + */ export type FundingInstructionsBankTransferSwiftRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; + /** + * The account type + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank name + */ 'bank_name': string; + /** + * The SWIFT code + */ 'swift_code': string; }; +/** + * Zengin Records contain Japan bank account details per the Zengin format. + */ export type FundingInstructionsBankTransferZenginRecordModel = { 'account_holder_address': AddressModel; + /** + * The account holder name + */ 'account_holder_name': string; + /** + * The account number + */ 'account_number': string; + /** + * The bank account type. In Japan, this can only be `futsu` or `toza`. + */ 'account_type': string; 'bank_address': AddressModel; + /** + * The bank code of the account + */ 'bank_code': string; + /** + * The bank name of the account + */ 'bank_name': string; + /** + * The branch code of the account + */ 'branch_code': string; + /** + * The branch name of the account + */ 'branch_name': string; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type FundingInstructionsBankTransferFinancialAddressModel = { 'aba'?: FundingInstructionsBankTransferAbaRecordModel | undefined; 'iban'?: FundingInstructionsBankTransferIbanRecordModel | undefined; 'sort_code'?: FundingInstructionsBankTransferSortCodeRecordModel | undefined; 'spei'?: FundingInstructionsBankTransferSpeiRecordModel | undefined; + /** + * The payment networks supported by this FinancialAddress + */ 'supported_networks'?: Array<'ach' | 'bacs' | 'domestic_wire_us' | 'fps' | 'sepa' | 'spei' | 'swift' | 'zengin'> | undefined; 'swift'?: FundingInstructionsBankTransferSwiftRecordModel | undefined; + /** + * The type of financial address + */ 'type': 'aba' | 'iban' | 'sort_code' | 'spei' | 'swift' | 'zengin'; 'zengin'?: FundingInstructionsBankTransferZenginRecordModel | undefined; }; export type PaymentIntentNextActionDisplayBankTransferInstructionsModel = { + /** + * The remaining amount that needs to be transferred to complete the payment. + */ 'amount_remaining': number; + /** + * 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; + /** + * A list of financial addresses that can be used to fund the customer balance + */ 'financial_addresses'?: FundingInstructionsBankTransferFinancialAddressModel[] | undefined; + /** + * A link to a hosted page that guides your customer through completing the transfer. + */ 'hosted_instructions_url': string; + /** + * A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + */ 'reference': string; + /** + * Type of bank transfer + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type PaymentIntentNextActionKonbiniFamilymartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniLawsonModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniMinistopModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniSeicomartModel = { + /** + * The confirmation number. + */ 'confirmation_number'?: string | undefined; + /** + * The payment code. + */ 'payment_code': string; }; export type PaymentIntentNextActionKonbiniStoresModel = { + /** + * FamilyMart instruction details. + */ 'familymart': PaymentIntentNextActionKonbiniFamilymartModel; + /** + * Lawson instruction details. + */ 'lawson': PaymentIntentNextActionKonbiniLawsonModel; + /** + * Ministop instruction details. + */ 'ministop': PaymentIntentNextActionKonbiniMinistopModel; + /** + * Seicomart instruction details. + */ 'seicomart': PaymentIntentNextActionKonbiniSeicomartModel; }; export type PaymentIntentNextActionKonbiniModel = { + /** + * The timestamp at which the pending Konbini payment expires. + */ 'expires_at': number; + /** + * The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + */ 'hosted_voucher_url': string; 'stores': PaymentIntentNextActionKonbiniStoresModel; }; export type PaymentIntentNextActionDisplayMultibancoDetailsModel = { + /** + * Entity number associated with this Multibanco payment. + */ 'entity': string; + /** + * The timestamp at which the Multibanco voucher expires. + */ 'expires_at': number; + /** + * The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + */ 'hosted_voucher_url': string; + /** + * Reference number associated with this Multibanco payment. + */ 'reference': string; }; export type PaymentIntentNextActionDisplayOxxoDetailsModel = { + /** + * The timestamp after which the OXXO voucher expires. + */ 'expires_after': number; + /** + * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + */ 'hosted_voucher_url': string; + /** + * OXXO reference number. + */ 'number': string; }; export type PaymentIntentNextActionPaynowDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + */ 'hosted_instructions_url': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionPixDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data'?: string | undefined; + /** + * The date (unix timestamp) when the PIX expires. + */ 'expires_at'?: number | undefined; + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ 'hosted_instructions_url'?: string | undefined; + /** + * The image_url_png string used to render png QR code + */ 'image_url_png'?: string | undefined; + /** + * The image_url_svg string used to render svg QR code + */ 'image_url_svg'?: string | undefined; }; export type PaymentIntentNextActionPromptpayDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + */ 'hosted_instructions_url': string; + /** + * The PNG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_png': string; + /** + * The SVG path used to render the QR code, can be used as the source in an HTML img tag + */ 'image_url_svg': string; }; export type PaymentIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ 'url': string; }; export type PaymentIntentNextActionSwishQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel = { + /** + * The URL to the hosted Swish instructions page, which allows customers to view the QR code. + */ 'hosted_instructions_url': string; + /** + * The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). + */ 'mobile_auth_url': string; 'qr_code': PaymentIntentNextActionSwishQrCodeModel; }; export type PaymentIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type': 'amounts' | 'descriptor_code'; }; export type PaymentIntentNextActionWechatPayDisplayQrCodeModel = { + /** + * The data being used to generate QR code + */ 'data': string; + /** + * The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + */ 'hosted_instructions_url': string; + /** + * The base64 image data for a pre-generated QR code + */ 'image_data_url': string; + /** + * The image_url_png string used to render QR code + */ 'image_url_png': string; + /** + * The image_url_svg string used to render QR code + */ 'image_url_svg': string; }; export type PaymentIntentNextActionWechatPayRedirectToAndroidAppModel = { + /** + * app_id is the APP ID registered on WeChat open platform + */ 'app_id': string; + /** + * nonce_str is a random string + */ 'nonce_str': string; + /** + * package is static value + */ 'package': string; + /** + * an unique merchant ID assigned by WeChat Pay + */ 'partner_id': string; + /** + * an unique trading ID assigned by WeChat Pay + */ 'prepay_id': string; + /** + * A signature + */ 'sign': string; + /** + * Specifies the current time in epoch format + */ 'timestamp': string; }; export type PaymentIntentNextActionWechatPayRedirectToIosAppModel = { + /** + * An universal link that redirect to WeChat Pay app + */ 'native_url': string; }; @@ -3666,7 +9077,13 @@ export type PaymentIntentNextActionModel = { 'promptpay_display_qr_code'?: PaymentIntentNextActionPromptpayDisplayQrCodeModel | undefined; 'redirect_to_url'?: PaymentIntentNextActionRedirectToUrlModel | undefined; 'swish_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: PaymentIntentNextActionVerifyWithMicrodepositsModel | undefined; 'wechat_pay_display_qr_code'?: PaymentIntentNextActionWechatPayDisplayQrCodeModel | undefined; @@ -3675,283 +9092,804 @@ export type PaymentIntentNextActionModel = { }; export type PaymentFlowsPaymentDetailsResourceAffiliateModel = { + /** + * The name of the affiliate that originated the purchase. + */ 'name'?: string | undefined; }; export type PaymentFlowsPaymentDetailsResourceDeliveryRecipientModel = { + /** + * The email of the recipient the ticket is delivered to. + */ 'email'?: string | undefined; + /** + * The name of the recipient the ticket is delivered to. + */ 'name'?: string | undefined; + /** + * The phone number of the recipient the ticket is delivered to. + */ 'phone'?: string | undefined; }; export type PaymentFlowsPaymentDetailsResourceDeliveryModel = { + /** + * The delivery method for the payment + */ 'mode'?: 'email' | 'phone' | 'pickup' | 'post' | undefined; 'recipient'?: PaymentFlowsPaymentDetailsResourceDeliveryRecipientModel | undefined; }; export type PaymentFlowsPaymentDetailsResourceCarRentalDistanceModel = { + /** + * Distance traveled. + */ 'amount'?: number | undefined; + /** + * Unit of measurement for the distance traveled. One of `miles` or `kilometers` + */ 'unit'?: string | undefined; }; export type PaymentFlowsPaymentDetailsResourceCarRentalDriverModel = { + /** + * Driver's identification number. + */ 'driver_identification_number'?: string | undefined; + /** + * Driver's tax number. + */ 'driver_tax_number'?: string | undefined; + /** + * Full name of the driver on the reservation. + */ 'name'?: string | undefined; }; export type PaymentFlowsPaymentDetailsResourceCarRentalModel = { 'affiliate'?: PaymentFlowsPaymentDetailsResourceAffiliateModel | undefined; + /** + * The booking number associated with the car rental. + */ 'booking_number': string; + /** + * Class code of the car. + */ 'car_class_code'?: string | undefined; + /** + * Make of the car. + */ 'car_make'?: string | undefined; + /** + * Model of the car. + */ 'car_model'?: string | undefined; + /** + * The name of the rental car company. + */ 'company'?: string | undefined; + /** + * The customer service phone number of the car rental company. + */ 'customer_service_phone_number'?: string | undefined; + /** + * Number of days the car is being rented. + */ 'days_rented': number; 'delivery'?: PaymentFlowsPaymentDetailsResourceDeliveryModel | undefined; 'distance'?: PaymentFlowsPaymentDetailsResourceCarRentalDistanceModel | undefined; + /** + * The details of the drivers associated with the trip. + */ 'drivers'?: PaymentFlowsPaymentDetailsResourceCarRentalDriverModel[] | undefined; + /** + * List of additional charges being billed. + */ 'extra_charges'?: Array<'extra_mileage' | 'gas' | 'late_return' | 'one_way_service' | 'parking_violation'> | undefined; + /** + * Indicates if the customer did not keep nor cancel their booking. + */ 'no_show'?: boolean | undefined; 'pickup_address'?: AddressModel | undefined; + /** + * Car pick-up time. Measured in seconds since the Unix epoch. + */ 'pickup_at': number; + /** + * Name of the pickup location. + */ 'pickup_location_name'?: string | undefined; + /** + * Rental rate. + */ 'rate_amount'?: number | undefined; + /** + * The frequency at which the rate amount is applied. One of `day`, `week` or `month` + */ 'rate_interval'?: 'day' | 'month' | 'week' | undefined; + /** + * The full name of the person or entity renting the car. + */ 'renter_name'?: string | undefined; 'return_address'?: AddressModel | undefined; + /** + * Car return time. Measured in seconds since the Unix epoch. + */ 'return_at': number; + /** + * Name of the return location. + */ 'return_location_name'?: string | undefined; + /** + * Indicates whether the goods or services are tax-exempt or tax is not collected. + */ 'tax_exempt'?: boolean | undefined; + /** + * The vehicle identification number of the car. + */ 'vehicle_identification_number'?: string | undefined; }; export type PaymentFlowsPaymentDetailsResourceEventModel = { + /** + * Indicates if the tickets are digitally checked when entering the venue. + */ 'access_controlled_venue'?: boolean | undefined; 'address'?: AddressModel | undefined; 'affiliate'?: PaymentFlowsPaymentDetailsResourceAffiliateModel | undefined; + /** + * The name of the company + */ 'company'?: string | undefined; 'delivery'?: PaymentFlowsPaymentDetailsResourceDeliveryModel | undefined; + /** + * Event end time. Measured in seconds since the Unix epoch. + */ 'ends_at'?: number | undefined; + /** + * Type of the event entertainment (concert, sports event etc) + */ 'genre'?: string | undefined; + /** + * The name of the event. + */ 'name'?: string | undefined; + /** + * Event start time. Measured in seconds since the Unix epoch. + */ 'starts_at'?: number | undefined; }; export type PaymentFlowsPaymentDetailsResourceBillingIntervalModel = { + /** + * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + */ 'count'?: number | undefined; + /** + * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + */ 'interval'?: 'day' | 'month' | 'week' | 'year' | undefined; }; export type PaymentFlowsPaymentDetailsResourceSubscriptionModel = { 'affiliate'?: PaymentFlowsPaymentDetailsResourceAffiliateModel | undefined; + /** + * Info whether the subscription will be auto renewed upon expiry. + */ 'auto_renewal'?: boolean | undefined; 'billing_interval'?: PaymentFlowsPaymentDetailsResourceBillingIntervalModel | undefined; + /** + * Subscription end time. Measured in seconds since the Unix epoch. + */ 'ends_at'?: number | undefined; + /** + * Name of the product on subscription. e.g. Apple Music Subscription. + */ 'name'?: string | undefined; + /** + * Subscription start time. Measured in seconds since the Unix epoch. + */ 'starts_at'?: number | undefined; }; export type PaymentFlowsPaymentDetailsModel = { 'car_rental'?: PaymentFlowsPaymentDetailsResourceCarRentalModel | undefined; + /** + * A unique value to identify the customer. This field is available only for card payments. + * + * This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. + */ 'customer_reference': string; 'event_details'?: PaymentFlowsPaymentDetailsResourceEventModel | undefined; + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. + * + * Required when the Payment Method Types array contains `card`, including when [automatic_payment_methods.enabled](/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled) is set to `true`. + * + * For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app. + */ 'order_reference': string; 'subscription'?: PaymentFlowsPaymentDetailsResourceSubscriptionModel | undefined; }; export type PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel = { + /** + * ID of the payment method configuration used. + */ 'id': string; + /** + * ID of the parent payment method configuration used. + */ 'parent': string; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type PaymentIntentPaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsAffirmModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ 'preferred_locale'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAfterpayClearpayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsAlipayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsAlmaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsAmazonPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsAuBecsDebitModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsBacsDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsBillieModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsBlikModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsBoletoModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCardInstallmentsModel = { + /** + * Installment plans that may be selected for this PaymentIntent. + */ 'available_plans': PaymentMethodDetailsCardInstallmentsPlanModel[]; + /** + * Whether Installments are enabled for this PaymentIntent. + */ 'enabled': boolean; + /** + * Installment plan selected for this PaymentIntent. + */ 'plan': PaymentMethodDetailsCardInstallmentsPlanModel; }; export type PaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date': number; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count': number; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types': 'india'[]; }; export type PaymentFlowsPrivatePaymentMethodsCardOptionsStatementDetailsResourceAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city'?: string | undefined; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country'?: string | undefined; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1'?: string | undefined; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2'?: string | undefined; + /** + * ZIP or postal code. + */ 'postal_code'?: string | undefined; + /** + * State, county, province, or region. + */ 'state'?: string | undefined; }; export type PaymentFlowsPrivatePaymentMethodsCardOptionsStatementDetailsModel = { 'address'?: PaymentFlowsPrivatePaymentMethodsCardOptionsStatementDetailsResourceAddressModel | undefined; + /** + * Phone number + */ 'phone'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Installment details for this payment. + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ 'installments': PaymentMethodOptionsCardInstallmentsModel; + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options': PaymentMethodOptionsCardMandateOptionsModel; + /** + * Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + */ 'request_decremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * Request partial authorization on this PaymentIntent. + */ 'request_partial_authorization'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; 'statement_details'?: PaymentFlowsPrivatePaymentMethodsCardOptionsStatementDetailsModel | undefined; }; export type PaymentMethodOptionsCardPresentRoutingModel = { + /** + * Requested routing priority + */ 'requested_priority': 'domestic' | 'international'; }; export type PaymentMethodOptionsCardPresentModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; + /** + * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + */ 'request_extended_authorization': 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. + */ 'request_incremental_authorization_support': boolean; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; }; export type PaymentMethodOptionsCashappModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsCryptoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsCustomerBalanceEuBankAccountModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type PaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type PaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: PaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsEpsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsFpxModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGiropayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsGopayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsGrabpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsIdBankTransferModel = { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. + */ 'expires_after'?: number | undefined; + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + */ 'expires_at': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsIdealModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; @@ -3960,64 +9898,214 @@ export type PaymentMethodOptionsInteracPresentModel = { }; export type PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsKlarnaModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type PaymentMethodOptionsKonbiniModel = { + /** + * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + */ 'confirmation_number': string; + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days': number; + /** + * The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ 'expires_at': number; + /** + * A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + */ 'product_description': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsKrCardModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsLinkModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsMbWayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentIntentPaymentMethodOptionsMobilepayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsMultibancoModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsNzBankAccountModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsOxxoModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsP24Model = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -4026,36 +10114,102 @@ export type PaymentMethodOptionsPayByBankModel = { }; export type PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsPaynowModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsPaypalLineItemResourceTaxModel = { + /** + * The tax for a single unit of the line item in minor units. Cannot be a negative number. + */ 'amount': number; + /** + * The tax behavior for the line item. + */ 'behavior': 'exclusive' | 'inclusive'; }; export type LineItemPaypalModel = { + /** + * Type of the line item. + */ 'category'?: 'digital_goods' | 'donation' | 'physical_goods' | undefined; + /** + * Description of the line item. + */ 'description'?: string | undefined; + /** + * Descriptive name of the line item. + */ 'name': string; + /** + * Quantity of the line item. Cannot be a negative number. + */ 'quantity': number; + /** + * Client facing stock keeping unit, article number or similar. + */ 'sku'?: string | undefined; + /** + * The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + */ 'sold_by'?: string | undefined; 'tax'?: PaymentFlowsPrivatePaymentMethodsPaypalLineItemResourceTaxModel | undefined; + /** + * Price for a single unit of the line item in minor units. Cannot be a negative number. + */ 'unit_amount': number; }; export type PaymentMethodOptionsPaypalModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * The line items purchased by the customer. + */ 'line_items'?: LineItemPaypalModel[] | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference': string; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference_id'?: string | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; + /** + * 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'?: string[] | undefined; }; @@ -4064,43 +10218,130 @@ export type PaymentMethodOptionsPaypayModel = { }; export type PaymentIntentPaymentMethodOptionsMandateOptionsPaytoModel = { + /** + * Amount that will be collected. It is required when `amount_type` is `fixed`. + */ 'amount': number; + /** + * The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + */ 'end_date': string; + /** + * The periodicity at which payments will be collected. Defaults to `adhoc`. + */ 'payment_schedule': 'adhoc' | 'annual' | 'daily' | 'fortnightly' | 'monthly' | 'quarterly' | 'semi_annual' | 'weekly'; + /** + * The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + */ 'payments_per_period': number; + /** + * The purpose for which payments are made. Has a default value based on your merchant category code. + */ 'purpose': 'dependant_support' | 'government' | 'loan' | 'mortgage' | 'other' | 'pension' | 'personal' | 'retail' | 'salary' | 'tax' | 'utility'; }; export type PaymentIntentPaymentMethodOptionsPaytoModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsPaytoModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsMandateOptionsPixModel = { + /** + * Amount to be charged for future payments. + */ 'amount'?: number | undefined; + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * Type of amount. + */ 'amount_type'?: 'fixed' | 'maximum' | undefined; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + */ 'currency'?: string | undefined; + /** + * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + */ 'end_date'?: string | undefined; + /** + * Schedule at which the future payments will be charged. + */ 'payment_schedule'?: 'halfyearly' | 'monthly' | 'quarterly' | 'weekly' | 'yearly' | undefined; + /** + * Subscription name displayed to buyers in their bank app. + */ 'reference'?: string | undefined; + /** + * Start date of the mandate, in `YYYY-MM-DD`. + */ 'start_date'?: string | undefined; }; export type PaymentMethodOptionsPixModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + */ 'expires_after_seconds': number; + /** + * The timestamp at which the Pix expires. + */ 'expires_at': number; 'mandate_options'?: PaymentMethodOptionsMandateOptionsPixModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentMethodOptionsPromptpayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsQrisModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -4109,87 +10350,234 @@ export type PaymentIntentPaymentMethodOptionsRechnungModel = { }; export type PaymentMethodOptionsRevolutPayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentMethodOptionsSatispayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type PaymentIntentPaymentMethodOptionsSepaDebitModel = { 'mandate_options'?: PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type PaymentMethodOptionsShopeepayModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsSofortModel = { + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsStripeBalanceModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type PaymentIntentPaymentMethodOptionsSwishModel = { + /** + * A reference for this payment to be displayed in the Swish app. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsTwintModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; + /** + * The institution to use to filter for possible accounts to link. + */ 'institution'?: string | undefined; }; export type PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsManualEntryModel = { + /** + * Settings for configuring manual entry of account details. + */ 'mode'?: 'automatic' | 'custom' | undefined; }; export type LinkedAccountOptionsCommonModel = { 'filters'?: PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFiltersModel | undefined; 'manual_entry'?: PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsManualEntryModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'inferred_balances' | 'ownership' | 'transactions'>; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; }; export type PaymentMethodOptionsUsBankAccountMandateOptionsModel = { + /** + * Mandate collection method + */ 'collection_method'?: 'paper' | undefined; }; export type PaymentIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Preferred transaction settlement speed + */ 'preferred_settlement_speed'?: 'fastest' | 'standard' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type PaymentMethodOptionsWechatPayModel = { + /** + * The app ID registered with WeChat Pay. Only required when client is ios or android. + */ 'app_id': string; + /** + * The client type that the end customer will pay from + */ 'client': 'android' | 'ios' | 'web'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type PaymentMethodOptionsZipModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; @@ -4256,7 +10644,13 @@ export type PaymentIntentPaymentMethodOptionsModel = { }; export type PaymentIntentProcessingCustomerNotificationModel = { + /** + * Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + */ 'approval_requested': boolean; + /** + * If customer approval is required, they need to provide approval before this time. + */ 'completes_at': number; }; @@ -4266,88 +10660,296 @@ export type PaymentIntentCardProcessingModel = { export type PaymentIntentProcessing_1Model = { 'card'?: PaymentIntentCardProcessingModel | undefined; + /** + * Type of the payment method for which payment is in `processing` state, one of `card`. + */ 'type': 'card'; }; export type DeletedPaymentSourceModel = DeletedBankAccountModel | DeletedCardModel; export type TransferDataModel = { + /** + * The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + * The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + * representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). + */ 'amount'?: number | undefined; + /** + * The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. + */ 'destination': string | AccountModel; }; +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export type PaymentIntentModel = { + /** + * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Amount that can be captured from this PaymentIntent. + */ 'amount_capturable': number; 'amount_details'?: PaymentFlowsAmountDetailsModel | undefined; + /** + * Amount that this PaymentIntent collects. + */ 'amount_received': number; + /** + * ID of the Connect application that created the PaymentIntent. + */ 'application': string | ApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'application_fee_amount': number; + /** + * Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + */ 'automatic_payment_methods': PaymentFlowsAutomaticPaymentMethodsPaymentIntentModel; + /** + * Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). + */ 'cancellation_reason': 'abandoned' | 'automatic' | 'duplicate' | 'expired' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice'; + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method': 'automatic' | 'automatic_async' | 'manual'; + /** + * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + */ 'client_secret': string; + /** + * Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + */ 'confirmation_method': 'automatic' | 'manual'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the Account this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + * If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + */ 'customer_account'?: string | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The list of payment method types to exclude from use with this payment. + */ 'excluded_payment_method_types': Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; + /** + * The FX Quote used for the PaymentIntent. + */ 'fx_quote'?: string | undefined; 'hooks'?: PaymentFlowsPaymentIntentAsyncWorkflowsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + */ 'last_payment_error': ApiErrorsModel; + /** + * ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + */ 'latest_charge': string | ChargeModel; + /** + * 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + */ 'metadata': { [key: string]: string; }; + /** + * If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + */ 'next_action': PaymentIntentNextActionModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_intent'; + /** + * The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; 'payment_details'?: PaymentFlowsPaymentDetailsModel | undefined; + /** + * ID of the payment method used in this PaymentIntent. + */ 'payment_method': string | PaymentMethodModel; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment-method-specific configuration for this PaymentIntent. + */ 'payment_method_options': PaymentIntentPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types': string[]; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * If present, this property tells you about the processing state of the payment. + */ 'processing': PaymentIntentProcessing_1Model; + /** + * Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + */ 'receipt_email': string; + /** + * ID of the review associated with this PaymentIntent, if any. + */ 'review': string | ReviewModel; + /** + * Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + */ 'secret_key_confirmation'?: 'optional' | 'required' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * Shipping information for this PaymentIntent. + */ 'shipping': ShippingModel; + /** + * This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + */ 'source': string | PaymentSourceModel | DeletedPaymentSourceModel; + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + * + * Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + */ 'statement_descriptor': string; + /** + * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + */ 'statement_descriptor_suffix': string; + /** + * Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ 'transfer_data': TransferDataModel; + /** + * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + */ 'transfer_group': string; }; export type PaymentFlowsAutomaticPaymentMethodsSetupIntentModel = { + /** + * Controls whether this SetupIntent will accept redirect-based payment methods. + * + * Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + */ 'allow_redirects'?: 'always' | 'never' | undefined; + /** + * Automatically calculates compatible payment methods + */ 'enabled': boolean; }; export type SetupIntentNextActionPixDisplayQrCodeModel = { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ 'data'?: string | undefined; + /** + * The date (unix timestamp) when the PIX expires. + */ 'expires_at'?: number | undefined; + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ 'hosted_instructions_url'?: string | undefined; + /** + * The image_url_png string used to render png QR code + */ 'image_url_png'?: string | undefined; + /** + * The image_url_svg string used to render svg QR code + */ 'image_url_svg'?: string | undefined; }; export type SetupIntentNextActionRedirectToUrlModel = { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ 'return_url': string; + /** + * The URL you must redirect your customer to in order to authenticate. + */ 'url': string; }; export type SetupIntentNextActionVerifyWithMicrodepositsModel = { + /** + * The timestamp when the microdeposits are expected to land. + */ 'arrival_date': number; + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ 'hosted_verification_url': string; + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ 'microdeposit_type': 'amounts' | 'descriptor_code'; }; @@ -4355,22 +10957,49 @@ export type SetupIntentNextActionModel = { 'cashapp_handle_redirect_or_display_qr_code'?: PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeModel | undefined; 'pix_display_qr_code'?: SetupIntentNextActionPixDisplayQrCodeModel | undefined; 'redirect_to_url'?: SetupIntentNextActionRedirectToUrlModel | undefined; + /** + * Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ 'type': string; + /** + * When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ 'use_stripe_sdk'?: {} | undefined; 'verify_with_microdeposits'?: SetupIntentNextActionVerifyWithMicrodepositsModel | undefined; }; export type SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type SetupIntentPaymentMethodOptionsAcssDebitModel = { + /** + * Currency supported by the bank account + */ 'currency': 'cad' | 'usd'; 'mandate_options'?: SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -4379,6 +11008,9 @@ export type SetupIntentPaymentMethodOptionsAmazonPayModel = { }; export type SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -4387,21 +11019,60 @@ export type SetupIntentPaymentMethodOptionsBacsDebitModel = { }; export type SetupIntentPaymentMethodOptionsCardMandateOptionsModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * 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; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date': number; + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ 'interval': 'day' | 'month' | 'sporadic' | 'week' | 'year'; + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ 'interval_count': number; + /** + * Unique identifier for the mandate or subscription. + */ 'reference': string; + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ 'start_date': number; + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ 'supported_types': 'india'[]; }; export type SetupIntentPaymentMethodOptionsCardModel = { + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ 'mandate_options': SetupIntentPaymentMethodOptionsCardMandateOptionsModel; + /** + * Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; @@ -4410,27 +11081,66 @@ export type SetupIntentPaymentMethodOptionsCardPresentModel = { }; export type SetupIntentPaymentMethodOptionsKlarnaModel = { + /** + * The currency of the setup intent. Three letter ISO currency code. + */ 'currency': string; + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ 'preferred_locale': string; }; export type SetupIntentPaymentMethodOptionsLinkModel = { + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token': string; }; export type SetupIntentPaymentMethodOptionsPaypalModel = { + /** + * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + */ 'billing_agreement_id': string; + /** + * 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 | undefined; + /** + * 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'?: string[] | undefined; }; export type SetupIntentPaymentMethodOptionsMandateOptionsPaytoModel = { + /** + * Amount that will be collected. It is required when `amount_type` is `fixed`. + */ 'amount': number; + /** + * The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + */ 'end_date': string; + /** + * The periodicity at which payments will be collected. Defaults to `adhoc`. + */ 'payment_schedule': 'adhoc' | 'annual' | 'daily' | 'fortnightly' | 'monthly' | 'quarterly' | 'semi_annual' | 'weekly'; + /** + * The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + */ 'payments_per_period': number; + /** + * The purpose for which payments are made. Has a default value based on your merchant category code. + */ 'purpose': 'dependant_support' | 'government' | 'loan' | 'mortgage' | 'other' | 'pension' | 'personal' | 'retail' | 'salary' | 'tax' | 'utility'; + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + */ 'start_date': string; }; @@ -4443,6 +11153,9 @@ export type SetupIntentPaymentMethodOptionsPixModel = { }; export type SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; @@ -4453,6 +11166,9 @@ export type SetupIntentPaymentMethodOptionsSepaDebitModel = { export type SetupIntentPaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; 'mandate_options'?: PaymentMethodOptionsUsBankAccountMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; @@ -4471,88 +11187,313 @@ export type SetupIntentPaymentMethodOptionsModel = { 'us_bank_account'?: SetupIntentPaymentMethodOptionsUsBankAccountModel | undefined; }; +/** + * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + * [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + * to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + * If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + * it automatically attaches the resulting payment method to that Customer after successful setup. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + * + * Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + */ export type SetupIntentModel = { + /** + * ID of the Connect application that created the SetupIntent. + */ 'application': string | ApplicationModel; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Settings for dynamic payment methods compatible with this Setup Intent + */ 'automatic_payment_methods': PaymentFlowsAutomaticPaymentMethodsSetupIntentModel; + /** + * Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + */ 'cancellation_reason': 'abandoned' | 'duplicate' | 'requested_by_customer'; + /** + * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ 'customer_account'?: string | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Payment method types that are excluded from this SetupIntent. + */ 'excluded_payment_method_types': Array<'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions'?: Array<'inbound' | 'outbound'> | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The error encountered in the previous SetupIntent confirmation. + */ 'last_setup_error': ApiErrorsModel; + /** + * The most recent SetupAttempt for this SetupIntent. + */ 'latest_attempt': string | SetupAttemptModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * ID of the multi use Mandate generated by the SetupIntent. + */ 'mandate': string | MandateModel; + /** + * 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': { [key: string]: string; }; + /** + * If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + */ 'next_action': SetupIntentNextActionModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_intent'; + /** + * The account (if any) for which the setup is intended. + */ 'on_behalf_of': string | AccountModel; + /** + * ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + */ 'payment_method': string | PaymentMethodModel; + /** + * Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment method-specific configuration for this SetupIntent. + */ 'payment_method_options': SetupIntentPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + */ 'payment_method_types': string[]; + /** + * ID of the single_use Mandate generated by the SetupIntent. + */ 'single_use_mandate': string | MandateModel; + /** + * [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + */ 'status': 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded'; + /** + * Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ 'usage': string; }; export type ApiErrorsModel = { + /** + * For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one. + */ 'advice_code'?: string | undefined; + /** + * For card errors, the ID of the failed charge. + */ 'charge'?: string | undefined; + /** + * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + */ 'code'?: 'account_closed' | 'account_country_invalid_address' | 'account_error_country_change_requires_additional_steps' | 'account_information_mismatch' | 'account_invalid' | 'account_number_invalid' | 'acss_debit_session_incomplete' | 'alipay_upgrade_required' | 'amount_too_large' | 'amount_too_small' | 'api_key_expired' | 'application_fees_not_allowed' | 'authentication_required' | 'balance_insufficient' | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' | 'bank_account_restricted' | 'bank_account_unusable' | 'bank_account_unverified' | 'bank_account_verification_failed' | 'billing_invalid_mandate' | 'bitcoin_upgrade_required' | 'capture_charge_authorization_expired' | 'capture_unauthorized_payment' | 'card_decline_rate_limit_exceeded' | 'card_declined' | 'cardholder_phone_number_required' | 'charge_already_captured' | 'charge_already_refunded' | 'charge_disputed' | 'charge_exceeds_source_limit' | 'charge_exceeds_transaction_limit' | 'charge_expired_for_capture' | 'charge_invalid_parameter' | 'charge_not_refundable' | 'clearing_code_unsupported' | 'country_code_invalid' | 'country_unsupported' | 'coupon_expired' | 'customer_max_payment_methods' | 'customer_max_subscriptions' | 'customer_session_expired' | 'customer_tax_location_invalid' | 'debit_not_authorized' | 'email_invalid' | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_account_pending_account_numbers' | 'financial_connections_account_unavailable_account_numbers' | 'financial_connections_institution_unavailable' | 'financial_connections_no_successful_transaction_refresh' | 'forwarding_api_inactive' | 'forwarding_api_invalid_parameter' | 'forwarding_api_retryable_upstream_error' | 'forwarding_api_upstream_connection_error' | 'forwarding_api_upstream_connection_timeout' | 'forwarding_api_upstream_error' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' | 'incorrect_number' | 'incorrect_zip' | 'india_recurring_payment_mandate_canceled' | 'instant_payouts_config_disabled' | 'instant_payouts_currency_disabled' | 'instant_payouts_limit_exceeded' | 'instant_payouts_unsupported' | 'insufficient_funds' | 'intent_invalid_state' | 'intent_verification_method_missing' | 'invalid_card_type' | 'invalid_characters' | 'invalid_charge_amount' | 'invalid_cvc' | 'invalid_expiry_month' | 'invalid_expiry_year' | 'invalid_mandate_reference_prefix_format' | 'invalid_number' | 'invalid_source_usage' | 'invalid_tax_location' | 'invoice_no_customer_line_items' | 'invoice_no_payment_method_types' | 'invoice_no_subscription_line_items' | 'invoice_not_editable' | 'invoice_on_behalf_of_not_editable' | 'invoice_payment_intent_requires_action' | 'invoice_upcoming_none' | 'livemode_mismatch' | 'lock_timeout' | 'missing' | 'no_account' | 'not_allowed_on_standard_account' | 'out_of_inventory' | 'ownership_declaration_not_allowed' | 'parameter_invalid_empty' | 'parameter_invalid_integer' | 'parameter_invalid_string_blank' | 'parameter_invalid_string_empty' | 'parameter_missing' | 'parameter_unknown' | 'parameters_exclusive' | 'payment_intent_action_required' | 'payment_intent_authentication_failure' | 'payment_intent_incompatible_payment_method' | 'payment_intent_invalid_parameter' | 'payment_intent_konbini_rejected_confirmation_number' | 'payment_intent_mandate_invalid' | 'payment_intent_payment_attempt_expired' | 'payment_intent_payment_attempt_failed' | 'payment_intent_rate_limit_exceeded' | 'payment_intent_unexpected_state' | 'payment_method_bank_account_already_verified' | 'payment_method_bank_account_blocked' | 'payment_method_billing_details_address_missing' | 'payment_method_configuration_failures' | 'payment_method_currency_mismatch' | 'payment_method_customer_decline' | 'payment_method_invalid_parameter' | 'payment_method_invalid_parameter_testmode' | 'payment_method_microdeposit_failed' | 'payment_method_microdeposit_verification_amounts_invalid' | 'payment_method_microdeposit_verification_amounts_mismatch' | 'payment_method_microdeposit_verification_attempts_exceeded' | 'payment_method_microdeposit_verification_descriptor_code_mismatch' | 'payment_method_microdeposit_verification_timeout' | 'payment_method_not_available' | 'payment_method_provider_decline' | 'payment_method_provider_timeout' | 'payment_method_unactivated' | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' | 'platform_api_key_expired' | 'postal_code_invalid' | 'processing_error' | 'product_inactive' | 'progressive_onboarding_limit_exceeded' | 'rate_limit' | 'refer_to_customer' | 'refund_disputed_payment' | 'resource_already_exists' | 'resource_missing' | 'return_intent_already_processed' | 'routing_number_invalid' | 'secret_key_required' | 'sensitive_data_access_expired' | 'sepa_unsupported_account' | 'setup_attempt_failed' | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' | 'shipping_calculation_failed' | 'sku_inactive' | 'state_unsupported' | 'status_transition_invalid' | 'stripe_tax_inactive' | 'tax_id_invalid' | 'tax_id_prohibited' | 'taxes_calculation_failed' | 'terminal_location_country_unsupported' | 'terminal_reader_busy' | 'terminal_reader_collected_data_invalid' | 'terminal_reader_hardware_fault' | 'terminal_reader_invalid_location_for_activation' | 'terminal_reader_invalid_location_for_payment' | 'terminal_reader_offline' | 'terminal_reader_timeout' | 'testmode_charges_only' | 'tls_version_unsupported' | 'token_already_used' | 'token_card_network_invalid' | 'token_in_use' | 'transfer_source_balance_parameters_mismatch' | 'transfers_not_allowed' | 'url_invalid' | 'v2_account_disconnection_unsupported' | 'v2_account_missing_configuration' | undefined; + /** + * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + */ 'decline_code'?: string | undefined; + /** + * A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + */ 'doc_url'?: string | undefined; + /** + * A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + */ 'message'?: string | undefined; + /** + * For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + */ 'network_advice_code'?: string | undefined; + /** + * For payments declined by the network, an alphanumeric code which indicates the reason the payment failed. + */ 'network_decline_code'?: string | undefined; + /** + * If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + */ 'param'?: string | undefined; 'payment_intent'?: PaymentIntentModel | undefined; 'payment_method'?: PaymentMethodModel | undefined; + /** + * If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + */ 'payment_method_type'?: string | undefined; + /** + * A URL to the request log entry in your dashboard. + */ 'request_log_url'?: string | undefined; 'setup_intent'?: SetupIntentModel | undefined; 'source'?: PaymentSourceModel | undefined; + /** + * The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + */ 'type': 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error'; }; +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export type SetupAttemptModel = { + /** + * The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + */ 'application': string | ApplicationModel; + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ 'attach_to_self'?: boolean | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The value of [customer_account](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation. + */ 'customer_account'?: string | undefined; + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ 'flow_directions': Array<'inbound' | 'outbound'>; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'setup_attempt'; + /** + * The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + */ 'on_behalf_of': string | AccountModel; + /** + * ID of the payment method used with this SetupAttempt. + */ 'payment_method': string | PaymentMethodModel; 'payment_method_details': SetupAttemptPaymentMethodDetailsModel; + /** + * The error encountered during this attempt to confirm the SetupIntent, if any. + */ 'setup_error': ApiErrorsModel; + /** + * ID of the SetupIntent that this attempt belongs to. + */ 'setup_intent': string | SetupIntentModel; + /** + * Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + */ 'status': string; + /** + * The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + */ 'usage': string; }; export type PaymentMethodCardGeneratedCardModel = { + /** + * The charge that created this object. + */ 'charge': string; + /** + * Transaction-specific details of the payment method used in the payment. + */ 'payment_method_details': CardGeneratedFromPaymentMethodDetailsModel; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt': string | SetupAttemptModel; }; export type NetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ 'preferred': string; }; export type ThreeDSecureUsageModel = { + /** + * Whether 3D Secure is supported on this card. + */ 'supported': boolean; }; @@ -4573,9 +11514,21 @@ export type PaymentMethodCardWalletLinkModel = { }; export type PaymentMethodCardWalletMasterpassModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; @@ -4584,71 +11537,204 @@ export type PaymentMethodCardWalletSamsungPayModel = { }; export type PaymentMethodCardWalletVisaCheckoutModel = { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'billing_address': AddressModel; + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'email': string; + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'name': string; + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'shipping_address': AddressModel; }; export type PaymentMethodCardWalletModel = { 'amex_express_checkout'?: PaymentMethodCardWalletAmexExpressCheckoutModel | undefined; 'apple_pay'?: PaymentMethodCardWalletApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4': string; 'google_pay'?: PaymentMethodCardWalletGooglePayModel | undefined; 'link'?: PaymentMethodCardWalletLinkModel | undefined; 'masterpass'?: PaymentMethodCardWalletMasterpassModel | undefined; 'samsung_pay'?: PaymentMethodCardWalletSamsungPayModel | undefined; + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'link' | 'masterpass' | 'samsung_pay' | 'visa_checkout'; 'visa_checkout'?: PaymentMethodCardWalletVisaCheckoutModel | undefined; }; export type PaymentMethodCardModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * Checks on Card address and CVC if provided. + */ 'checks': PaymentMethodCardChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + */ 'display_brand': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Details of the original PaymentMethod that created this object. + */ 'generated_from': PaymentMethodCardGeneratedCardModel; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': NetworksModel; + /** + * Status of a card based on the card issuer. + */ 'regulated_status': 'regulated' | 'unregulated'; + /** + * Contains details on how this Card may be used for 3D Secure authentication. + */ 'three_d_secure_usage': ThreeDSecureUsageModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentMethodCardWalletModel; }; export type PaymentMethodCardPresentNetworksModel = { + /** + * All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). + */ 'available': string[]; + /** + * The preferred network for the card. + */ 'preferred': string; }; export type PaymentMethodCardPresentModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': string; + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ 'brand_product': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': PaymentMethodCardPresentNetworksModel; + /** + * Details about payment methods collected offline. + */ 'offline': PaymentMethodDetailsCardPresentOfflineModel; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; 'wallet'?: PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletModel | undefined; }; export type PaymentMethodCashappModel = { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ 'buyer_id': string; + /** + * A public identifier for buyers using Cash App. + */ 'cashtag': string; }; @@ -4657,13 +11743,28 @@ export type PaymentMethodCryptoModel = { }; export type CustomLogoModel = { + /** + * Content type of the Dashboard-only CustomPaymentMethodType logo. + */ 'content_type': string; + /** + * URL of the Dashboard-only CustomPaymentMethodType logo. + */ 'url': string; }; export type PaymentMethodCustomModel = { + /** + * Display name of the Dashboard-only CustomPaymentMethodType. + */ 'display_name': string; + /** + * Contains information about the Dashboard-only CustomPaymentMethodType logo. + */ 'logo': CustomLogoModel; + /** + * ID of the Dashboard-only CustomPaymentMethodType. Not expandable. + */ 'type': string; }; @@ -4672,11 +11773,20 @@ export type PaymentMethodCustomerBalanceModel = { }; export type PaymentMethodEpsModel = { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ 'bank': 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau'; }; export type PaymentMethodFpxModel = { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ 'bank': 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob'; }; @@ -4700,24 +11810,74 @@ export type PaymentMethodIdBankTransferModel = { }; export type PaymentMethodIdealModel = { + /** + * The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ 'bank': 'abn_amro' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe'; + /** + * The Bank Identifier Code of the customer's bank, if the bank was provided. + */ 'bic': 'ABNANL2A' | 'ASNBNL21' | 'BITSNL2A' | 'BUNQNL2A' | 'BUUTNL2A' | 'FNOMNL22' | 'FVLBNL22' | 'HANDNL2A' | 'INGBNL2A' | 'KNABNL2H' | 'MOYONL21' | 'NNBANL2G' | 'NTSBDEB1' | 'RABONL2U' | 'RBRBNL21' | 'REVOIE23' | 'REVOLT21' | 'SNSBNL2A' | 'TRIONL2U'; }; export type PaymentMethodInteracPresentModel = { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ 'brand': string; + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ 'cardholder_name': string; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ 'description'?: string | undefined; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint': string; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': string; + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ 'iin'?: string | undefined; + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ 'issuer'?: string | undefined; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * Contains information about card networks that can be used to process the payment. + */ 'networks': PaymentMethodCardPresentNetworksModel; + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ 'preferred_locales': string[]; + /** + * How card details were read in this transaction. + */ 'read_method': 'contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2'; }; @@ -4726,12 +11886,24 @@ export type PaymentMethodKakaoPayModel = { }; export type PaymentFlowsPrivatePaymentMethodsKlarnaDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type PaymentMethodKlarnaModel = { + /** + * The customer's date of birth, if provided. + */ 'dob'?: PaymentFlowsPrivatePaymentMethodsKlarnaDobModel | undefined; }; @@ -4740,12 +11912,24 @@ export type PaymentMethodKonbiniModel = { }; export type PaymentMethodKrCardModel = { + /** + * The local credit or debit card brand. + */ 'brand': 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'nh' | 'post' | 'samsung' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'woori'; + /** + * The last four digits of the card. This may not be present for American Express cards. + */ 'last4': string; }; export type PaymentMethodLinkModel = { + /** + * Account owner's email address. + */ 'email': string; + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ 'persistent_token'?: string | undefined; }; @@ -4762,16 +11946,40 @@ export type PaymentMethodMultibancoModel = { }; export type PaymentMethodNaverPayModel = { + /** + * Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. + */ 'buyer_id': string; + /** + * Whether to fund this transaction with Naver Pay points or a card. + */ 'funding': 'card' | 'points'; }; export type PaymentMethodNzBankAccountModel = { + /** + * The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ 'account_holder_name': string; + /** + * The numeric code for the bank account's bank. + */ 'bank_code': string; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The numeric code for the bank account's bank branch. + */ 'branch_code': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The suffix of the bank account number. + */ 'suffix': string; }; @@ -4780,6 +11988,9 @@ export type PaymentMethodOxxoModel = { }; export type PaymentMethodP24Model = { + /** + * The customer's bank, if provided. + */ 'bank': 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank'; }; @@ -4796,10 +12007,27 @@ export type PaymentMethodPaynowModel = { }; export type PaymentMethodPaypalModel = { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'country': string; + /** + * Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + */ 'fingerprint'?: string | undefined; + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'payer_email': string; + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ 'payer_id': string; + /** + * Owner's verified email. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ 'verified_email'?: string | undefined; }; @@ -4808,8 +12036,17 @@ export type PaymentMethodPaypayModel = { }; export type PaymentMethodPaytoModel = { + /** + * Bank-State-Branch number of the bank account. + */ 'bsb_number': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * The PayID alias for the bank account. + */ 'pay_id': string; }; @@ -4826,8 +12063,17 @@ export type PaymentMethodQrisModel = { }; export type PaymentFlowsPrivatePaymentMethodsRechnungDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; @@ -4848,16 +12094,40 @@ export type PaymentMethodSatispayModel = { }; export type SepaDebitGeneratedFromModel = { + /** + * The ID of the Charge that generated this PaymentMethod, if any. + */ 'charge': string | ChargeModel; + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ 'setup_attempt': string | SetupAttemptModel; }; export type PaymentMethodSepaDebitModel = { + /** + * Bank code of bank associated with the bank account. + */ 'bank_code': string; + /** + * Branch code of bank associated with the bank account. + */ 'branch_code': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Information about the object that generated this PaymentMethod. + */ 'generated_from': SepaDebitGeneratedFromModel; + /** + * Last four characters of the IBAN. + */ 'last4': string; }; @@ -4866,11 +12136,20 @@ export type PaymentMethodShopeepayModel = { }; export type PaymentMethodSofortModel = { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; }; export type PaymentMethodStripeBalanceModel = { + /** + * The connected account ID whose Stripe balance to use as the source of payment + */ 'account'?: string | undefined; + /** + * The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + */ 'source_type': 'bank_account' | 'card' | 'fpx'; }; @@ -4883,12 +12162,24 @@ export type PaymentMethodTwintModel = { }; export type UsBankAccountNetworksModel = { + /** + * The preferred network. + */ 'preferred': string; + /** + * All supported networks. + */ 'supported': Array<'ach' | 'us_domestic_wire'>; }; export type PaymentMethodUsBankAccountBlockedModel = { + /** + * The ACH network code that resulted in this block. + */ 'network_code': 'R02' | 'R03' | 'R04' | 'R05' | 'R07' | 'R08' | 'R10' | 'R11' | 'R16' | 'R20' | 'R29' | 'R31'; + /** + * The reason why this PaymentMethod's fingerprint has been blocked + */ 'reason': 'bank_account_closed' | 'bank_account_frozen' | 'bank_account_invalid_details' | 'bank_account_restricted' | 'bank_account_unusable' | 'debit_not_authorized' | 'tokenized_account_number_deactivated'; }; @@ -4897,15 +12188,45 @@ export type PaymentMethodUsBankAccountStatusDetailsModel = { }; export type PaymentMethodUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account number of the bank account. + */ 'account_number'?: string | undefined; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * The name of the bank. + */ 'bank_name': string; + /** + * The ID of the Financial Connections Account used to create the payment method. + */ 'financial_connections_account': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * Contains information about US bank account networks that can be used. + */ 'networks': UsBankAccountNetworksModel; + /** + * Routing number of the bank account. + */ 'routing_number': string; + /** + * Contains information about the future reusability of this PaymentMethod. + */ 'status_details': PaymentMethodUsBankAccountStatusDetailsModel; }; @@ -4917,11 +12238,21 @@ export type PaymentMethodZipModel = { }; +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export type PaymentMethodModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -4935,9 +12266,15 @@ export type PaymentMethodModel = { 'card'?: PaymentMethodCardModel | undefined; 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'crypto'?: PaymentMethodCryptoModel | undefined; 'custom'?: PaymentMethodCustomModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer': string | CustomerModel; 'customer_account'?: string | undefined; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; @@ -4946,6 +12283,9 @@ export type PaymentMethodModel = { 'giropay'?: PaymentMethodGiropayModel | undefined; 'gopay'?: PaymentMethodGopayModel | undefined; 'grabpay'?: PaymentMethodGrabpayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'id_bank_transfer'?: PaymentMethodIdBankTransferModel | undefined; 'ideal'?: PaymentMethodIdealModel | undefined; @@ -4954,10 +12294,19 @@ export type PaymentMethodModel = { 'klarna'?: PaymentMethodKlarnaModel | undefined; 'konbini'?: PaymentMethodKonbiniModel | undefined; 'kr_card'?: PaymentMethodKrCardModel | undefined; + /** + * The Mandate object of the most recently created Mandate associated with this payment method + */ 'latest_active_mandate'?: MandateModel | undefined; 'link'?: PaymentMethodLinkModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodMbWayModel | undefined; + /** + * 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': { [key: string]: string; }; @@ -4965,6 +12314,9 @@ export type PaymentMethodModel = { 'multibanco'?: PaymentMethodMultibancoModel | undefined; 'naver_pay'?: PaymentMethodNaverPayModel | undefined; 'nz_bank_account'?: PaymentMethodNzBankAccountModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method'; 'oxxo'?: PaymentMethodOxxoModel | undefined; 'p24'?: PaymentMethodP24Model | undefined; @@ -4988,6 +12340,9 @@ export type PaymentMethodModel = { 'stripe_balance'?: PaymentMethodStripeBalanceModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -4995,486 +12350,1390 @@ export type PaymentMethodModel = { }; export type InvoiceSettingCustomerRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + */ 'template': string; }; export type InvoiceSettingCustomerSettingModel = { + /** + * Default custom fields to be displayed on invoices for this customer. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * Default footer to be displayed on invoices for this customer. + */ 'footer': string; + /** + * Default options for invoice PDF rendering for this customer. + */ 'rendering_options': InvoiceSettingCustomerRenderingOptionsModel; }; export type DeletedApplicationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The name of the application. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'application'; }; export type ConnectAccountReferenceModel = { + /** + * The connected account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * Type of the account referenced. + */ 'type': 'account' | 'self'; }; export type SubscriptionAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on this 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': ConnectAccountReferenceModel; }; export type SubscriptionsResourceBillingCycleAnchorConfigModel = { + /** + * The day of the month of the billing_cycle_anchor. + */ 'day_of_month': number; + /** + * The hour of the day of the billing_cycle_anchor. + */ 'hour': number; + /** + * The minute of the hour of the billing_cycle_anchor. + */ 'minute': number; + /** + * The month to start full cycle billing periods. + */ 'month': number; + /** + * The second of the minute of the billing_cycle_anchor. + */ 'second': number; }; export type SubscriptionsResourceBillingModeFlexibleModel = { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ 'proration_discounts'?: 'included' | 'itemized' | undefined; }; +/** + * The billing mode of the subscription. + */ export type SubscriptionsResourceBillingModeModel = { + /** + * Configure behavior for flexible billing mode + */ 'flexible': SubscriptionsResourceBillingModeFlexibleModel; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; + /** + * Details on when the current billing_mode was adopted. + */ 'updated_at'?: number | undefined; }; export type CustomUnitAmountModel = { + /** + * The maximum unit amount the customer can specify for this item. + */ 'maximum': number; + /** + * The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + */ 'minimum': number; + /** + * The starting unit amount which can be updated by the customer. + */ 'preset': number; }; export type PriceTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount': number; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal': string; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to': number; }; export type CurrencyOptionModel = { + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount': CustomUnitAmountModel; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal': string; }; export type MigrateToModel = { + /** + * The behavior controlling at what point in the subscription lifecycle to migrate the price + */ 'behavior': 'at_cycle_end'; + /** + * The unix timestamp after at which subscriptions will start to migrate to the new price. + */ 'effective_after': number; + /** + * The id of the price being migrated to + */ 'price': string; }; export type ProductMarketingFeatureModel = { + /** + * The marketing feature name. Up to 80 characters long. + */ 'name'?: string | undefined; }; export type PackageDimensionsModel = { + /** + * Height, in inches. + */ 'height': number; + /** + * Length, in inches. + */ 'length': number; + /** + * Weight, in ounces. + */ 'weight': number; + /** + * Width, in inches. + */ 'width': number; }; +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export type TaxCodeModel = { + /** + * A detailed description of which types of products the tax code represents. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A short name for the tax code. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_code'; }; +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export type ProductModel = { + /** + * Whether the product is currently available for purchase. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + */ 'default_price'?: string | PriceModel | undefined; + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ 'images': string[]; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + */ 'marketing_features': ProductMarketingFeatureModel[]; + /** + * 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': { [key: string]: string; }; + /** + * The product's name, meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; + /** + * The dimensions of this product for shipping purposes. + */ 'package_dimensions': PackageDimensionsModel; + /** + * Whether this product is shipped (i.e., physical goods). + */ 'shippable': boolean; + /** + * Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + */ 'statement_descriptor'?: string | undefined; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ 'tax_code': string | TaxCodeModel; + /** + * The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + */ 'type': 'good' | 'service'; + /** + * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + */ 'unit_label'?: string | undefined; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * A URL of a publicly-accessible webpage for this product. + */ 'url': string; }; export type DeletedProductModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product'; }; export type RecurringModel = { + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; + /** + * The meter tracking the usage of a metered price + */ 'meter': string; + /** + * Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + */ 'trial_period_days': number; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; export type TransformQuantityModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PriceModel = { + /** + * Whether the price can be used for new purchases. + */ 'active': boolean; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: CurrencyOptionModel; } | undefined; + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ 'custom_unit_amount': CustomUnitAmountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + */ 'lookup_key': string; + /** + * 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': { [key: string]: string; }; + /** + * Subscriptions using this price will be migrated to use the new referenced price. + */ 'migrate_to'?: MigrateToModel | undefined; + /** + * A brief description of the price, hidden from customers. + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; + /** + * The ID of the product this price is associated with. + */ 'product': string | ProductModel | DeletedProductModel; + /** + * The recurring components of a price such as `interval` and `usage_type`. + */ 'recurring': RecurringModel; + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PriceTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode': 'graduated' | 'volume'; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_quantity': TransformQuantityModel; + /** + * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + */ 'type': 'one_time' | 'recurring'; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'unit_amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'unit_amount_decimal': string; }; +/** + * Represents the entities that the billing schedule applies to. + */ export type SubscriptionsResourceBillingSchedulesAppliesToModel = { + /** + * The billing schedule will apply to the subscription item with the given price ID. + */ 'price': string | PriceModel; + /** + * Controls which subscription items the billing schedule applies to. + */ 'type': 'price'; }; +/** + * Configures the `bill_until` date based on the provided `interval` and `interval_count`. + */ export type SubscriptionsResourceBillingSchedulesBillUntilDurationModel = { + /** + * Specifies billing duration. Either `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The multiplier applied to the interval. + */ 'interval_count': number; }; +/** + * Specifies the end of billing period. + */ export type SubscriptionsResourceBillingSchedulesBillUntilModel = { + /** + * The timestamp the billing schedule will apply until. + */ 'computed_timestamp': number; + /** + * Specifies the billing period. + */ 'duration': SubscriptionsResourceBillingSchedulesBillUntilDurationModel; + /** + * If specified, the billing schedule will apply until the specified timestamp. + */ 'timestamp': number; + /** + * Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. + */ 'type': 'duration' | 'timestamp'; }; +/** + * Sets the billing schedule for the subscription. + */ export type SubscriptionsResourceBillingSchedulesModel = { + /** + * Specifies which subscription items the billing schedule applies to. + */ 'applies_to': SubscriptionsResourceBillingSchedulesAppliesToModel[]; 'bill_until': SubscriptionsResourceBillingSchedulesBillUntilModel; + /** + * Unique identifier for the billing schedule. + */ 'key': string; }; export type SubscriptionBillingThresholdsModel = { + /** + * Monetary threshold that triggers the subscription to create an invoice + */ 'amount_gte': number; + /** + * Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + */ 'reset_billing_cycle_anchor': boolean; }; export type CancellationDetailsModel = { + /** + * Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + */ 'comment': string; + /** + * The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + */ 'feedback': 'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused'; + /** + * Why this subscription was canceled. + */ 'reason': 'cancellation_requested' | 'payment_disputed' | 'payment_failed'; }; +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export type TaxRateFlatAmountModel = { + /** + * Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ 'amount': number; + /** + * Three-letter ISO currency code, in lowercase. + */ 'currency': string; }; +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export type TaxRateModel = { + /** + * Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + */ 'active': boolean; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ 'description': string; + /** + * The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + */ 'display_name': string; + /** + * Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + * this percentage reflects the rate actually used to calculate tax based on the product's taxability + * and whether the user is registered to collect taxes in the corresponding jurisdiction. + */ 'effective_percentage': number; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount': TaxRateFlatAmountModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * This specifies if the tax rate is inclusive or exclusive. + */ 'inclusive': boolean; + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + */ 'jurisdiction': string; + /** + * The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + */ 'jurisdiction_level': 'city' | 'country' | 'county' | 'district' | 'multiple' | 'state'; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_rate'; + /** + * Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + */ 'percentage': number; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type': 'flat_amount' | 'percentage'; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state': string; + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxIDsOwnerModel = { + /** + * The account being referenced when `type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * The Connect Application being referenced when `type` is `application`. + */ 'application'?: string | ApplicationModel | undefined; + /** + * The customer being referenced when `type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; + /** + * The account being referenced when `type` is `customer`. + */ 'customer_account'?: string | undefined; + /** + * Type of owner referenced. + */ 'type': 'account' | 'application' | 'customer' | 'self'; }; export type TaxIdVerificationModel = { + /** + * Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + */ 'status': 'pending' | 'unavailable' | 'unverified' | 'verified'; + /** + * Verified address. + */ 'verified_address': string; + /** + * Verified name. + */ 'verified_name': string; }; +/** + * 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 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) + */ export type TaxIdModel = { + /** + * Two-letter ISO code representing the country of the tax ID. + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer. + */ 'customer': string | CustomerModel; + /** + * ID of the account. + */ 'customer_account'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; + /** + * The account or customer the tax ID belongs to. + */ 'owner': TaxIDsOwnerModel; + /** + * Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * Value of the tax ID. + */ 'value': string; + /** + * Tax ID verification information. + */ 'verification': TaxIdVerificationModel; }; export type DeletedTaxIdModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax_id'; }; export type SubscriptionsResourceSubscriptionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + */ 'account_tax_ids': Array; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionItemBillingThresholdsModel = { + /** + * Usage threshold that triggers the subscription to create an invoice + */ 'usage_gte': number; }; export type PlanTierModel = { + /** + * Price for the entire tier. + */ 'flat_amount': number; + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ 'flat_amount_decimal': string; + /** + * Per unit price for units relevant to the tier. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; + /** + * Up to and including to this quantity will be contained in the tier. + */ 'up_to': number; }; export type TransformUsageModel = { + /** + * Divide usage by this number. + */ 'divide_by': number; + /** + * After division, either round the result `up` or `down`. + */ 'round': 'down' | 'up'; }; +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export type PlanModel = { + /** + * Whether the plan can be used for new purchases. + */ 'active': boolean; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ 'amount': number; + /** + * The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ 'amount_decimal': string; + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ 'billing_scheme': 'per_unit' | 'tiered'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': 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': { [key: string]: string; }; + /** + * The meter tracking the usage of a metered price + */ 'meter': string; + /** + * A brief description of the plan, hidden from customers. + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; + /** + * The product whose pricing this plan determines. + */ 'product': string | ProductModel | DeletedProductModel; + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ 'tiers'?: PlanTierModel[] | undefined; + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ 'tiers_mode': 'graduated' | 'volume'; + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ 'transform_usage': TransformUsageModel; + /** + * Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + */ 'trial_period_days': number; + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ 'usage_type': 'licensed' | 'metered'; }; export type SubscriptionsTrialsResourceTrialModel = { + /** + * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + */ 'converts_to'?: string[] | undefined; + /** + * Determines the type of trial for this item. + */ 'type': 'free' | 'paid'; }; +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ export type SubscriptionItemModel = { + /** + * The time period the subscription item has been billed for. + */ 'billed_until'?: number | undefined; + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionItemBillingThresholdsModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The end time of this subscription item's current billing period. + */ 'current_period_end': number; + /** + * The start time of this subscription item's current billing period. + */ 'current_period_start': number; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; 'plan': PlanModel; 'price': PriceModel; + /** + * The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The `subscription` this `subscription_item` belongs to. + */ 'subscription': string; + /** + * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + */ 'tax_rates': TaxRateModel[]; + /** + * Options that configure the trial on the subscription item. + */ 'trial'?: SubscriptionsTrialsResourceTrialModel | undefined; }; export type SubscriptionsResourcePriceMigrationErrorFailedTransitionModel = { + /** + * The original price to be migrated. + */ 'source_price': string; + /** + * The intended resulting price of the migration. + */ 'target_price': string; }; export type SubscriptionsResourcePriceMigrationErrorModel = { + /** + * The time at which the price migration encountered an error. + */ 'errored_at': number; + /** + * The involved price pairs in each failed transition. + */ 'failed_transitions': SubscriptionsResourcePriceMigrationErrorFailedTransitionModel[]; + /** + * The type of error encountered by the price migration. + */ 'type': 'price_uniqueness_violation'; }; export type PaymentPlanAmountModel = { + /** + * Incremental amount due for this payment in cents (or local equivalent). + */ 'amount': number; + /** + * The amount in cents (or local equivalent) that was paid for this payment. + */ 'amount_paid': number; + /** + * The difference between the payment’s amount and amount_paid, in cents (or local equivalent). + */ 'amount_remaining': number; + /** + * Number of days from when invoice is finalized until the payment is due. + */ 'days_until_due': number; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Date on which a payment plan’s payment is due. + */ 'due_date': number; + /** + * Timestamp when the payment was paid. + */ 'paid_at': number; + /** + * The status of the payment, one of `open`, `paid`, or `past_due` + */ 'status': 'open' | 'paid' | 'past_due'; }; export type AutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'finalization_requires_location_inputs' | 'finalization_system_error'; + /** + * 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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this invoice. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type InvoicesResourceConfirmationSecretModel = { + /** + * The client_secret of the payment that Stripe creates for the invoice after finalization. + */ 'client_secret': string; + /** + * The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization + */ 'type': string; }; export type InvoicesResourceInvoiceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; +/** + * 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. + */ export type MarginModel = { + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * Name of the margin that's displayed on, for example, invoices. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'margin'; + /** + * 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; }; export type DeletedDiscountModel = { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ 'checkout_session': string; + /** + * The ID of the customer associated with this discount. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The ID of the account associated with this discount. + */ 'customer_account'?: string | undefined; + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ 'id': string; + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ 'invoice': string; + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ 'invoice_item': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'discount'; + /** + * The promotion code applied to create this discount. + */ 'promotion_code': string | PromotionCodeModel; 'source': DiscountSourceModel; + /** + * Date that the coupon was applied. + */ 'start': number; + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ 'subscription': string; + /** + * The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + */ 'subscription_item': string; }; export type InvoicesResourceFromInvoiceModel = { + /** + * The relation between this invoice and the cloned invoice + */ 'action': string; + /** + * The invoice that was cloned. + */ 'invoice': string | InvoiceModel; }; export type DiscountsResourceDiscountAmountModel = { + /** + * The amount, in cents (or local equivalent), of the discount. + */ 'amount': number; + /** + * The discount that was applied to get this discount amount. + */ 'discount': string | DiscountModel | DeletedDiscountModel; }; export type MarginsResourceMarginAmountModel = { + /** + * 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 | MarginModel; }; export type BillingBillResourceInvoicingLinesCommonCreditedItemsModel = { + /** + * Invoice containing the credited invoice line items + */ 'invoice': string; + /** + * Credited invoice line items + */ 'invoice_line_items': string[]; }; export type BillingBillResourceInvoicingLinesCommonProrationDetailsModel = { + /** + * For a credit proration `line_item`, the original debit line_items to which the credit proration applies. + */ 'credited_items': BillingBillResourceInvoicingLinesCommonCreditedItemsModel; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item': string; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details': BillingBillResourceInvoicingLinesCommonProrationDetailsModel; + /** + * The subscription that the invoice item belongs to + */ 'subscription': string; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel = { + /** + * The invoice item that generated this line item + */ 'invoice_item': string; + /** + * Whether this is a proration + */ 'proration': boolean; + /** + * Additional details for proration line items + */ 'proration_details': BillingBillResourceInvoicingLinesCommonProrationDetailsModel; + /** + * The subscription that the subscription item belongs to + */ 'subscription': string; + /** + * The subscription item that generated this line item + */ 'subscription_item': string; }; export type BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel = { + /** + * Details about the invoice item that generated this line item + */ 'invoice_item_details': BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParentModel; + /** + * Details about the subscription item that generated this line item + */ 'subscription_item_details': BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParentModel; + /** + * The type of parent that generated this line item + */ 'type': 'invoice_item_details' | 'subscription_item_details'; }; export type InvoiceLineItemPeriodModel = { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ 'end': number; + /** + * The start of the period. This value is inclusive. + */ 'start': number; }; export type BillingCreditGrantsResourceMonetaryAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount. + */ 'value': number; }; export type BillingCreditGrantsResourceAmountModel = { + /** + * The monetary amount. + */ 'monetary': BillingCreditGrantsResourceMonetaryAmountModel; + /** + * The type of this amount. We currently only support `monetary` billing credits. + */ 'type': 'monetary'; }; export type BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel = { + /** + * The invoice to which the reinstated billing credits were originally applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the reinstated billing credits were originally applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceCreditModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + */ 'credits_application_invoice_voided': BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedModel; + /** + * The type of credit transaction. + */ 'type': 'credits_application_invoice_voided' | 'credits_granted'; }; export type BillingCreditGrantsResourceApplicablePriceModel = { + /** + * Unique identifier for the object. + */ 'id': string; }; export type BillingCreditGrantsResourceScopeModel = { + /** + * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`. + */ 'price_type'?: 'metered' | undefined; + /** + * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. + */ 'prices'?: BillingCreditGrantsResourceApplicablePriceModel[] | undefined; }; @@ -5483,6 +13742,9 @@ export type BillingCreditGrantsResourceApplicabilityConfigModel = { }; export type BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel = { + /** + * The `frozen_time` that the Test Clock is advancing towards. + */ 'target_frozen_time': number; }; @@ -5490,85 +13752,242 @@ export type BillingClocksResourceStatusDetailsStatusDetailsModel = { 'advancing'?: BillingClocksResourceStatusDetailsAdvancingStatusDetailsModel | undefined; }; +/** + * A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ export type TestHelpersTestClockModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this clock is scheduled to auto delete. + */ 'deletes_after': number; + /** + * Time at which all objects belonging to this clock are frozen. + */ 'frozen_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The custom name supplied at creation. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; + /** + * The status of the Test Clock. + */ 'status': 'advancing' | 'internal_failure' | 'ready'; 'status_details': BillingClocksResourceStatusDetailsStatusDetailsModel; }; +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export type BillingCreditGrantModel = { 'amount': BillingCreditGrantsResourceAmountModel; 'applicability_config': BillingCreditGrantsResourceApplicabilityConfigModel; + /** + * The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + */ 'category': 'paid' | 'promotional'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of the customer receiving the billing credits. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the account receiving the billing credits + */ 'customer_account'?: string | undefined; + /** + * The time when the billing credits become effective-when they're eligible for use. + */ 'effective_at': number; + /** + * The time when the billing credits expire. If not present, the billing credits don't expire. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * A descriptive name shown in dashboard. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_grant'; + /** + * The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + */ 'priority'?: number | undefined; + /** + * ID of the test clock this credit grant belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + */ 'voided_at': number; }; export type BillingCreditGrantsResourceBalanceCreditsAppliedModel = { + /** + * The invoice to which the billing credits were applied. + */ 'invoice': string | InvoiceModel; + /** + * The invoice line item to which the billing credits were applied. + */ 'invoice_line_item': string; }; export type BillingCreditGrantsResourceBalanceDebitModel = { 'amount': BillingCreditGrantsResourceAmountModel; + /** + * Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. + */ 'credits_applied': BillingCreditGrantsResourceBalanceCreditsAppliedModel; + /** + * The type of debit transaction. + */ 'type': 'credits_applied' | 'credits_expired' | 'credits_voided'; }; +/** + * A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + */ export type BillingCreditBalanceTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Credit details for this credit balance transaction. Only present if type is `credit`. + */ 'credit': BillingCreditGrantsResourceBalanceCreditModel; + /** + * The credit grant associated with this credit balance transaction. + */ 'credit_grant': string | BillingCreditGrantModel; + /** + * Debit details for this credit balance transaction. Only present if type is `debit`. + */ 'debit': BillingCreditGrantsResourceBalanceDebitModel; + /** + * The effective time of this credit balance transaction. + */ 'effective_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_transaction'; + /** + * ID of the test clock this credit balance transaction belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * The type of credit balance transaction (credit or debit). + */ 'type': 'credit' | 'debit'; }; export type InvoicesResourcePretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * The margin that was applied to get this pretax credit amount. + */ 'margin'?: string | MarginModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount' | 'margin'; }; export type BillingBillResourceInvoicingPricingPricingPriceDetailsModel = { + /** + * The ID of the price this item is associated with. + */ 'price': string; + /** + * The ID of the product this item is associated with. + */ 'product': string; }; export type BillingBillResourceInvoicingPricingPricingModel = { 'price_details'?: BillingBillResourceInvoicingPricingPricingPriceDetailsModel | undefined; + /** + * The type of the pricing details. + */ 'type': 'price_details'; + /** + * The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; }; export type TaxProductIntegrationResourceTaxCalculationReferenceModel = { + /** + * The calculation identifier for tax calculation response. + */ 'calculation_id': string; + /** + * The calculation identifier for tax calculation response line item. + */ 'calculation_item_id': string; }; @@ -5577,102 +13996,247 @@ export type BillingBillResourceInvoicingTaxesTaxRateDetailsModel = { }; export type BillingBillResourceInvoicingTaxesTaxModel = { + /** + * The amount of the tax, in cents (or local equivalent). + */ 'amount': number; + /** + * Whether this tax is inclusive or exclusive. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Additional details about the tax rate. Only present when `type` is `tax_rate_details`. + */ 'tax_rate_details': BillingBillResourceInvoicingTaxesTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_available' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount': number; + /** + * The type of tax information. + */ 'type': 'tax_rate_details'; }; +/** + * Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. + * + * Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). + */ export type LineItemModel = { + /** + * The amount, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The amount of discount calculated per discount for this line item. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * If true, discounts will apply to this line item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice that contains this line item. + */ 'invoice': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The amount of margin calculated per margin for this line item. + */ 'margin_amounts'?: MarginsResourceMarginAmountModel[] | undefined; + /** + * 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 | undefined; + /** + * 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`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + */ 'metadata': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'line_item'; + /** + * The parent that generated this line item. + */ 'parent': BillingBillResourceInvoicingLinesParentsInvoiceLineItemParentModel; 'period': InvoiceLineItemPeriodModel; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + */ 'pretax_credit_amounts': InvoicesResourcePretaxCreditAmountModel[]; + /** + * The pricing information of the line item. + */ 'pricing': BillingBillResourceInvoicingPricingPricingModel; + /** + * The quantity of the subscription, if the line item is a subscription or a proration. + */ 'quantity': number; 'subscription': string | SubscriptionModel; + /** + * The tax calculation identifiers of the line item. + */ 'tax_calculation_reference'?: TaxProductIntegrationResourceTaxCalculationReferenceModel | undefined; + /** + * The tax information of the line item. + */ 'taxes': BillingBillResourceInvoicingTaxesTaxModel[]; }; export type BillingBillResourceInvoicingParentsInvoiceBillingCadenceParentModel = { + /** + * The billing cadence that generated this invoice + */ 'billing_cadence': string; }; export type BillingBillResourceInvoicingParentsInvoiceQuoteParentModel = { + /** + * The quote that generated this invoice + */ 'quote': string; }; +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export type BillingBillResourceInvoicingCommonInvoicePauseCollectionModel = { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ 'behavior': 'keep_as_draft' | 'mark_uncollectible' | 'void'; + /** + * The time after which the subscription will resume collecting payments. + */ 'resumes_at': number; }; export type BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel = { + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + * *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + */ 'metadata': { [key: string]: string; }; + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'pause_collection'?: BillingBillResourceInvoicingCommonInvoicePauseCollectionModel | undefined; + /** + * The subscription that generated this invoice + */ 'subscription': string | SubscriptionModel; + /** + * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + */ 'subscription_proration_date'?: number | undefined; }; export type BillingBillResourceInvoicingParentsInvoiceParentModel = { + /** + * Details about the billing cadence that generated this invoice + */ 'billing_cadence_details'?: BillingBillResourceInvoicingParentsInvoiceBillingCadenceParentModel | undefined; + /** + * Details about the quote that generated this invoice + */ 'quote_details': BillingBillResourceInvoicingParentsInvoiceQuoteParentModel; + /** + * Details about the subscription that generated this invoice + */ 'subscription_details': BillingBillResourceInvoicingParentsInvoiceSubscriptionParentModel; + /** + * The type of parent that generated this invoice + */ 'type': 'billing_cadence_details' | 'quote_details' | 'subscription_details'; }; export type InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel = { + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type InvoicePaymentMethodOptionsAcssDebitModel = { 'mandate_options'?: InvoicePaymentMethodOptionsAcssDebitMandateOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicePaymentMethodOptionsBancontactModel = { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ 'preferred_language': 'de' | 'en' | 'fr' | 'nl'; }; export type InvoiceInstallmentsCardModel = { + /** + * Whether Installments are enabled for this Invoice. + */ 'enabled': boolean; }; export type InvoicePaymentMethodOptionsCardModel = { 'installments'?: InvoiceInstallmentsCardModel | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel = { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ 'country': 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; }; export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel = { 'eu_bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferModel | undefined; + /** + * The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': string; }; export type InvoicePaymentMethodOptionsCustomerBalanceModel = { 'bank_transfer'?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; }; @@ -5685,6 +14249,9 @@ export type InvoicePaymentMethodOptionsKonbiniModel = { }; export type InvoicePaymentMethodOptionsPixModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof': 'always' | 'never'; }; @@ -5693,9 +14260,21 @@ export type InvoicePaymentMethodOptionsSepaDebitModel = { }; export type InvoicePaymentMethodOptionsMandateOptionsUpiModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ 'end_date': number; }; @@ -5704,71 +14283,191 @@ export type InvoicePaymentMethodOptionsUpiModel = { }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel = { + /** + * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + */ 'account_subcategories'?: Array<'checking' | 'savings'> | undefined; + /** + * The institution to use to filter for possible accounts to link. + */ 'institution'?: string | undefined; }; export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel = { 'filters'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersModel | undefined; + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ 'permissions'?: Array<'balances' | 'ownership' | 'payment_method' | 'transactions'> | undefined; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'inferred_balances' | 'ownership' | 'transactions'>; }; export type InvoicePaymentMethodOptionsUsBankAccountModel = { 'financial_connections'?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsModel | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type InvoicesPaymentMethodOptionsModel = { + /** + * If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + */ 'acss_debit': InvoicePaymentMethodOptionsAcssDebitModel; + /** + * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + */ 'bancontact': InvoicePaymentMethodOptionsBancontactModel; + /** + * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + */ 'card': InvoicePaymentMethodOptionsCardModel; + /** + * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ 'customer_balance': InvoicePaymentMethodOptionsCustomerBalanceModel; + /** + * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ 'id_bank_transfer'?: InvoicePaymentMethodOptionsIdBankTransferModel | undefined; + /** + * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + */ 'konbini': InvoicePaymentMethodOptionsKonbiniModel; + /** + * If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice’s PaymentIntent. + */ 'pix'?: InvoicePaymentMethodOptionsPixModel | undefined; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + */ 'sepa_debit': InvoicePaymentMethodOptionsSepaDebitModel; + /** + * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent. + */ 'upi'?: InvoicePaymentMethodOptionsUpiModel | undefined; + /** + * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + */ 'us_bank_account': InvoicePaymentMethodOptionsUsBankAccountModel; }; export type InvoicesPaymentSettingsModel = { + /** + * 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. + */ 'default_mandate': string; + /** + * Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + */ 'payment_method_options': InvoicesPaymentMethodOptionsModel; + /** + * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types': Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'stripe_balance' | 'swish' | 'upi' | 'us_bank_account' | 'wechat_pay'>; }; export type DeletedInvoiceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; }; +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export type PaymentsPrimitivesPaymentRecordsResourceAmountModel = { + /** + * 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; + /** + * A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. + */ 'value': number; }; +/** + * Information about the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel = { + /** + * ID of the Stripe Customer associated with this payment. + */ 'customer': string; + /** + * The customer's email address. + */ 'email': string; + /** + * The customer's name. + */ 'name': string; + /** + * The customer's phone number. + */ 'phone': string; }; +/** + * A representation of a physical address. + */ export type PaymentsPrimitivesPaymentRecordsResourceAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State, county, province, or region. + */ 'state': string; }; +/** + * Billing details used by the customer for this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The billing email associated with the method of payment. + */ 'email': string; + /** + * The billing name associated with the method of payment. + */ 'name': string; + /** + * The billing phone number associated with the method of payment. + */ 'phone': string; }; @@ -5779,6 +14478,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel = { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. + */ 'used': boolean; }; @@ -5790,6 +14492,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel = { + /** + * Type of the apple_pay transaction, one of `apple_pay` or `apple_pay_later`. + */ 'type': string; }; @@ -5799,45 +14504,139 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsReso export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel = { 'apple_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePayModel | undefined; + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ 'dynamic_last4'?: string | undefined; 'google_pay'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceGooglePayModel | undefined; + /** + * The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ 'type': string; }; +/** + * Details of the card used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsModel = { + /** + * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. + */ 'brand': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + */ 'capture_before'?: number | undefined; + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ 'checks': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceChecksModel; + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ 'country': string; + /** + * Two-digit number representing the card's expiration month. + */ 'exp_month': number; + /** + * Four-digit number representing the card's expiration year. + */ 'exp_year': number; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ 'fingerprint'?: string | undefined; + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ 'funding': 'credit' | 'debit' | 'prepaid' | 'unknown'; + /** + * The last four digits of the card. + */ 'last4': string; + /** + * True if this payment was marked as MOTO and out of scope for SCA. + */ 'moto'?: boolean | undefined; + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * If this card has network token credentials, this contains the details of the network token credentials. + */ 'network_token'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkTokenModel | undefined; + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ 'network_transaction_id': string; + /** + * Populated if this transaction used 3D Secure authentication. + */ 'three_d_secure': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceThreeDSecureModel; + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ 'wallet': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletModel; }; +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetailsModel = { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ 'display_name': string; + /** + * The custom payment method type associated with this payment. + */ 'type': string; }; export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel = { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + */ 'account_holder_type': 'company' | 'individual'; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The ACH payment reference for this transaction. + */ 'payment_reference': string; + /** + * The routing number for the bank account. + */ 'routing_number': string; }; +/** + * Details about the Payment Method used in this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = { 'ach_credit_transfer'?: PaymentMethodDetailsAchCreditTransferModel | undefined; 'ach_debit'?: PaymentMethodDetailsAchDebitModel | undefined; @@ -5851,6 +14650,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'bacs_debit'?: PaymentMethodDetailsBacsDebitModel | undefined; 'bancontact'?: PaymentMethodDetailsBancontactModel | undefined; 'billie'?: PaymentMethodDetailsBillieModel | undefined; + /** + * The billing details associated with the method of payment. + */ 'billing_details': PaymentsPrimitivesPaymentRecordsResourceBillingDetailsModel; 'blik'?: PaymentMethodDetailsBlikModel | undefined; 'boleto'?: PaymentMethodDetailsBoletoModel | undefined; @@ -5882,6 +14684,9 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'p24'?: PaymentMethodDetailsP24Model | undefined; 'pay_by_bank'?: PaymentMethodDetailsPayByBankModel | undefined; 'payco'?: PaymentMethodDetailsPaycoModel | undefined; + /** + * ID of the Stripe PaymentMethod used to make this payment. + */ 'payment_method': string; 'paynow'?: PaymentMethodDetailsPaynowModel | undefined; 'paypal'?: PaymentMethodDetailsPaypalModel | undefined; @@ -5902,6 +14707,11 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'stripe_balance'?: PaymentMethodDetailsStripeBalanceModel | undefined; 'swish'?: PaymentMethodDetailsSwishModel | undefined; 'twint'?: PaymentMethodDetailsTwintModel | undefined; + /** + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ 'type': string; 'us_bank_account'?: PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountDetailsModel | undefined; 'wechat'?: PaymentMethodDetailsWechatModel | undefined; @@ -5909,21 +14719,50 @@ export type PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel = 'zip'?: PaymentMethodDetailsZipModel | undefined; }; +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel = { + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + */ 'payment_reference': string; }; +/** + * Processor information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel = { 'custom'?: PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetailsModel | undefined; + /** + * The processor used for this payment attempt. + */ 'type': 'custom'; }; +/** + * The customer's shipping information associated with this payment. + */ export type PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel = { 'address': PaymentsPrimitivesPaymentRecordsResourceAddressModel; + /** + * The shipping recipient's name. + */ 'name': string; + /** + * The shipping recipient's phone number. + */ 'phone': string; }; +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export type PaymentRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -5932,250 +14771,799 @@ export type PaymentRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentRecord. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details': PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence': 'off_session' | 'on_session'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the latest Payment Attempt Record attached to this Payment Record. + */ 'latest_payment_attempt_record': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Shipping information for this payment. + */ 'shipping_details': PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel; }; export type InvoicesPaymentsInvoicePaymentAssociatedPaymentModel = { + /** + * ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead. + */ 'charge'?: string | ChargeModel | undefined; + /** + * ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * ID of the PaymentRecord associated with this payment when `type` is `payment_record`. + */ 'payment_record'?: string | PaymentRecordModel | undefined; + /** + * Type of payment object associated with this invoice payment. + */ 'type': 'charge' | 'payment_intent' | 'payment_record'; }; export type InvoicesPaymentsInvoicePaymentStatusTransitionsModel = { + /** + * The time that the payment was canceled. + */ 'canceled_at': number; + /** + * The time that the payment succeeded. + */ 'paid_at': number; }; +/** + * Invoice Payments represent payments made against invoices. Invoice Payments can + * be accessed in two ways: + * 1. By expanding the `payments` field on the [Invoice](https://stripe.com/docs/api#invoice) resource. + * 2. By using the Invoice Payment retrieve and list endpoints. + * + * Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices. + * This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and + * monitor the allocation details of the payments. + */ export type InvoicePaymentModel = { + /** + * Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + */ 'amount_paid': number; + /** + * Amount intended to be paid toward this invoice, in cents (or local equivalent) + */ 'amount_requested': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was paid. + */ 'invoice': string | InvoiceModel | DeletedInvoiceModel; + /** + * Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_payment'; 'payment': InvoicesPaymentsInvoicePaymentAssociatedPaymentModel; + /** + * The status of the payment, one of `open`, `paid`, or `canceled`. + */ 'status': string; 'status_transitions': InvoicesPaymentsInvoicePaymentStatusTransitionsModel; }; export type InvoiceRenderingPdfModel = { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. + */ 'page_size': 'a4' | 'auto' | 'letter'; }; export type InvoicesResourceInvoiceRenderingModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * Invoice pdf rendering options + */ 'pdf': InvoiceRenderingPdfModel; + /** + * ID of the rendering template that the invoice is formatted by. + */ 'template': string; + /** + * Version of the rendering template that the invoice is using. + */ 'template_version': number; }; export type ShippingRateDeliveryEstimateBoundModel = { + /** + * A unit of time. + */ 'unit': 'business_day' | 'day' | 'hour' | 'month' | 'week'; + /** + * Must be greater than 0. + */ 'value': number; }; export type ShippingRateDeliveryEstimateModel = { + /** + * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + */ 'maximum': ShippingRateDeliveryEstimateBoundModel; + /** + * The lower bound of the estimated range. If empty, represents no lower bound. + */ 'minimum': ShippingRateDeliveryEstimateBoundModel; }; export type ShippingRateCurrencyOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; }; export type ShippingRateFixedAmountModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'amount': number; + /** + * 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; + /** + * Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ 'currency_options'?: { [key: string]: ShippingRateCurrencyOptionModel; } | undefined; }; +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export type ShippingRateModel = { + /** + * Whether the shipping rate can be used for new purchases. Defaults to `true`. + */ 'active': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'delivery_estimate': ShippingRateDeliveryEstimateModel; + /** + * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ 'display_name': string; 'fixed_amount'?: ShippingRateFixedAmountModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'shipping_rate'; + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'unspecified'; + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + */ 'tax_code': string | TaxCodeModel; + /** + * The type of calculation to use on the shipping rate. + */ 'type': 'fixed_amount'; }; export type LineItemsTaxAmountModel = { + /** + * Amount of tax applied for this rate. + */ 'amount': number; 'rate': TaxRateModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ 'taxable_amount': number; }; export type InvoicesResourceShippingCostModel = { + /** + * Total shipping cost before any taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this invoice. + */ 'shipping_rate': string | ShippingRateModel; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type InvoicesResourceStatusTransitionsModel = { + /** + * The time that the invoice draft was finalized. + */ 'finalized_at': number; + /** + * The time that the invoice was marked uncollectible. + */ 'marked_uncollectible_at': number; + /** + * The time that the invoice was paid. + */ 'paid_at': number; + /** + * The time that the invoice was voided. + */ 'voided_at': number; }; export type InvoiceItemThresholdReasonModel = { + /** + * The IDs of the line items that triggered the threshold invoice. + */ 'line_item_ids': string[]; + /** + * The quantity threshold boundary that applied to the given line item. + */ 'usage_gte': number; }; export type InvoiceThresholdReasonModel = { + /** + * The total invoice amount threshold boundary if it triggered the threshold invoice. + */ 'amount_gte': number; + /** + * Indicates which line items triggered a threshold invoice. + */ 'item_reasons': InvoiceItemThresholdReasonModel[]; }; +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export type InvoiceModel = { + /** + * The country of the business associated with this invoice, most often the business creating the invoice. + */ 'account_country': string; + /** + * The public name of the business associated with this invoice, most often the business creating the invoice. + */ 'account_name': string; + /** + * The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + */ 'account_tax_ids': Array; + /** + * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + */ 'amount_due': number; + /** + * Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. + */ 'amount_overpaid': number; + /** + * The amount, in cents (or local equivalent), that was paid. + */ 'amount_paid': number; + /** + * The difference between amount_due and amount_paid, in cents (or local equivalent). + */ 'amount_remaining': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + */ 'amounts_due'?: PaymentPlanAmountModel[] | undefined; + /** + * ID of the Connect Application that created the invoice. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + */ 'attempt_count': number; + /** + * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + */ 'attempted': boolean; + /** + * Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + */ 'auto_advance'?: boolean | undefined; 'automatic_tax': AutomaticTaxModel; + /** + * The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + */ 'automatically_finalizes_at': number; + /** + * Indicates the reason why the invoice was created. + * + * * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * * `subscription_create`: A new subscription was created. + * * `subscription_cycle`: A subscription advanced into a new period. + * * `subscription_threshold`: A subscription reached a billing threshold. + * * `subscription_update`: A subscription was updated. + * * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. + */ 'billing_reason': 'automatic_pending_invoice_item_invoice' | 'manual' | 'quote_accept' | 'subscription' | 'subscription_create' | 'subscription_cycle' | 'subscription_threshold' | 'subscription_update' | 'upcoming'; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. + */ 'confirmation_secret'?: InvoicesResourceConfirmationSecretModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * The ID of the customer who will be billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The ID of the account who will be billed. + */ 'customer_account'?: string | undefined; + /** + * The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_address': AddressModel; + /** + * The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_email': string; + /** + * The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_name': string; + /** + * The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_phone': string; + /** + * The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_shipping': ShippingModel; + /** + * The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_ids'?: InvoicesResourceInvoiceTaxIdModel[] | undefined; + /** + * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + */ 'default_margins'?: Array | undefined; + /** + * 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. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + */ 'default_source': string | PaymentSourceModel; + /** + * The tax rates applied to this invoice, if any. + */ 'default_tax_rates': TaxRateModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + */ 'description': string; + /** + * The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ 'due_date': number; + /** + * The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + */ 'effective_at': number; + /** + * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'ending_balance': number; + /** + * Footer displayed on the invoice. + */ 'footer': string; + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ 'from_invoice': InvoicesResourceFromInvoiceModel; + /** + * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + */ 'hosted_invoice_url'?: string | undefined; + /** + * Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`. + */ 'id'?: string | undefined; + /** + * The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'invoice_pdf'?: string | undefined; 'issuer': ConnectAccountReferenceModel; + /** + * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + */ 'last_finalization_error': ApiErrorsModel; + /** + * The ID of the most recent non-draft revision of this invoice + */ 'latest_revision': string | InvoiceModel; + /** + * The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + */ 'lines': { + /** + * Details about each object. + */ 'data': LineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ 'next_payment_attempt': number; + /** + * A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice'; + /** + * 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': string | AccountModel; + /** + * The parent that generated this invoice + */ 'parent': BillingBillResourceInvoicingParentsInvoiceParentModel; 'payment_settings': InvoicesPaymentSettingsModel; + /** + * Payments for this invoice + */ 'payments'?: { + /** + * Details about each object. + */ 'data': InvoicePaymentModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_end': number; + /** + * Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_start': number; + /** + * Total amount of all post-payment credit notes issued for this invoice. + */ 'post_payment_credit_notes_amount': number; + /** + * Total amount of all pre-payment credit notes issued for this invoice. + */ 'pre_payment_credit_notes_amount': number; + /** + * This is the transaction number that appears on email receipts sent for this invoice. + */ 'receipt_number': string; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ 'rendering': InvoicesResourceInvoiceRenderingModel; + /** + * The details of the cost of shipping, including the ShippingRate applied on the invoice. + */ 'shipping_cost': InvoicesResourceShippingCostModel; + /** + * Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + */ 'shipping_details': ShippingModel; + /** + * Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + */ 'starting_balance': number; + /** + * Extra information about an invoice for the customer's credit card statement. + */ 'statement_descriptor': string; + /** + * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + */ 'status': 'draft' | 'open' | 'paid' | 'uncollectible' | 'void'; 'status_transitions': InvoicesResourceStatusTransitionsModel; 'subscription'?: string | SubscriptionModel | undefined; + /** + * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + */ 'subtotal_excluding_tax': number; + /** + * ID of the test clock this invoice belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; 'threshold_reason'?: InvoiceThresholdReasonModel | undefined; + /** + * Total after discounts and taxes. + */ 'total': number; + /** + * The aggregate amounts calculated per discount across all line items. + */ 'total_discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + */ 'total_excluding_tax': number; + /** + * The aggregate amounts calculated per margin across all line items. + */ 'total_margin_amounts'?: MarginsResourceMarginAmountModel[] | undefined; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + */ 'total_pretax_credit_amounts': InvoicesResourcePretaxCreditAmountModel[]; + /** + * The aggregate tax information of all line items. + */ 'total_taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ 'webhooks_delivered_at': number; }; +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export type SubscriptionsResourcePauseCollectionModel = { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ 'behavior': 'keep_as_draft' | 'mark_uncollectible' | 'void'; + /** + * The time after which the subscription will resume collecting payments. + */ 'resumes_at': number; }; export type InvoiceMandateOptionsCardModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ 'description': string; }; export type SubscriptionPaymentMethodOptionsCardModel = { 'mandate_options'?: InvoiceMandateOptionsCardModel | undefined; + /** + * Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + */ 'network': 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'eftpos_au' | 'girocard' | 'interac' | 'jcb' | 'link' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; }; export type SubscriptionPaymentMethodOptionsMandateOptionsPixModel = { + /** + * Amount to be charged for future payments. + */ 'amount': number; + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof': 'always' | 'never'; + /** + * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + */ 'end_date': string; + /** + * Schedule at which the future payments will be charged. + */ 'payment_schedule': 'halfyearly' | 'monthly' | 'quarterly' | 'weekly' | 'yearly'; }; @@ -6184,99 +15572,262 @@ export type SubscriptionPaymentMethodOptionsPixModel = { }; export type SubscriptionsResourcePaymentMethodOptionsModel = { + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + */ 'acss_debit': InvoicePaymentMethodOptionsAcssDebitModel; + /** + * This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + */ 'bancontact': InvoicePaymentMethodOptionsBancontactModel; + /** + * This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + */ 'card': SubscriptionPaymentMethodOptionsCardModel; + /** + * This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + */ 'customer_balance': InvoicePaymentMethodOptionsCustomerBalanceModel; + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. + */ 'id_bank_transfer'?: InvoicePaymentMethodOptionsIdBankTransferModel | undefined; + /** + * This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + */ 'konbini': InvoicePaymentMethodOptionsKonbiniModel; + /** + * This sub-hash contains details about the Pix payment method options to pass to invoices created by the subscription. + */ 'pix'?: SubscriptionPaymentMethodOptionsPixModel | undefined; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + */ 'sepa_debit': InvoicePaymentMethodOptionsSepaDebitModel; + /** + * This sub-hash contains details about the UPI payment method options to pass to invoices created by the subscription. + */ 'upi'?: InvoicePaymentMethodOptionsUpiModel | undefined; + /** + * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + */ 'us_bank_account': InvoicePaymentMethodOptionsUsBankAccountModel; }; export type SubscriptionsResourcePaymentSettingsModel = { + /** + * Payment-method-specific configuration to provide to invoices created by the subscription. + */ 'payment_method_options': SubscriptionsResourcePaymentMethodOptionsModel; + /** + * The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ 'payment_method_types': Array<'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'payco' | 'paynow' | 'paypal' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'stripe_balance' | 'swish' | 'upi' | 'us_bank_account' | 'wechat_pay'>; + /** + * Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. + */ 'save_default_payment_method': 'off' | 'on_subscription'; }; export type SubscriptionPendingInvoiceItemIntervalModel = { + /** + * Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + */ 'interval_count': number; }; +/** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ export type SubscriptionsResourcePendingUpdateModel = { + /** + * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ 'billing_cycle_anchor': number; + /** + * The point after which the changes reflected by this update will be discarded and no longer applied. + */ 'expires_at': number; + /** + * The number of iterations of prebilling to apply. + */ 'prebilling_iterations'?: number | undefined; + /** + * List of subscription items, each with an attached plan, that will be set if the update is applied. + */ 'subscription_items': SubscriptionItemModel[]; + /** + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + */ 'trial_end': number; + /** + * Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + */ 'trial_from_plan': boolean; }; +/** + * Prebilling stores the time period and invoice for a Subscription billed in advance. + */ export type SubscriptionPrebillingDataModel = { + /** + * ID of the prebilling invoice. + */ 'invoice': string | InvoiceModel; + /** + * The end of the last period for which the invoice pre-bills. + */ 'period_end': number; + /** + * The start of the first period for which the invoice pre-bills. + */ 'period_start': number; + /** + * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + */ 'update_behavior'?: 'prebill' | 'reset' | undefined; }; export type SubscriptionScheduleCurrentPhaseModel = { + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; }; export type SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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': ConnectAccountReferenceModel; }; export type InvoiceSettingSubscriptionScheduleSettingModel = { + /** + * The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + */ 'account_tax_ids': Array; + /** + * 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; 'issuer': ConnectAccountReferenceModel; }; export type SubscriptionTransferDataModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount_percent': number; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; export type SubscriptionSchedulesResourceDefaultSettingsModel = { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent': number; 'automatic_tax'?: SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor': 'automatic' | 'phase_start'; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * 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; 'invoice_settings': InvoiceSettingSubscriptionScheduleSettingModel; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; }; export type DiscountEndModel = { + /** + * The discount end timestamp. + */ 'timestamp': number; + /** + * The discount end type. + */ 'type': 'timestamp'; }; export type DiscountsResourceStackableDiscountModel = { + /** + * ID of the coupon to create a new discount for. + */ 'coupon': string | CouponModel; + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ 'discount': string | DiscountModel; + /** + * Details to determine how long the discount should be applied for. + */ 'discount_end'?: DiscountEndModel | undefined; + /** + * ID of the promotion code to create a new discount for. + */ 'promotion_code': string | PromotionCodeModel; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEndModel = { + /** + * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the end of the invoice item period. + */ 'type': 'min_item_period_end' | 'phase_end' | 'timestamp'; }; export type SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStartModel = { + /** + * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + */ 'timestamp'?: number | undefined; + /** + * Select how to calculate the start of the invoice item period. + */ 'type': 'max_item_period_start' | 'phase_start' | 'timestamp'; }; @@ -6286,476 +15837,1440 @@ export type SubscriptionScheduleAddInvoiceItemPeriodModel = { }; export type DeletedPriceModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'price'; }; +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export type SubscriptionScheduleAddInvoiceItemModel = { + /** + * The stackable discounts that will be applied to the item. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * 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': { [key: string]: string; }; 'period': SubscriptionScheduleAddInvoiceItemPeriodModel; + /** + * ID of the price used to generate the invoice item. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * The quantity of the invoice item. + */ 'quantity': number; + /** + * The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + */ 'tax_rates'?: TaxRateModel[] | undefined; }; export type SchedulesPhaseAutomaticTaxModel = { + /** + * If Stripe disabled automatic tax, this enum describes why. + */ 'disabled_reason': 'requires_location_inputs'; + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ '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': ConnectAccountReferenceModel; }; export type InvoiceSettingSubscriptionSchedulePhaseSettingModel = { + /** + * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + */ 'account_tax_ids': Array; + /** + * 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': ConnectAccountReferenceModel; }; export type DeletedPlanModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'plan'; }; +/** + * A phase item describes the price and quantity of a phase. + */ export type SubscriptionScheduleConfigurationItemModel = { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionItemBillingThresholdsModel; + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + */ 'metadata': { [key: string]: string; }; + /** + * ID of the plan to which the customer should be subscribed. + */ 'plan': string | PlanModel | DeletedPlanModel; + /** + * ID of the price to which the customer should be subscribed. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * Quantity of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + */ 'tax_rates'?: TaxRateModel[] | undefined; + /** + * Options that configure the trial on the subscription item. + */ 'trial'?: SubscriptionsTrialsResourceTrialModel | undefined; }; +/** + * The Pause Collection settings specify how to pause collection for a subscription during a phase by modifying + * the behavior of the invoices that are generated during the paused period. + */ export type SubscriptionSchedulesResourcePauseCollectionModel = { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ 'behavior': 'keep_as_draft' | 'mark_uncollectible' | 'void'; }; +/** + * Defines how the scheduled subscription behaves when a trial ends. + */ export type SubscriptionSchedulesResourceEndBehaviorModel = { + /** + * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + */ 'prorate_up_front': 'defer' | 'include'; }; +/** + * Configures how the scheduled subscription behaves during the trial period. + */ export type SubscriptionSchedulesResourceTrialSettingsModel = { + /** + * Defines how the subscription should behave when a trial ends. + */ 'end_behavior': SubscriptionSchedulesResourceEndBehaviorModel; }; +/** + * A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ export type SubscriptionSchedulePhaseConfigurationModel = { + /** + * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + */ 'add_invoice_items': SubscriptionScheduleAddInvoiceItemModel[]; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ 'application_fee_percent': number; 'automatic_tax'?: SchedulesPhaseAutomaticTaxModel | undefined; + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ 'billing_cycle_anchor': 'automatic' | 'phase_start'; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * 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; + /** + * ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * The default tax rates to apply to the subscription during this phase of the subscription schedule. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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; + /** + * The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * The end of this phase of the subscription schedule. + */ 'end_date': number; + /** + * The invoice settings applicable during this phase. + */ 'invoice_settings': InvoiceSettingSubscriptionSchedulePhaseSettingModel; + /** + * Subscription items to configure the subscription to during this phase of the subscription schedule. + */ 'items': SubscriptionScheduleConfigurationItemModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + */ 'metadata': { [key: string]: string; }; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ 'on_behalf_of': string | AccountModel; + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'pause_collection'?: SubscriptionSchedulesResourcePauseCollectionModel | undefined; + /** + * When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; + /** + * The start of this phase of the subscription schedule. + */ 'start_date': number; + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; + /** + * Specify behavior of the trial when crossing schedule phase boundaries + */ 'trial_continuation'?: 'continue' | 'none' | undefined; + /** + * When the trial ends within the phase. + */ 'trial_end': number; + /** + * Settings related to any trials on the subscription during this phase. + */ 'trial_settings'?: SubscriptionSchedulesResourceTrialSettingsModel | undefined; }; +/** + * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) + */ export type SubscriptionScheduleModel = { + /** + * ID of the Connect Application that created the schedule. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + */ 'billing_behavior'?: 'prorate_on_next_phase' | 'prorate_up_front' | undefined; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ 'completed_at': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + */ 'current_phase': SubscriptionScheduleCurrentPhaseModel; + /** + * ID of the customer who owns the subscription schedule. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the account who owns the subscription schedule. + */ 'customer_account'?: string | undefined; 'default_settings': SubscriptionSchedulesResourceDefaultSettingsModel; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + */ 'end_behavior': 'cancel' | 'none' | 'release' | 'renew'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Details of the most recent price migration that failed for the subscription schedule. + */ 'last_price_migration_error'?: SubscriptionsResourcePriceMigrationErrorModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_schedule'; + /** + * Configuration for the subscription schedule's phases. + */ 'phases': SubscriptionSchedulePhaseConfigurationModel[]; + /** + * Time period and invoice for a Subscription billed in advance. + */ 'prebilling'?: SubscriptionPrebillingDataModel | undefined; + /** + * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ 'released_at': number; + /** + * ID of the subscription once managed by the subscription schedule (if it is released). + */ 'released_subscription': string; + /** + * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ 'status': 'active' | 'canceled' | 'completed' | 'not_started' | 'released'; + /** + * ID of the subscription managed by the subscription schedule. + */ 'subscription': string | SubscriptionModel; + /** + * ID of the test clock this subscription schedule belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; }; +/** + * Defines how a subscription behaves when a free trial ends. + */ export type SubscriptionsTrialsResourceEndBehaviorModel = { + /** + * Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + */ 'missing_payment_method': 'cancel' | 'create_invoice' | 'pause'; }; +/** + * Configures how this subscription behaves during the trial period. + */ export type SubscriptionsTrialsResourceTrialSettingsModel = { 'end_behavior': SubscriptionsTrialsResourceEndBehaviorModel; }; +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export type SubscriptionModel = { + /** + * ID of the Connect Application that created the subscription. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent': number; 'automatic_tax': SubscriptionAutomaticTaxModel; + /** + * The Billing Cadence which controls the timing of recurring invoice generation for this subscription.If unset, the subscription will bill according to its own configured schedule and create its own invoices.If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. + */ 'billing_cadence'?: string | undefined; + /** + * The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + */ 'billing_cycle_anchor': number; + /** + * The fixed values used to calculate the `billing_cycle_anchor`. + */ 'billing_cycle_anchor_config': SubscriptionsResourceBillingCycleAnchorConfigModel; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Billing schedules for this subscription. + */ 'billing_schedules'?: SubscriptionsResourceBillingSchedulesModel[] | undefined; + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ 'billing_thresholds': SubscriptionBillingThresholdsModel; + /** + * A date in the future at which the subscription will automatically get canceled + */ 'cancel_at': number; + /** + * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + */ 'cancel_at_period_end': boolean; + /** + * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + */ 'canceled_at': number; + /** + * Details about why this subscription was cancelled + */ 'cancellation_details': CancellationDetailsModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer who owns the subscription. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the account who owns the subscription. + */ 'customer_account'?: string | undefined; + /** + * Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + */ 'days_until_due': number; + /** + * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_payment_method': string | PaymentMethodModel; + /** + * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ 'default_source': string | PaymentSourceModel; + /** + * The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + */ 'default_tax_rates'?: TaxRateModel[] | undefined; + /** + * 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; + /** + * The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * If the subscription has ended, the date the subscription ended. + */ 'ended_at': number; + /** + * Unique identifier for the object. + */ 'id': string; 'invoice_settings': SubscriptionsResourceSubscriptionInvoiceSettingsModel; + /** + * List of subscription items, each with an attached price. + */ 'items': { + /** + * Details about each object. + */ 'data': SubscriptionItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Details of the most recent price migration that failed for the subscription. + */ 'last_price_migration_error'?: SubscriptionsResourcePriceMigrationErrorModel | undefined; + /** + * The most recent invoice this subscription has generated. + */ 'latest_invoice': string | InvoiceModel; + /** + * 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': { [key: string]: string; }; + /** + * Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + */ 'next_pending_invoice_item_invoice': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription'; + /** + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'pause_collection': SubscriptionsResourcePauseCollectionModel; + /** + * Payment settings passed on to invoices created by the subscription. + */ 'payment_settings': SubscriptionsResourcePaymentSettingsModel; + /** + * Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + */ 'pending_invoice_item_interval': SubscriptionPendingInvoiceItemIntervalModel; + /** + * You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + */ 'pending_setup_intent': string | SetupIntentModel; + /** + * If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + */ 'pending_update': SubscriptionsResourcePendingUpdateModel; + /** + * Time period and invoice for a Subscription billed in advance. + */ 'prebilling'?: SubscriptionPrebillingDataModel | undefined; + /** + * The schedule attached to the subscription + */ 'schedule': string | SubscriptionScheduleModel; + /** + * Date when the subscription was first created. The date might differ from the `created` date due to backdating. + */ 'start_date': number; + /** + * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + * + * If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + */ 'status': 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'paused' | 'trialing' | 'unpaid'; + /** + * ID of the test clock this subscription belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ 'transfer_data': SubscriptionTransferDataModel; + /** + * If the subscription has a trial, the end of that trial. + */ 'trial_end': number; + /** + * Settings related to subscription trials. + */ 'trial_settings': SubscriptionsTrialsResourceTrialSettingsModel; + /** + * If the subscription has a trial, the beginning of that trial. + */ 'trial_start': number; }; export type CustomerTaxLocationModel = { + /** + * The identified tax country of the customer. + */ 'country': string; + /** + * The data source used to infer the customer's location. + */ 'source': 'billing_address' | 'ip_address' | 'payment_method' | 'shipping_destination'; + /** + * The identified tax state, county, province, or region of the customer. + */ 'state': string; }; export type CustomerTaxModel = { + /** + * Surfaces if automatic tax computation is possible given the current customer location information. + */ 'automatic_tax': 'failed' | 'not_collecting' | 'supported' | 'unrecognized_location'; + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ 'ip_address': string; + /** + * The identified tax location of the customer. + */ 'location': CustomerTaxLocationModel; + /** + * The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; }; +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export type CustomerModel = { + /** + * The customer's address. + */ 'address'?: AddressModel | undefined; + /** + * The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance). + */ 'balance'?: number | undefined; + /** + * The customer's business name. + */ 'business_name'?: string | undefined; + /** + * The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + */ 'cash_balance'?: CashBalanceModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + */ 'currency'?: string | undefined; 'customer_account'?: string | undefined; + /** + * ID of the default payment source for the customer. + * + * If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ 'default_source': string | PaymentSourceModel; + /** + * Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + * + * If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + * + * If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + */ 'delinquent'?: boolean | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Describes the current discount active on the customer, if there is one. + */ 'discount'?: DiscountModel | undefined; + /** + * The customer's email address. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The customer's individual name. + */ 'individual_name'?: string | undefined; + /** + * The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + */ 'invoice_credit_balance'?: { [key: string]: number; } | undefined; + /** + * The prefix for the customer used to generate unique invoice numbers. + */ 'invoice_prefix'?: string | undefined; 'invoice_settings'?: InvoiceSettingCustomerSettingModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The customer's full name or business name. + */ 'name'?: string | undefined; + /** + * The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + */ 'next_invoice_sequence'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer'; + /** + * The customer's phone number. + */ 'phone'?: string | undefined; + /** + * The customer's preferred locales (languages), ordered by preference. + */ 'preferred_locales'?: string[] | undefined; + /** + * Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + */ 'shipping': ShippingModel; + /** + * The customer's payment sources, if any. + */ 'sources'?: { + /** + * Details about each object. + */ 'data': PaymentSourceModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The customer's current subscriptions, if any. + */ 'subscriptions'?: { + /** + * Details about each object. + */ 'data': SubscriptionModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'tax'?: CustomerTaxModel | undefined; + /** + * Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + */ 'tax_exempt'?: 'exempt' | 'none' | 'reverse' | undefined; + /** + * The customer's tax IDs. + */ 'tax_ids'?: { + /** + * Details about each object. + */ 'data': TaxIdModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * ID of the test clock that this customer belongs to. + */ 'test_clock'?: string | TestHelpersTestClockModel | undefined; }; export type AccountRequirementsErrorModel = { + /** + * The code for the type of error. + */ 'code': 'external_request' | 'information_missing' | 'invalid_address_city_state_postal_code' | 'invalid_address_highway_contract_box' | 'invalid_address_private_mailbox' | 'invalid_business_profile_name' | 'invalid_business_profile_name_denylisted' | 'invalid_company_name_denylisted' | 'invalid_dob_age_over_maximum' | 'invalid_dob_age_under_18' | 'invalid_dob_age_under_minimum' | 'invalid_product_description_length' | 'invalid_product_description_url_match' | 'invalid_representative_country' | 'invalid_signator' | 'invalid_statement_descriptor_business_mismatch' | 'invalid_statement_descriptor_denylisted' | 'invalid_statement_descriptor_length' | 'invalid_statement_descriptor_prefix_denylisted' | 'invalid_statement_descriptor_prefix_mismatch' | 'invalid_street_address' | 'invalid_tax_id' | 'invalid_tax_id_format' | 'invalid_tos_acceptance' | 'invalid_url_denylisted' | 'invalid_url_format' | 'invalid_url_length' | 'invalid_url_web_presence_detected' | 'invalid_url_website_business_information_mismatch' | 'invalid_url_website_empty' | 'invalid_url_website_inaccessible' | 'invalid_url_website_inaccessible_geoblocked' | 'invalid_url_website_inaccessible_password_protected' | 'invalid_url_website_incomplete' | 'invalid_url_website_incomplete_cancellation_policy' | 'invalid_url_website_incomplete_customer_service_details' | 'invalid_url_website_incomplete_legal_restrictions' | 'invalid_url_website_incomplete_refund_policy' | 'invalid_url_website_incomplete_return_policy' | 'invalid_url_website_incomplete_terms_and_conditions' | 'invalid_url_website_incomplete_under_construction' | 'invalid_url_website_other' | 'invalid_value_other' | 'unsupported_business_type' | 'verification_data_not_found' | 'verification_directors_mismatch' | 'verification_document_address_mismatch' | 'verification_document_address_missing' | 'verification_document_corrupt' | 'verification_document_country_not_supported' | 'verification_document_directors_mismatch' | '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_extraneous_directors' | 'verification_failed_address_match' | 'verification_failed_authorizer_authority' | '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_representative_authority' | 'verification_failed_residential_address' | 'verification_failed_tax_id_match' | 'verification_failed_tax_id_not_issued' | 'verification_legal_entity_structure_mismatch' | 'verification_missing_directors' | 'verification_missing_executives' | 'verification_missing_owners' | 'verification_rejected_ownership_exemption_reason' | 'verification_requires_additional_memorandum_of_associations' | 'verification_requires_additional_proof_of_registration' | 'verification_supportability'; + /** + * 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; }; export type ExternalAccountRequirementsModel = { + /** + * 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': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; +/** + * These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](/api#external_accounts) are transfer + * destinations on `Account` objects for connected accounts. + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + */ export type BankAccountModel = { + /** + * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`. + */ 'account'?: string | AccountModel | undefined; + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name': string; + /** + * The type of entity that holds the account. This can be either `individual` or `company`. + */ 'account_holder_type': string; + /** + * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + */ 'account_type': string; + /** + * A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + */ 'available_payout_methods'?: Array<'instant' | 'standard'> | undefined; + /** + * Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + */ 'bank_name': string; + /** + * Two-letter ISO code representing the country the bank account is located in. + */ 'country': string; + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ 'currency': string; + /** + * The ID of the customer that the bank account is associated with. + */ 'customer'?: string | CustomerModel | DeletedCustomerModel | undefined; + /** + * Whether this bank account is the default external account for its currency. + */ 'default_for_currency'?: boolean | undefined; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + */ 'future_requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The last four digits of the bank account number. + */ 'last4': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'bank_account'; + /** + * Information about the requirements for the bank account, including what information needs to be collected. + */ 'requirements'?: ExternalAccountRequirementsModel | undefined; + /** + * The routing transit number for the bank account. + */ 'routing_number': string; + /** + * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + * + * For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + */ 'status': string; }; export type ExternalAccountModel = BankAccountModel | CardModel; export type AccountRequirementsAlternativeModel = { + /** + * Fields that can be provided to satisfy all fields in `original_fields_due`. + */ 'alternative_fields_due': string[]; + /** + * Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + */ 'original_fields_due': string[]; }; export type AccountFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due': string[]; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`. + */ 'disabled_reason': 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountGroupMembershipModel = { + /** + * The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + */ 'payments_pricing': string; }; export type PersonAdditionalTosAcceptanceModel = { + /** + * The Unix timestamp marking when the legal guardian accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the legal guardian accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the legal guardian accepted the service agreement. + */ 'user_agent': string; }; export type PersonAdditionalTosAcceptancesModel = { + /** + * Details on the legal guardian's acceptance of the main Stripe service agreement. + */ 'account': PersonAdditionalTosAcceptanceModel; }; export type LegalEntityDobModel = { + /** + * The day of birth, between 1 and 31. + */ 'day': number; + /** + * The month of birth, between 1 and 12. + */ 'month': number; + /** + * The four-digit year of birth. + */ 'year': number; }; export type PersonFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonRelationshipModel = { + /** + * Whether the person is the authorizer of the account's representative. + */ 'authorizer': boolean; + /** + * Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + */ 'director': boolean; + /** + * Whether the person has significant responsibility to control, manage, or direct the organization. + */ 'executive': boolean; + /** + * Whether the person is the legal guardian of the account's representative. + */ 'legal_guardian': boolean; + /** + * Whether the person is an owner of the account’s legal entity. + */ 'owner': boolean; + /** + * The percent owned by the person of the account's legal entity. + */ 'percent_ownership': number; + /** + * Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + */ 'representative': boolean; + /** + * The person's title (e.g., CEO, Support Engineer). + */ 'title': string; }; export type PersonRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due': string[]; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type PersonEthnicityDetailsModel = { + /** + * The persons ethnicity + */ 'ethnicity': Array<'cuban' | 'hispanic_or_latino' | 'mexican' | 'not_hispanic_or_latino' | 'other_hispanic_or_latino' | 'prefer_not_to_answer' | 'puerto_rican'>; + /** + * Please specify your origin, when other is selected. + */ 'ethnicity_other': string; }; export type PersonRaceDetailsModel = { + /** + * The persons race. + */ 'race': Array<'african_american' | 'american_indian_or_alaska_native' | 'asian' | 'asian_indian' | 'black_or_african_american' | 'chinese' | 'ethiopian' | 'filipino' | 'guamanian_or_chamorro' | 'haitian' | 'jamaican' | 'japanese' | 'korean' | 'native_hawaiian' | 'native_hawaiian_or_other_pacific_islander' | 'nigerian' | 'other_asian' | 'other_black_or_african_american' | 'other_pacific_islander' | 'prefer_not_to_answer' | 'samoan' | 'somali' | 'vietnamese' | 'white'>; + /** + * Please specify your race, when other is selected. + */ 'race_other': string; }; export type PersonUsCfpbDataModel = { + /** + * The persons ethnicity details + */ 'ethnicity_details': PersonEthnicityDetailsModel; + /** + * The persons race details + */ 'race_details': PersonRaceDetailsModel; + /** + * The persons self-identified gender + */ 'self_identified_gender': string; }; export type LegalEntityPersonVerificationDocumentModel = { + /** + * The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'back': string | FileModel; + /** + * A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + */ 'details': string; + /** + * One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + */ 'details_code': string; + /** + * The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ 'front': string | FileModel; }; export type LegalEntityPersonVerificationModel = { + /** + * A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + */ 'additional_document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + */ 'details'?: string | undefined; + /** + * One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + */ 'details_code'?: string | undefined; 'document'?: LegalEntityPersonVerificationDocumentModel | undefined; + /** + * The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://stripe.com/docs/connect/handling-api-verification) to handle verification updates. + */ 'status': string; }; +/** + * This is an object representing a person associated with a Stripe account. + * + * A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + * + * See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + */ export type PersonModel = { + /** + * The account the person is associated with. + */ 'account'?: string | undefined; 'additional_tos_acceptances'?: PersonAdditionalTosAcceptancesModel | undefined; 'address'?: AddressModel | undefined; + /** + * The Kana variation of the person's address (Japan only). + */ 'address_kana'?: LegalEntityJapanAddressModel | undefined; + /** + * The Kanji variation of the person's address (Japan only). + */ 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'dob'?: LegalEntityDobModel | undefined; + /** + * The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'email'?: string | undefined; + /** + * The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name'?: string | undefined; + /** + * The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'first_name_kanji'?: string | undefined; + /** + * A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'full_name_aliases'?: string[] | undefined; + /** + * Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + */ 'future_requirements'?: PersonFutureRequirementsModel | undefined; + /** + * The person's gender. + */ 'gender'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + */ 'id_number_provided'?: boolean | undefined; + /** + * Whether the person's `id_number_secondary` was provided. + */ 'id_number_secondary_provided'?: boolean | undefined; + /** + * The person's last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name'?: string | undefined; + /** + * The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kana'?: string | undefined; + /** + * The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. + */ 'last_name_kanji'?: string | undefined; + /** + * The person's maiden name. + */ 'maiden_name'?: string | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The country where the person is a national. + */ 'nationality'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; + /** + * The person's phone number. + */ 'phone'?: string | undefined; + /** + * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + */ 'political_exposure'?: 'existing' | 'none' | undefined; 'registered_address'?: AddressModel | undefined; 'relationship'?: PersonRelationshipModel | undefined; + /** + * Information about the requirements for this person, including what information needs to be collected, and by when. + */ 'requirements'?: PersonRequirementsModel | undefined; + /** + * Whether the last four digits of the person's Social Security number have been provided (U.S. only). + */ 'ssn_last_4_provided'?: boolean | undefined; + /** + * Demographic data related to the person. + */ 'us_cfpb_data'?: PersonUsCfpbDataModel | undefined; 'verification'?: LegalEntityPersonVerificationModel | undefined; }; export type AccountRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ 'currently_due': string[]; + /** + * If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason': 'action_required.requested_capabilities' | 'listed' | 'other' | 'platform_paused' | 'rejected.fraud' | 'rejected.incomplete_verification' | 'rejected.listed' | 'rejected.other' | 'rejected.platform_fraud' | 'rejected.platform_other' | 'rejected.platform_terms_of_service' | 'rejected.terms_of_service' | 'requirements.past_due' | 'requirements.pending_verification' | 'under_review'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type ConnectRiskAccountRiskControlModel = { + /** + * Whether a pause of the risk control has been requested. + */ 'pause_requested': boolean; }; export type ConnectRiskAccountRiskControlsModel = { 'charges': ConnectRiskAccountRiskControlModel; 'payouts': ConnectRiskAccountRiskControlModel; + /** + * Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) + */ 'rejected_reason'?: 'credit' | 'fraud' | 'fraud_no_intent_to_fulfill' | 'fraud_other' | 'fraud_payment_method_casher' | 'fraud_payment_method_tester' | 'other' | 'terms_of_service' | undefined; }; export type AccountBacsDebitPaymentsSettingsModel = { + /** + * The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + */ 'display_name': string; + /** + * The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + */ 'service_user_number': string; }; export type AccountBankBcaOnboardingSettingsModel = { + /** + * Bank BCA business account holder name. + */ 'account_holder_name'?: string | undefined; + /** + * Bank BCA business account number. + */ 'business_account_number'?: string | undefined; }; export type AccountBrandingSettingsModel = { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + */ 'icon': string | FileModel; + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + */ 'logo': string | FileModel; + /** + * A CSS hex color value representing the primary branding color for this account + */ 'primary_color': string; + /** + * A CSS hex color value representing the secondary branding color for this account + */ 'secondary_color': string; }; export type AccountCapitalSettingsModel = { + /** + * Per-currency mapping of user-selected destination accounts used to pay out loans. + */ 'payout_destination'?: { [key: string]: string; } | undefined; + /** + * Per-currency mapping of all destination accounts eligible to receive loan payouts. + */ 'payout_destination_selector'?: { [key: string]: string[]; } | undefined; }; export type CardIssuingAccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -6764,65 +17279,149 @@ export type AccountCardIssuingSettingsModel = { }; export type AccountDeclineChargeOnModel = { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + */ 'avs_failure': boolean; + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + */ 'cvc_failure': boolean; }; export type AccountCardPaymentsSettingsModel = { 'decline_on'?: AccountDeclineChargeOnModel | undefined; + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix': string; + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kana': string; + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + */ 'statement_descriptor_prefix_kanji': string; }; export type AccountDashboardSettingsModel = { + /** + * The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + */ 'display_name': string; + /** + * The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + */ 'timezone': string; }; export type AccountInvoicesSettingsModel = { + /** + * The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + */ 'default_account_tax_ids': Array; + /** + * Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page. + */ 'hosted_payment_method_save': 'always' | 'never' | 'offer'; }; export type AccountPaymentsSettingsModel = { + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + */ 'statement_descriptor': string; + /** + * The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kana': string; + /** + * The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_kanji': string; + /** + * The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_prefix_kana': string; + /** + * The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + */ 'statement_descriptor_prefix_kanji': string; }; export type TransferScheduleModel = { + /** + * The number of days charges for the account will be held before being paid out. + */ 'delay_days': number; + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval': string; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_anchor'?: number | undefined; + /** + * The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + */ 'weekly_anchor'?: string | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type AccountPayoutSettingsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances': boolean; 'schedule': TransferScheduleModel; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor': string; }; export type AccountPaypayPaymentsSettingsModel = { + /** + * Whether your business sells digital content or not. + */ 'goods_type'?: 'digital_content' | 'other' | undefined; }; export type AccountSepaDebitPaymentsSettingsModel = { + /** + * SEPA creditor identifier that identifies the company making the payment. + */ 'creditor_id'?: string | undefined; }; export type TaxReportingAccountSettingsResourceTaxFormSettingsModel = { + /** + * Whether the account opted out of receiving their tax forms by postal delivery. + */ 'consented_to_paperless_delivery': boolean; }; export type AccountTermsOfServiceModel = { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ 'date': number; + /** + * The IP address from which the account representative accepted the service agreement. + */ 'ip': string; + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ 'user_agent'?: string | undefined; }; @@ -6848,153 +17447,409 @@ export type AccountSettingsModel = { }; export type AccountTosAcceptanceModel = { + /** + * The Unix timestamp marking when the account representative accepted their service agreement + */ 'date'?: number | undefined; + /** + * The IP address from which the account representative accepted their service agreement + */ 'ip'?: string | undefined; + /** + * The user's service agreement type + */ 'service_agreement'?: string | undefined; + /** + * The user agent of the browser from which the account representative accepted their service agreement + */ 'user_agent'?: string | undefined; }; +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export type AccountModel = { + /** + * Business information about the account. + */ 'business_profile'?: AccountBusinessProfileModel | undefined; + /** + * The business type. + */ 'business_type'?: 'company' | 'government_entity' | 'individual' | 'non_profit' | undefined; 'capabilities'?: AccountCapabilitiesModel | undefined; + /** + * Whether the account can process charges. + */ 'charges_enabled'?: boolean | undefined; 'company'?: LegalEntityCompanyModel | undefined; 'controller'?: AccountUnificationAccountControllerModel | undefined; + /** + * The account's country. + */ 'country'?: string | undefined; + /** + * Time at which the account was connected. Measured in seconds since the Unix epoch. + */ 'created'?: number | undefined; + /** + * Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + */ 'default_currency'?: string | undefined; + /** + * Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + */ 'details_submitted'?: boolean | undefined; + /** + * An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + */ 'email'?: string | undefined; + /** + * External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + */ 'external_accounts'?: { + /** + * The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. + */ 'data': ExternalAccountModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'future_requirements'?: AccountFutureRequirementsModel | undefined; + /** + * The groups associated with the account. + */ 'groups'?: AccountGroupMembershipModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'individual'?: PersonModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; + /** + * Whether the funds in this account can be paid out. + */ 'payouts_enabled'?: boolean | undefined; 'requirements'?: AccountRequirementsModel | undefined; 'risk_controls'?: ConnectRiskAccountRiskControlsModel | undefined; + /** + * Options for customizing how the account functions within Stripe. + */ 'settings'?: AccountSettingsModel | undefined; 'tos_acceptance'?: AccountTosAcceptanceModel | undefined; + /** + * The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + */ 'type'?: 'custom' | 'express' | 'none' | 'standard' | undefined; }; +/** + * Occurs whenever a user authorizes an application. Sent to the related application only. + */ export type AccountApplicationAuthorizedModel = { 'object': ApplicationModel; }; +/** + * Occurs whenever a user deauthorizes an application. Sent to the related application only. + */ export type AccountApplicationDeauthorizedModel = { 'object': ApplicationModel; }; +/** + * Occurs whenever an external account is created. + */ export type AccountExternalAccountCreatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an external account is deleted. + */ export type AccountExternalAccountDeletedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an external account is updated. + */ export type AccountExternalAccountUpdatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever an account status or property has changed. + */ export type AccountUpdatedModel = { 'object': AccountModel; }; export type AccountCapabilityFutureRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ 'currently_due': string[]; + /** + * This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + */ 'disabled_reason': 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; export type AccountCapabilityRequirementsModel = { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ 'alternatives': AccountRequirementsAlternativeModel[]; + /** + * The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested. + */ 'current_deadline': number; + /** + * Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. + */ 'currently_due': string[]; + /** + * Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + */ 'disabled_reason': 'other' | 'paused.inactivity' | 'pending.onboarding' | 'pending.review' | 'platform_disabled' | 'platform_paused' | 'rejected.inactivity' | 'rejected.other' | 'rejected.unsupported_business' | 'requirements.fields_needed'; + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ 'errors': AccountRequirementsErrorModel[]; + /** + * Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ 'eventually_due': string[]; + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. + */ 'past_due': string[]; + /** + * Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + */ 'pending_verification': string[]; }; +/** + * Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. + * + * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) + */ export type AccountLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The timestamp at which this account link will expire. + */ 'expires_at': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_link'; + /** + * The URL for the account link. + */ 'url': string; }; export type IssuingComplianceNoticeEmailModel = { + /** + * Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + */ 'plain_text': string; + /** + * Email address of the recipient. + */ 'recipient': string; + /** + * Subject of the email. + */ 'subject': string; }; export type IssuingComplianceNoticeLinkedObjectsModel = { + /** + * Associated [Capability](https://stripe.com/docs/api/capabilities) + */ 'capability': string; + /** + * Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) + */ 'issuing_credit_underwriting_record'?: string | undefined; + /** + * Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) + */ 'issuing_dispute': string; }; +/** + * A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself. + * + * See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. + */ export type AccountNoticeModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * When present, the deadline for sending the notice to meet the relevant regulations. + */ 'deadline': number; + /** + * Information about the email when sent. + */ 'email': IssuingComplianceNoticeEmailModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Information about objects related to the notice. + */ 'linked_objects': IssuingComplianceNoticeLinkedObjectsModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_notice'; + /** + * Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. + */ 'reason': 'issuing.account_closed_for_inactivity' | 'issuing.account_closed_for_not_providing_business_model_clarification' | 'issuing.account_closed_for_not_providing_url_clarification' | 'issuing.account_closed_for_not_providing_use_case_clarification' | 'issuing.account_closed_for_terms_of_service_violation' | 'issuing.application_rejected_for_failure_to_verify' | 'issuing.credit_application_rejected' | 'issuing.credit_increase_application_rejected' | 'issuing.credit_limit_decreased' | 'issuing.credit_line_closed' | 'issuing.dispute_lost' | 'issuing.dispute_submitted' | 'issuing.dispute_won'; + /** + * Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. + */ 'sent_at': number; }; +/** + * Occurs whenever an AccountNotice is created. + */ export type AccountNoticeCreatedModel = { 'object': AccountNoticeModel; }; +/** + * Occurs whenever an AccountNotice is updated. + */ export type AccountNoticeUpdatedModel = { 'object': AccountNoticeModel; }; export type ConnectEmbeddedAccountFeaturesClaimModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; }; export type ConnectEmbeddedAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedAccountFeaturesClaimModel; }; export type ConnectEmbeddedPayoutsFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'edit_payout_schedule': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; + /** + * Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'standard_payouts': boolean; }; export type ConnectEmbeddedPayoutsConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPayoutsFeaturesModel; }; @@ -7004,103 +17859,217 @@ export type ConnectEmbeddedBaseFeaturesModel = { }; export type ConnectEmbeddedBaseConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedBaseFeaturesModel; }; export type ConnectEmbeddedDisputesListFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedDisputesListConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedDisputesListFeaturesModel; }; export type ConnectEmbeddedBaseConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedBaseFeaturesModel; }; export type ConnectEmbeddedFinancialAccountFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow sending money. + */ 'send_money': boolean; + /** + * Whether to allow transferring balance. + */ 'transfer_balance': boolean; }; export type ConnectEmbeddedFinancialAccountConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountFeaturesModel; }; export type ConnectEmbeddedFinancialAccountTransactionsFeaturesModel = { + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; }; export type ConnectEmbeddedFinancialAccountTransactionsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedFinancialAccountTransactionsFeaturesModel; }; export type ConnectEmbeddedInstantPayoutsPromotionFeaturesModel = { + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + */ 'external_account_collection': boolean; + /** + * Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + */ 'instant_payouts': boolean; }; export type ConnectEmbeddedInstantPayoutsPromotionConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedInstantPayoutsPromotionFeaturesModel; }; export type ConnectEmbeddedIssuingCardFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardFeaturesModel; }; export type ConnectEmbeddedIssuingCardsListFeaturesModel = { + /** + * Whether to allow card management features. + */ 'card_management': boolean; + /** + * Whether to allow card spend dispute management features. + */ 'card_spend_dispute_management': boolean; + /** + * Whether to allow cardholder management features. + */ 'cardholder_management': boolean; + /** + * Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + */ 'disable_stripe_user_authentication': boolean; + /** + * Whether to allow spend control management features. + */ 'spend_control_management': boolean; }; export type ConnectEmbeddedIssuingCardsListConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedIssuingCardsListFeaturesModel; }; export type ConnectEmbeddedPaymentsFeaturesModel = { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ 'capture_payments': boolean; + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentsConfigClaimModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentsFeaturesModel; }; export type ConnectEmbeddedPaymentDisputesFeaturesModel = { + /** + * Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + */ 'destination_on_behalf_of_charge_management': boolean; + /** + * Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + */ 'dispute_management': boolean; + /** + * Whether sending refunds is enabled. This is `true` by default. + */ 'refund_management': boolean; }; export type ConnectEmbeddedPaymentDisputesConfigModel = { + /** + * Whether the embedded component is enabled. + */ 'enabled': boolean; 'features': ConnectEmbeddedPaymentDisputesFeaturesModel; }; @@ -7130,185 +18099,454 @@ export type ConnectEmbeddedAccountSessionCreateComponentsModel = { 'tax_settings': ConnectEmbeddedBaseConfigClaimModel; }; +/** + * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. + * + * We recommend that you create an AccountSession each time you need to display an embedded component + * to your user. Do not save AccountSessions to your database as they expire relatively + * quickly, and cannot be used more than once. + * + * Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + */ export type AccountSessionModel = { + /** + * The ID of the account the AccountSession was created for + */ 'account': string; + /** + * The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + * + * The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + */ 'client_secret': string; 'components': ConnectEmbeddedAccountSessionCreateComponentsModel; + /** + * The timestamp at which this AccountSession will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account_session'; }; export type ApplePayDomainModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'domain_name': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; +/** + * Occurs whenever an application fee is created on a charge. + */ export type ApplicationFeeCreatedModel = { 'object': ApplicationFeeModel; }; +/** + * Occurs whenever an application fee refund is updated. + */ export type ApplicationFeeRefundUpdatedModel = { 'object': FeeRefundModel; }; +/** + * Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds). This includes partial refunds. + */ export type ApplicationFeeRefundedModel = { 'object': ApplicationFeeModel; }; export type SecretServiceResourceScopeModel = { + /** + * The secret scope type. + */ 'type': 'account' | 'user'; + /** + * The user ID, if type is set to "user" + */ 'user'?: string | undefined; }; +/** + * Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) + */ export type AppsSecretModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If true, indicates that this secret has been deleted + */ 'deleted'?: boolean | undefined; + /** + * The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A name for the secret that's unique within the scope. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apps.secret'; + /** + * The plaintext secret value to be stored. + */ 'payload'?: string | undefined; 'scope': SecretServiceResourceScopeModel; }; export type BalanceAmountBySourceTypeModel = { + /** + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). + */ 'bank_account'?: number | undefined; + /** + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). + */ 'card'?: number | undefined; + /** + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. + */ 'fpx'?: number | undefined; }; export type BalanceAmountModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceNetAvailableModel = { + /** + * Net balance amount, subtracting fees from platform-set pricing. + */ 'amount': number; + /** + * ID of the external account for this net balance (not expandable). + */ 'destination': string; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceAmountNetModel = { + /** + * Balance amount. + */ 'amount': number; + /** + * 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; + /** + * Breakdown of balance by destination. + */ 'net_available'?: BalanceNetAvailableModel[] | undefined; 'source_types'?: BalanceAmountBySourceTypeModel | undefined; }; export type BalanceDetailModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; }; export type BalanceDetailUngatedModel = { + /** + * Funds that are available for use. + */ 'available': BalanceAmountModel[]; + /** + * Funds that are pending + */ 'pending': BalanceAmountModel[]; }; +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export type BalanceModel = { + /** + * Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + */ 'available': BalanceAmountModel[]; + /** + * Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + */ 'connect_reserved'?: BalanceAmountModel[] | undefined; + /** + * Funds that you can pay out using Instant Payouts. + */ 'instant_available'?: BalanceAmountNetModel[] | undefined; 'issuing'?: BalanceDetailModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance'; + /** + * Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + */ 'pending': BalanceAmountModel[]; 'refund_and_dispute_prefunding'?: BalanceDetailUngatedModel | undefined; }; +/** + * Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. + */ export type BalanceAvailableModel = { 'object': BalanceModel; }; export type BalanceSettingsResourcePayoutScheduleModel = { + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ 'interval': 'daily' | 'manual' | 'monthly' | 'weekly'; + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ 'monthly_payout_days'?: number[] | undefined; + /** + * The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + */ 'weekly_payout_days'?: Array<'friday' | 'monday' | 'thursday' | 'tuesday' | 'wednesday'> | undefined; }; export type BalanceSettingsResourcePayoutsModel = { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](/payouts/minimum-balances-for-automatic-payouts). + */ 'minimum_balance_by_currency': { [key: string]: number; }; + /** + * Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details. + */ 'schedule': BalanceSettingsResourcePayoutScheduleModel; + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ 'statement_descriptor': string; + /** + * Whether the funds in this account can be paid out. + */ 'status': 'disabled' | 'enabled'; }; export type BalanceSettingsResourceSettlementTimingModel = { + /** + * The number of days charge funds are held before becoming available. + */ 'delay_days': number; + /** + * The number of days charge funds are held before becoming available. If present, overrides the default, or minimum available, for the account. + */ 'delay_days_override'?: number | undefined; }; export type BalanceSettingsResourcePaymentsModel = { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + */ 'debit_negative_balances': boolean; + /** + * Settings specific to the account's payouts. + */ 'payouts': BalanceSettingsResourcePayoutsModel; 'settlement_timing': BalanceSettingsResourceSettlementTimingModel; }; +/** + * Options for customizing account balances and payout settings for a Stripe platform’s connected accounts. + */ export type BalanceSettingsModel = { + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'balance_settings'; 'payments': BalanceSettingsResourcePaymentsModel; }; +/** + * Occurs whenever a balance settings status or property has changed. + */ export type BalanceSettingsUpdatedModel = { 'object': BalanceSettingsModel; }; export type BankConnectionsResourceAccountNumberDetailsModel = { + /** + * When the account number is expected to expire, if applicable. + */ 'expected_expiry_date': number; + /** + * The type of account number associated with the account. + */ 'identifier_type': 'account_number' | 'tokenized_account_number'; + /** + * Whether the account number is currently active and usable for transactions. + */ 'status': 'deactivated' | 'transactable'; + /** + * The payment networks that the account number can be used for. + */ 'supported_networks': 'ach'[]; }; export type BankConnectionsResourceAccountholderModel = { + /** + * The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + */ 'account'?: string | AccountModel | undefined; + /** + * ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + */ 'customer'?: string | CustomerModel | undefined; 'customer_account'?: string | undefined; + /** + * Type of account holder that this account belongs to. + */ 'type': 'account' | 'customer'; }; export type BankConnectionsResourceBalanceApiResourceCashBalanceModel = { + /** + * The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'available': { [key: string]: number; }; }; export type BankConnectionsResourceBalanceApiResourceCreditBalanceModel = { + /** + * The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'used': { [key: string]: number; }; }; export type BankConnectionsResourceBalanceModel = { + /** + * The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ 'as_of': number; 'cash'?: BankConnectionsResourceBalanceApiResourceCashBalanceModel | undefined; 'credit'?: BankConnectionsResourceBalanceApiResourceCreditBalanceModel | undefined; + /** + * The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'current': { [key: string]: number; }; + /** + * The `type` of the balance. An additional hash is included on the balance with a name matching this value. + */ 'type': 'cash' | 'credit'; }; export type BankConnectionsResourceBalanceRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceInferredBalancesRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceInstitutionSupportedFeatureModel = { + /** + * Whether the given feature is supported by this institution. + */ 'supported': boolean; }; @@ -7320,12 +18558,24 @@ export type BankConnectionsResourceInstitutionFeatureSupportModel = { }; export type BankConnectionsResourceLinkAccountSessionFiltersModel = { + /** + * Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + */ 'account_subcategories': Array<'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'savings'>; + /** + * List of countries from which to filter accounts. + */ 'countries': string[]; + /** + * Stripe ID of the institution with which the customer should be directed to log in. + */ 'institution'?: string | undefined; }; export type BankConnectionsResourceLinkAccountSessionLimitsModel = { + /** + * The number of accounts that can be linked in this Session. + */ 'accounts': number; }; @@ -7334,6 +18584,9 @@ export type BankConnectionsResourceLinkAccountSessionManualEntryModel = { }; export type BankConnectionsResourceLinkAccountSessionStatusDetailsResourceCancelledStatusDetailsModel = { + /** + * The reason for the Session being cancelled. + */ 'reason': 'custom_manual_entry' | 'other'; }; @@ -7342,113 +18595,292 @@ export type BankConnectionsResourceLinkAccountSessionStatusDetailsModel = { }; export type BankConnectionsResourceOwnershipRefreshModel = { + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionRefreshModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ 'last_attempted_at': number; + /** + * Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + */ 'next_refresh_available_at': number; + /** + * The status of the last refresh attempt. + */ 'status': 'failed' | 'pending' | 'succeeded'; }; export type BankConnectionsResourceTransactionResourceStatusTransitionsModel = { + /** + * Time at which this transaction posted. Measured in seconds since the Unix epoch. + */ 'posted_at': number; + /** + * Time at which this transaction was voided. Measured in seconds since the Unix epoch. + */ 'void_at': number; }; export type ThresholdsResourceUsageAlertFilterModel = { + /** + * Limit the scope of the alert to this customer ID + */ 'customer': string | CustomerModel; 'type': 'customer'; }; export type BillingMeterResourceCustomerMappingSettingsModel = { + /** + * The key in the meter event payload to use for mapping the event to a customer. + */ 'event_payload_key': string; + /** + * The method for mapping a meter event to a customer. + */ 'type': 'by_id'; }; export type BillingMeterResourceAggregationSettingsModel = { + /** + * Specifies how events are aggregated. + */ 'formula': 'count' | 'last' | 'sum'; }; export type BillingMeterResourceBillingMeterStatusTransitionsModel = { + /** + * The time the meter was deactivated, if any. Measured in seconds since Unix epoch. + */ 'deactivated_at': number; }; export type BillingMeterResourceBillingMeterValueModel = { + /** + * The key in the meter event payload to use as the value for this meter. + */ 'event_payload_key': string; }; +/** + * Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. + * + * Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) + */ export type BillingMeterModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'customer_mapping': BillingMeterResourceCustomerMappingSettingsModel; 'default_aggregation': BillingMeterResourceAggregationSettingsModel; + /** + * The meter's name. + */ 'display_name': string; + /** + * The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + */ 'event_name': string; + /** + * The time window which meter events have been pre-aggregated for, if any. + */ 'event_time_window': 'day' | 'hour'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter'; + /** + * The meter's status. + */ 'status': 'active' | 'inactive'; 'status_transitions': BillingMeterResourceBillingMeterStatusTransitionsModel; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; 'value_settings': BillingMeterResourceBillingMeterValueModel; }; +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export type ThresholdsResourceUsageThresholdConfigModel = { + /** + * The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. + */ 'filters': ThresholdsResourceUsageAlertFilterModel[]; + /** + * The value at which this alert will trigger. + */ 'gte': number; + /** + * The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + */ 'meter': string | BillingMeterModel; + /** + * Defines how the alert will behave. + */ 'recurrence': 'one_time'; }; +/** + * A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + */ export type BillingAlertModel = { + /** + * Defines the type of the alert. + */ 'alert_type': 'usage_threshold'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.alert'; + /** + * Status of the alert. This can be active, inactive or archived. + */ 'status': 'active' | 'archived' | 'inactive'; + /** + * Title of the alert. + */ 'title': string; + /** + * Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + */ 'usage_threshold': ThresholdsResourceUsageThresholdConfigModel; }; export type BillingAlertTriggered_1Model = { 'alert': BillingAlertModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * ID of customer for which the alert triggered + */ 'customer': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.alert_triggered'; + /** + * The value triggering the alert + */ 'value': string; }; +/** + * Occurs whenever your custom alert threshold is met. + */ export type BillingAlertTriggeredModel = { 'object': BillingAlertTriggered_1Model; }; export type BillingAnalyticsMeterUsageRowModel = { + /** + * A set of key-value pairs representing the dimensions of the meter usage. + */ 'dimensions': { [key: string]: string; }; + /** + * Timestamp indicating the end of the bucket. Measured in seconds since the Unix epoch. + */ 'ends_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The unique identifier for the meter. Null if no meters were provided and usage was aggregated across all meters. + */ 'meter': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.analytics.meter_usage_row'; + /** + * Timestamp indicating the start of the bucket. Measured in seconds since the Unix epoch. + */ 'starts_at': number; + /** + * The aggregated meter usage value for the specified bucket. + */ 'value': number; }; export type BillingOverviewResourcesMeterUsageRowsModel = { + /** + * The aggregated meter usage data for the specified customer and time range. + */ 'data': BillingAnalyticsMeterUsageRowModel[]; + /** + * The value is `true` if this list has another page of items to fetch. + */ 'has_more': boolean; + /** + * The total number of items across all pages. + */ 'total': number; + /** + * The URL where you can access this list. + */ 'url': string; }; +/** + * A billing meter usage event represents an aggregated view of a customer’s billing meter events within a specified timeframe. + */ export type BillingAnalyticsMeterUsageModel = { + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.analytics.meter_usage'; + /** + * The timestamp to indicate data freshness, measured in seconds since the Unix epoch. + */ 'refreshed_at': number; 'rows': BillingOverviewResourcesMeterUsageRowsModel; }; @@ -7458,145 +18890,346 @@ export type CreditBalanceModel = { 'ledger_balance': BillingCreditGrantsResourceAmountModel; }; +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export type BillingCreditBalanceSummaryModel = { + /** + * The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + */ 'balances': CreditBalanceModel[]; + /** + * The customer the balance is for. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The account the balance is for. + */ 'customer_account'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.credit_balance_summary'; }; +/** + * Occurs when a credit balance transaction is created + */ export type BillingCreditBalanceTransactionCreatedModel = { 'object': BillingCreditBalanceTransactionModel; }; +/** + * Occurs when a credit grant is created + */ export type BillingCreditGrantCreatedModel = { 'object': BillingCreditGrantModel; }; +/** + * Occurs when a credit grant is updated + */ export type BillingCreditGrantUpdatedModel = { 'object': BillingCreditGrantModel; }; +/** + * Occurs when a meter is created + */ export type BillingMeterCreatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is deactivated + */ export type BillingMeterDeactivatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is reactivated + */ export type BillingMeterReactivatedModel = { 'object': BillingMeterModel; }; +/** + * Occurs when a meter is updated + */ export type BillingMeterUpdatedModel = { 'object': BillingMeterModel; }; +/** + * Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. + */ export type BillingMeterEventModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * A unique identifier for the event. + */ 'identifier': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event'; + /** + * The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + */ 'payload': { [key: string]: string; }; + /** + * The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + */ 'timestamp': number; }; export type BillingMeterResourceBillingMeterEventAdjustmentCancelModel = { + /** + * Unique identifier for the event. + */ 'identifier': string; }; +/** + * A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. + */ export type BillingMeterEventAdjustmentModel = { + /** + * Specifies which event to cancel. + */ 'cancel': BillingMeterResourceBillingMeterEventAdjustmentCancelModel; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ 'event_name': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_adjustment'; + /** + * The meter event adjustment's status. + */ 'status': 'complete' | 'pending'; + /** + * Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + */ 'type': 'cancel'; }; +/** + * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much + * usage was accrued by a customer for that period. + * + * Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. + */ export type BillingMeterEventSummaryModel = { + /** + * Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + */ 'aggregated_value': number; + /** + * End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + */ 'end_time': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The meter associated with this event summary. + */ 'meter': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing.meter_event_summary'; + /** + * Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + */ 'start_time': number; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel = { + /** + * The subscription that generated this invoice item + */ 'subscription': string; + /** + * The subscription item that generated this invoice item + */ 'subscription_item'?: string | undefined; }; export type BillingBillResourceInvoiceItemParentsInvoiceItemParentModel = { + /** + * Details about the subscription that generated this invoice item + */ 'subscription_details': BillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParentModel; + /** + * The type of parent that generated this invoice item + */ 'type': 'subscription_details'; }; export type PortalBusinessProfileModel = { + /** + * The messaging shown to customers in the portal. + */ 'headline': string; + /** + * A link to the business’s publicly available privacy policy. + */ 'privacy_policy_url': string; + /** + * A link to the business’s publicly available terms of service. + */ 'terms_of_service_url': string; }; export type PortalCustomerUpdateModel = { + /** + * The types of customer updates that are supported. When empty, customers are not updateable. + */ 'allowed_updates': Array<'address' | 'email' | 'name' | 'phone' | 'shipping' | 'tax_id'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalInvoiceListModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; }; export type PortalPaymentMethodUpdateModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The [Payment Method Configuration](/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set, the default payment method configuration is used. + */ 'payment_method_configuration': string; }; export type PortalSubscriptionCancellationReasonModel = { + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Which cancellation reasons will be given as options to the customer. + */ 'options': Array<'customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused'>; }; export type PortalSubscriptionCancelModel = { 'cancellation_reason': PortalSubscriptionCancellationReasonModel; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * Whether to cancel subscriptions immediately or at the end of the billing period. + */ 'mode': 'at_period_end' | 'immediately'; + /** + * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; }; export type PortalSubscriptionUpdateProductAdjustableQuantityModel = { + /** + * If true, the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity that can be set for the product. + */ 'maximum': number; + /** + * The minimum quantity that can be set for the product. + */ 'minimum': number; }; export type PortalSubscriptionUpdateProductModel = { 'adjustable_quantity': PortalSubscriptionUpdateProductAdjustableQuantityModel; + /** + * The list of price IDs which, when subscribed to, a subscription can be updated. + */ 'prices': string[]; + /** + * The product ID. + */ 'product': string; }; export type PortalResourceScheduleUpdateAtPeriodEndConditionModel = { + /** + * The type of condition. + */ 'type': 'decreasing_item_amount' | 'shortening_interval'; }; export type PortalResourceScheduleUpdateAtPeriodEndModel = { + /** + * List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + */ 'conditions': PortalResourceScheduleUpdateAtPeriodEndConditionModel[]; }; export type PortalSubscriptionUpdateModel = { + /** + * The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. + */ 'default_allowed_updates': Array<'price' | 'promotion_code' | 'quantity'>; + /** + * Whether the feature is enabled. + */ 'enabled': boolean; + /** + * The list of up to 10 products that support subscription updates. + */ 'products'?: PortalSubscriptionUpdateProductModel[] | undefined; + /** + * Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; 'schedule_at_period_end': PortalResourceScheduleUpdateAtPeriodEndModel; + /** + * Determines how handle updates to trialing subscriptions. Valid values are `end_trial` and `continue_trial`. Defaults to a value of `end_trial` if you don't set it during creation. + */ 'trial_update_behavior': 'continue_trial' | 'end_trial'; }; @@ -7609,482 +19242,1232 @@ export type PortalFeaturesModel = { }; export type PortalLoginPageModel = { + /** + * If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ 'enabled': boolean; + /** + * A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. + */ 'url': string; }; +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export type BillingPortalConfigurationModel = { + /** + * Whether the configuration is active and can be used to create portal sessions. + */ 'active': boolean; + /** + * ID of the Connect Application that created the configuration. + */ 'application': string | ApplicationModel | DeletedApplicationModel; 'business_profile': PortalBusinessProfileModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + */ 'default_return_url': string; 'features': PortalFeaturesModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + */ 'is_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'login_page': PortalLoginPageModel; + /** + * 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': { [key: string]: string; }; + /** + * The name of the configuration. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.configuration'; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; +/** + * Occurs whenever a portal configuration is created. + */ export type BillingPortalConfigurationCreatedModel = { 'object': BillingPortalConfigurationModel; }; +/** + * Occurs whenever a portal configuration is updated. + */ export type BillingPortalConfigurationUpdatedModel = { 'object': BillingPortalConfigurationModel; }; export type PortalFlowsAfterCompletionHostedConfirmationModel = { + /** + * A custom message to display to the customer after the flow is completed. + */ 'custom_message': string; }; export type PortalFlowsAfterCompletionRedirectModel = { + /** + * The URL the customer will be redirected to after the flow is completed. + */ 'return_url': string; }; export type PortalFlowsFlowAfterCompletionModel = { + /** + * Configuration when `after_completion.type=hosted_confirmation`. + */ 'hosted_confirmation': PortalFlowsAfterCompletionHostedConfirmationModel; + /** + * Configuration when `after_completion.type=redirect`. + */ 'redirect': PortalFlowsAfterCompletionRedirectModel; + /** + * The specified type of behavior after the flow is completed. + */ 'type': 'hosted_confirmation' | 'portal_homepage' | 'redirect'; }; export type PortalFlowsCouponOfferModel = { + /** + * The ID of the coupon to be offered. + */ 'coupon': string; }; export type PortalFlowsRetentionModel = { + /** + * Configuration when `retention.type=coupon_offer`. + */ 'coupon_offer': PortalFlowsCouponOfferModel; + /** + * Type of retention strategy that will be used. + */ 'type': 'coupon_offer'; }; export type PortalFlowsFlowSubscriptionCancelModel = { + /** + * Specify a retention strategy to be used in the cancellation flow. + */ 'retention': PortalFlowsRetentionModel; + /** + * The ID of the subscription to be canceled. + */ 'subscription': string; }; export type PortalFlowsFlowSubscriptionUpdateModel = { + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsSubscriptionUpdateConfirmDiscountModel = { + /** + * The ID of the coupon to apply to this subscription update. + */ 'coupon': string; + /** + * The ID of a promotion code to apply to this subscription update. + */ 'promotion_code': string; }; export type PortalFlowsSubscriptionUpdateConfirmItemModel = { + /** + * The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + */ 'id': string; + /** + * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + */ 'price': string; + /** + * [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + */ 'quantity'?: number | undefined; }; export type PortalFlowsFlowSubscriptionUpdateConfirmModel = { + /** + * The coupon or promotion code to apply to this subscription update. + */ 'discounts': PortalFlowsSubscriptionUpdateConfirmDiscountModel[]; + /** + * The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + */ 'items': PortalFlowsSubscriptionUpdateConfirmItemModel[]; + /** + * The ID of the subscription to be updated. + */ 'subscription': string; }; export type PortalFlowsFlowModel = { 'after_completion': PortalFlowsFlowAfterCompletionModel; + /** + * Configuration when `flow.type=subscription_cancel`. + */ 'subscription_cancel': PortalFlowsFlowSubscriptionCancelModel; + /** + * Configuration when `flow.type=subscription_update`. + */ 'subscription_update': PortalFlowsFlowSubscriptionUpdateModel; + /** + * Configuration when `flow.type=subscription_update_confirm`. + */ 'subscription_update_confirm': PortalFlowsFlowSubscriptionUpdateConfirmModel; + /** + * Type of flow that the customer will go through. + */ 'type': 'payment_method_update' | 'subscription_cancel' | 'subscription_update' | 'subscription_update_confirm'; }; +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export type BillingPortalSessionModel = { + /** + * The configuration used by this session, describing the features available. + */ 'configuration': string | BillingPortalConfigurationModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the customer for this session. + */ 'customer': string; + /** + * The ID of the account for this session. + */ 'customer_account'?: string | undefined; + /** + * Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + */ 'flow': PortalFlowsFlowModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + */ 'locale': 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-SG' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'billing_portal.session'; + /** + * The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + */ 'on_behalf_of': string; + /** + * The URL to redirect customers to when they click on the portal's link to return to your website. + */ 'return_url': string; + /** + * The short-lived URL of the session that gives customers access to the customer portal. + */ 'url': string; }; +/** + * Occurs whenever a portal session is created. + */ export type BillingPortalSessionCreatedModel = { 'object': BillingPortalSessionModel; }; +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export type CapabilityModel = { + /** + * The account for which the capability enables functionality. + */ 'account': string | AccountModel; 'future_requirements'?: AccountCapabilityFutureRequirementsModel | undefined; + /** + * The identifier for the capability. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'capability'; + /** + * Whether the capability has been requested. + */ 'requested': boolean; + /** + * Time at which the capability was requested. Measured in seconds since the Unix epoch. + */ 'requested_at': number; 'requirements'?: AccountCapabilityRequirementsModel | undefined; + /** + * The status of the capability. + */ 'status': 'active' | 'inactive' | 'pending' | 'unrequested'; }; +/** + * Occurs whenever a capability has new requirements or a new status. + */ export type CapabilityUpdatedModel = { 'object': CapabilityModel; }; +/** + * This is an object representing the terms of an offer of financing from + * Stripe Capital to a Connected account. This resource represents + * the terms accepted by the Connected account, which may differ from those + * offered. + */ export type CapitalConnectConnectFinancingAcceptedTermsModel = { + /** + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. + */ 'advance_amount': number; + /** + * Currency that the financing offer is transacted in. For example, `usd`. + */ 'currency': string; + /** + * Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. + */ 'fee_amount': number; + /** + * Populated when the `product_type` of the `financingoffer` is `refill`. + * Represents the discount amount on remaining premium for the existing loan at payout time. + */ 'previous_financing_fee_discount_amount': number; + /** + * Per-transaction rate at which Stripe withholds funds to repay the financing. + */ 'withhold_rate': number; }; +/** + * This is an object representing the terms of an offer of financing from + * Stripe Capital to a Connected account. This resource represents + * both the terms offered to the Connected account. + */ export type CapitalConnectConnectFinancingOfferedTermsModel = { + /** + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. + */ 'advance_amount': number; + /** + * Describes the type of user the offer is being extended to. + */ 'campaign_type': 'newly_eligible_user' | 'previously_eligible_user' | 'repeat_user'; + /** + * Currency that the financing offer is transacted in. For example, `usd`. + */ 'currency': string; + /** + * Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. + */ 'fee_amount': number; + /** + * Populated when the `product_type` of the `financingoffer` is `refill`. + * Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` + * is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate + * and the remaining fee. + */ 'previous_financing_fee_discount_rate': number; + /** + * Per-transaction rate at which Stripe withholds funds to repay the financing. + */ 'withhold_rate': number; }; +/** + * This is an object representing an offer of financing from + * Stripe Capital to a Connect subaccount. + */ export type CapitalFinancingOfferModel = { 'accepted_terms'?: CapitalConnectConnectFinancingAcceptedTermsModel | undefined; + /** + * The ID of the merchant associated with this financing object. + */ 'account': string; + /** + * The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. + */ 'charged_off_at'?: number | undefined; + /** + * Time at which the offer was created. Given in seconds since unix epoch. + */ 'created': number; + /** + * Time at which the offer expires. Given in seconds since unix epoch. + */ 'expires_after': number; + /** + * The type of financing being offered. + */ 'financing_type'?: 'cash_advance' | 'flex_loan' | undefined; + /** + * A unique identifier for the financing object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * The object type: financing_offer. + */ 'object': 'capital.financing_offer'; 'offered_terms'?: CapitalConnectConnectFinancingOfferedTermsModel | undefined; + /** + * Financing product identifier. + */ 'product_type'?: 'refill' | 'standard' | undefined; + /** + * The ID of the financing offer that replaced this offer. + */ 'replacement'?: string | undefined; + /** + * The ID of the financing offer that this offer is a replacement for. + */ 'replacement_for'?: string | undefined; + /** + * The current status of the offer. + */ 'status': 'accepted' | 'canceled' | 'completed' | 'delivered' | 'expired' | 'fully_repaid' | 'paid_out' | 'rejected' | 'replaced' | 'undelivered'; + /** + * See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). + */ 'type'?: 'cash_advance' | 'fixed_term_loan' | 'flex_loan' | undefined; }; +/** + * Occurs whenever a connected account accepts a financing offer. + */ export type CapitalFinancingOfferAcceptedModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a financing offer is canceled. + */ export type CapitalFinancingOfferCanceledModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a new financing offer is created for a connected account. + */ export type CapitalFinancingOfferCreatedModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a financing offer expires. + */ export type CapitalFinancingOfferExpiredModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a financing offer is fully repaid. + */ export type CapitalFinancingOfferFullyRepaidModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a financing offer is paid out. + */ export type CapitalFinancingOfferPaidOutModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a financing offer is rejected. + */ export type CapitalFinancingOfferRejectedModel = { 'object': CapitalFinancingOfferModel; }; +/** + * Occurs whenever a replacement for a financing offer has been created. More details can be [found here](https://docs.stripe.com/capital/replacements). + */ export type CapitalFinancingOfferReplacementCreatedModel = { 'object': CapitalFinancingOfferModel; }; +/** + * The current repayment interval for the Connected account. + */ export type CapitalConnectFinancingSummaryCurrentRepaymentWindowModel = { + /** + * The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. + * Given in seconds since unix epoch. + */ 'due_at': number; + /** + * The amount that has already been paid in the current repayment interval, in minor units. For example, 100 USD is represented as 10000. + */ 'paid_amount': number; + /** + * The amount that is yet to be paid in the current repayment interval, in minor units. For example, 100 USD is represented as 10000. + */ 'remaining_amount': number; }; export type CapitalConnectFinancingSummaryDetailsModel = { + /** + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. + */ 'advance_amount': number; + /** + * The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. + */ 'advance_paid_out_at': number; + /** + * Currency that the financing offer is transacted in. For example, `usd`. + */ 'currency': string; + /** + * The chronologically current repayment interval for the financing offer. + */ 'current_repayment_interval': CapitalConnectFinancingSummaryCurrentRepaymentWindowModel; + /** + * Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. + */ 'fee_amount': number; + /** + * The amount the Connected account has paid toward the financing debt so far, in minor units. For example, 1,000 USD is represented as 100000. + */ 'paid_amount': number; + /** + * The balance remaining to be paid on the financing, in minor units. For example, 1,000 USD is represented as 100000. + */ 'remaining_amount': number; + /** + * The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. + */ 'repayments_begin_at': number; + /** + * Per-transaction rate at which Stripe withholds funds to repay the financing. + */ 'withhold_rate': number; }; +/** + * A financing object describes an account's current financing state. Used by Connect + * platforms to read the state of Capital offered to their connected accounts. + */ export type CapitalFinancingSummaryModel = { + /** + * Additional information about the financing summary. Describes currency, advance amount, + * fee amount, withhold rate, remaining amount, paid amount, current repayment interval, + * repayment start date, and advance payout date. + */ 'details': CapitalConnectFinancingSummaryDetailsModel; + /** + * The Financing Offer ID this Financing Summary corresponds to + */ 'financing_offer': string; + /** + * The object type: financing_summary + */ 'object': 'capital.financing_summary'; + /** + * Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. + */ 'status': 'accepted' | 'delivered' | 'none'; }; +/** + * This is an object representing a linked transaction on a Capital Financing Transaction. + */ export type CapitalConnectFinancingTransactionDetailsTransactionModel = { + /** + * The linked payment ID. + */ 'charge'?: string | undefined; + /** + * The linked Treasury Financing Transaction ID. + */ 'treasury_transaction'?: string | undefined; }; +/** + * This is an object representing a transaction on a Capital financing offer. + */ export type CapitalConnectFinancingTransactionDetailsModel = { + /** + * The advance amount being repaid, paid out, or reversed in minor units. + */ 'advance_amount': number; + /** + * The currency of the financing transaction. + */ 'currency': string; + /** + * The fee amount being repaid, paid out, or reversed in minor units. + */ 'fee_amount': number; + /** + * The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. + */ 'linked_payment'?: string | undefined; + /** + * The reason for the financing transaction (if applicable). + */ 'reason'?: 'automatic_withholding' | 'automatic_withholding_refund' | 'collection' | 'collection_failure' | 'financing_cancellation' | 'refill' | 'requested_by_user' | 'user_initiated' | undefined; + /** + * The reversed transaction. This field only applies to financing + * transactions of type `reversal`. + */ 'reversed_transaction'?: string | undefined; + /** + * The advance and fee amount being repaid, paid out, or reversed in minor units. + */ 'total_amount': number; 'transaction'?: CapitalConnectFinancingTransactionDetailsTransactionModel | undefined; }; +/** + * This is an object representing the details of a transaction on a Capital financing object. + */ export type CapitalFinancingTransactionModel = { + /** + * The ID of the merchant associated with this financing transaction. + */ 'account': string; + /** + * Time at which the financing transaction was created. Given in seconds since unix epoch. + */ 'created_at': number; 'details': CapitalConnectFinancingTransactionDetailsModel; + /** + * The Capital financing offer for this financing transaction. + */ 'financing_offer': string; + /** + * A unique identifier for the financing transaction object. + */ 'id': string; + /** + * The Capital transaction object that predates the Financing Transactions API and + * corresponds with the balance transaction that was created as a result of this + * financing transaction. + */ 'legacy_balance_transaction_source'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The object type: financing_transaction + */ 'object': 'capital.financing_transaction'; + /** + * The type of the financing transaction. + */ 'type': 'payment' | 'payout' | 'reversal'; + /** + * A human-friendly description of the financing transaction. + */ 'user_facing_description': string; }; +/** + * Occurs whenever a financing transaction is created. + */ export type CapitalFinancingTransactionCreatedModel = { 'object': CapitalFinancingTransactionModel; }; +/** + * Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance. + */ export type CashBalanceFundsAvailableModel = { 'object': CashBalanceModel; }; +/** + * Occurs whenever a previously uncaptured charge is captured. + */ export type ChargeCapturedModel = { 'object': ChargeModel; }; +/** + * Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`. + */ export type ChargeDisputeClosedModel = { 'object': DisputeModel; }; +/** + * Occurs whenever a customer disputes a charge with their bank. + */ export type ChargeDisputeCreatedModel = { 'object': DisputeModel; }; +/** + * Occurs when funds are reinstated to your account after a dispute is closed. This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments). + */ export type ChargeDisputeFundsReinstatedModel = { 'object': DisputeModel; }; +/** + * Occurs when funds are removed from your account due to a dispute. + */ export type ChargeDisputeFundsWithdrawnModel = { 'object': DisputeModel; }; +/** + * Occurs when the dispute is updated (usually with evidence). + */ export type ChargeDisputeUpdatedModel = { 'object': DisputeModel; }; +/** + * Occurs whenever an uncaptured charge expires. + */ export type ChargeExpiredModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a failed charge attempt occurs. + */ export type ChargeFailedModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a pending charge is created. + */ export type ChargePendingModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead. + */ export type ChargeRefundUpdatedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund. + */ export type ChargeRefundedModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a charge is successful. + */ export type ChargeSucceededModel = { 'object': ChargeModel; }; +/** + * Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture. + */ export type ChargeUpdatedModel = { 'object': ChargeModel; }; export type PaymentPagesCheckoutSessionAdaptivePricingModel = { + /** + * If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionAfterExpirationRecoveryModel = { + /** + * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + */ 'allow_promotion_codes': boolean; + /** + * If `true`, a recovery url will be generated to recover this Checkout Session if it + * expires before a transaction is completed. It will be attached to the + * Checkout Session object upon expiration. + */ 'enabled': boolean; + /** + * The timestamp at which the recovery URL will expire. + */ 'expires_at': number; + /** + * URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + */ 'url': string; }; export type PaymentPagesCheckoutSessionAfterExpirationModel = { + /** + * When set, configuration used to recover the Checkout Session on expiry. + */ 'recovery': PaymentPagesCheckoutSessionAfterExpirationRecoveryModel; }; export type PaymentPagesCheckoutSessionAutomaticTaxModel = { + /** + * Indicates whether automatic tax is enabled for the session + */ '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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this session. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type PaymentPagesCheckoutSessionBrandingSettingsIconModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the icon. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsLogoModel = { + /** + * The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. + */ 'file'?: string | undefined; + /** + * The type of image for the logo. Must be one of `file` or `url`. + */ 'type': 'file' | 'url'; + /** + * The URL of the image. Present when `type` is `url`. + */ 'url'?: string | undefined; }; export type PaymentPagesCheckoutSessionBrandingSettingsModel = { + /** + * A hex color value starting with `#` representing the background color for the Checkout Session. + */ 'background_color': string; + /** + * The border style for the Checkout Session. Must be one of `rounded`, `rectangular`, or `pill`. + */ 'border_style': 'pill' | 'rectangular' | 'rounded'; + /** + * A hex color value starting with `#` representing the button color for the Checkout Session. + */ 'button_color': string; + /** + * The display name shown on the Checkout Session. + */ 'display_name': string; + /** + * The font family for the Checkout Session. Must be one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). + */ 'font_family': string; + /** + * The icon for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'icon': PaymentPagesCheckoutSessionBrandingSettingsIconModel; + /** + * The logo for the Checkout Session. You cannot set both `logo` and `icon`. + */ 'logo': PaymentPagesCheckoutSessionBrandingSettingsLogoModel; }; export type PaymentPagesCheckoutSessionCheckoutAddressDetailsModel = { 'address': AddressModel; + /** + * Customer name. + */ 'name': string; }; export type PaymentPagesCheckoutSessionTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCollectedInformationModel = { + /** + * Customer’s business name for this Checkout Session + */ 'business_name': string; + /** + * Customer’s email for this Checkout Session + */ 'email'?: string | undefined; + /** + * Customer’s individual name for this Checkout Session + */ 'individual_name': string; + /** + * Customer’s phone number for this Checkout Session + */ 'phone'?: string | undefined; + /** + * Shipping information for this Checkout Session. + */ 'shipping_details': PaymentPagesCheckoutSessionCheckoutAddressDetailsModel; + /** + * Customer’s tax ids for this Checkout Session. + */ 'tax_ids'?: PaymentPagesCheckoutSessionTaxIdModel[] | undefined; }; export type PaymentPagesCheckoutSessionConsentModel = { + /** + * If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + */ 'promotions': 'opt_in' | 'opt_out'; + /** + * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + */ 'terms_of_service': 'accepted'; }; export type PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentPagesCheckoutSessionConsentCollectionModel = { + /** + * If set to `hidden`, it will hide legal text related to the reuse of a payment method. + */ 'payment_method_reuse_agreement': PaymentPagesCheckoutSessionPaymentMethodReuseAgreementModel; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + * Session will determine whether to display an option to opt into promotional communication + * from the merchant depending on the customer's locale. Only available to US merchants. + */ 'promotions': 'auto' | 'none'; + /** + * If set to `required`, it requires customers to accept the terms of service before being able to pay. + */ 'terms_of_service': 'none' | 'required'; }; export type PaymentPagesCheckoutSessionCurrencyConversionModel = { + /** + * Total of all items in source currency before discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total of all items in source currency after discounts and taxes are applied. + */ 'amount_total': number; + /** + * Exchange rate used to convert source currency amounts to customer currency amounts + */ 'fx_rate': string; + /** + * Creation currency of the CheckoutSession before localization + */ 'source_currency': string; }; export type PaymentPagesCheckoutSessionCustomFieldsOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value': string; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentPagesCheckoutSessionCustomFieldsOptionModel[]; + /** + * The option selected by the customer. This will be the `value` for the option. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom': string; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentPagesCheckoutSessionCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; + /** + * The value entered by the customer, containing only digits. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; + /** + * The value entered by the customer. + */ 'value': string; }; export type PaymentPagesCheckoutSessionCustomFieldsModel = { 'dropdown'?: PaymentPagesCheckoutSessionCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentPagesCheckoutSessionCustomFieldsLabelModel; 'numeric'?: PaymentPagesCheckoutSessionCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentPagesCheckoutSessionCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentPagesCheckoutSessionCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentPagesCheckoutSessionCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit': PaymentPagesCheckoutSessionCustomTextPositionModel; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance': PaymentPagesCheckoutSessionCustomTextPositionModel; }; export type PaymentPagesCheckoutSessionCustomerDetailsModel = { + /** + * The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'address': AddressModel; + /** + * The customer's business name after a completed Checkout Session. + */ 'business_name': string; + /** + * The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + */ 'email': string; + /** + * The customer's individual name after a completed Checkout Session. + */ 'individual_name': string; + /** + * The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ 'name': string; + /** + * The customer's phone number after a completed Checkout Session. + */ 'phone': string; + /** + * The customer’s tax exempt status after a completed Checkout Session. + */ 'tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The customer’s tax IDs after a completed Checkout Session. + */ 'tax_ids': PaymentPagesCheckoutSessionTaxIdModel[]; }; export type PaymentPagesCheckoutSessionDiscountModel = { + /** + * Coupon attached to the Checkout Session. + */ 'coupon': string | CouponModel; + /** + * Promotion code attached to the Checkout Session. + */ 'promotion_code': string | PromotionCodeModel; }; export type InvoiceSettingCheckoutRenderingOptionsModel = { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ 'amount_tax_display': string; + /** + * ID of the invoice rendering template to be used for the generated invoice. + */ 'template': string; }; export type PaymentPagesCheckoutSessionInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids': Array; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Footer displayed on the invoice. + */ 'footer': string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer': ConnectAccountReferenceModel; + /** + * 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': { [key: string]: string; }; + /** + * Options for invoice PDF rendering. + */ 'rendering_options': InvoiceSettingCheckoutRenderingOptionsModel; }; export type PaymentPagesCheckoutSessionInvoiceCreationModel = { + /** + * Indicates whether invoice creation is enabled for the Checkout Session. + */ 'enabled': boolean; 'invoice_data': PaymentPagesCheckoutSessionInvoiceSettingsModel; }; @@ -8096,6 +20479,9 @@ export type LineItemsAdjustableQuantityModel = { }; export type LineItemsDiscountAmountModel = { + /** + * The amount discounted. + */ 'amount': number; 'discount': DiscountModel; }; @@ -8106,35 +20492,97 @@ export type LineItemsDisplayModel = { 'name': string; }; +/** + * A line item. + */ export type ItemModel = { 'adjustable_quantity'?: LineItemsAdjustableQuantityModel | undefined; + /** + * Total discount amount applied. If no discounts were applied, defaults to 0. + */ 'amount_discount': number; + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total after discounts and taxes. + */ 'amount_total': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + */ 'description': string; + /** + * The discounts applied to the line item. + */ 'discounts'?: LineItemsDiscountAmountModel[] | undefined; 'display'?: LineItemsDisplayModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'item'; + /** + * The price used to generate the line item. + */ 'price': PriceModel; + /** + * The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ 'product'?: string | ProductModel | DeletedProductModel | undefined; + /** + * The quantity of products being purchased. + */ 'quantity': number; + /** + * The tax calculation identifiers of the line item. + */ 'tax_calculation_reference'?: TaxProductIntegrationResourceTaxCalculationReferenceModel | undefined; + /** + * The taxes applied to the line item. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentPagesCheckoutSessionIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the session + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; }; @@ -8144,8 +20592,17 @@ export type PaymentPagesCheckoutSessionNameCollectionModel = { }; export type PaymentPagesCheckoutSessionOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. + */ 'maximum': number; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum': number; }; @@ -8156,106 +20613,234 @@ export type PaymentPagesCheckoutSessionOptionalItemModel = { }; export type PaymentLinksResourceCompletionBehaviorConfirmationPageModel = { + /** + * The custom message that is displayed to the customer after the purchase is complete. + */ 'custom_message': string; }; export type PaymentLinksResourceCompletionBehaviorRedirectModel = { + /** + * The URL the customer will be redirected to after the purchase is complete. + */ 'url': string; }; export type PaymentLinksResourceAfterCompletionModel = { 'hosted_confirmation'?: PaymentLinksResourceCompletionBehaviorConfirmationPageModel | undefined; 'redirect'?: PaymentLinksResourceCompletionBehaviorRedirectModel | undefined; + /** + * The specified behavior after the purchase is complete. + */ 'type': 'hosted_confirmation' | 'redirect'; }; export type PaymentLinksResourceAutomaticTaxModel = { + /** + * 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': ConnectAccountReferenceModel; }; export type PaymentLinksResourcePaymentMethodReuseAgreementModel = { + /** + * Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + * + * When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + */ 'position': 'auto' | 'hidden'; }; export type PaymentLinksResourceConsentCollectionModel = { + /** + * Settings related to the payment method reuse text shown in the Checkout UI. + */ 'payment_method_reuse_agreement': PaymentLinksResourcePaymentMethodReuseAgreementModel; + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. + */ 'promotions': 'auto' | 'none'; + /** + * If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + */ 'terms_of_service': 'none' | 'required'; }; export type PaymentLinksResourceCustomFieldsDropdownOptionModel = { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ 'label': string; + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ 'value': string; }; export type PaymentLinksResourceCustomFieldsDropdownModel = { + /** + * The value that will pre-fill on the payment page. + */ 'default_value': string; + /** + * The options available for the customer to select. Up to 200 options allowed. + */ 'options': PaymentLinksResourceCustomFieldsDropdownOptionModel[]; }; export type PaymentLinksResourceCustomFieldsLabelModel = { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ 'custom': string; + /** + * The type of the label. + */ 'type': 'custom'; }; export type PaymentLinksResourceCustomFieldsNumericModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; }; export type PaymentLinksResourceCustomFieldsTextModel = { + /** + * The value that will pre-fill the field on the payment page. + */ 'default_value': string; + /** + * The maximum character length constraint for the customer's input. + */ 'maximum_length': number; + /** + * The minimum character length requirement for the customer's input. + */ 'minimum_length': number; }; export type PaymentLinksResourceCustomFieldsModel = { 'dropdown'?: PaymentLinksResourceCustomFieldsDropdownModel | undefined; + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ 'key': string; 'label': PaymentLinksResourceCustomFieldsLabelModel; 'numeric'?: PaymentLinksResourceCustomFieldsNumericModel | undefined; + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ 'optional': boolean; 'text'?: PaymentLinksResourceCustomFieldsTextModel | undefined; + /** + * The type of the field. + */ 'type': 'dropdown' | 'numeric' | 'text'; }; export type PaymentLinksResourceCustomTextPositionModel = { + /** + * Text may be up to 1200 characters in length. + */ 'message': string; }; export type PaymentLinksResourceCustomTextModel = { + /** + * Custom text that should be displayed after the payment confirmation button. + */ 'after_submit': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed alongside shipping address collection. + */ 'shipping_address': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ 'submit': PaymentLinksResourceCustomTextPositionModel; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ 'terms_of_service_acceptance': PaymentLinksResourceCustomTextPositionModel; }; export type PaymentLinksResourceInvoiceSettingsModel = { + /** + * The account tax IDs associated with the invoice. + */ 'account_tax_ids': Array; + /** + * A list of up to 4 custom fields to be displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Footer to be displayed on the invoice. + */ 'footer': string; + /** + * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + */ 'issuer': ConnectAccountReferenceModel; + /** + * 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': { [key: string]: string; }; + /** + * Options for invoice PDF rendering. + */ 'rendering_options': InvoiceSettingCheckoutRenderingOptionsModel; }; export type PaymentLinksResourceInvoiceCreationModel = { + /** + * Enable creating an invoice on successful payment. + */ 'enabled': boolean; + /** + * Configuration for the invoice. Default invoice values will be used if unspecified. + */ 'invoice_data': PaymentLinksResourceInvoiceSettingsModel; }; export type PaymentLinksResourceBusinessNameModel = { + /** + * Indicates whether business name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; export type PaymentLinksResourceIndividualNameModel = { + /** + * Indicates whether individual name collection is enabled for the payment link. + */ 'enabled': boolean; + /** + * Whether the customer is required to complete the field before checking out. Defaults to `false`. + */ 'optional': boolean; }; @@ -8265,8 +20850,17 @@ export type PaymentLinksResourceNameCollectionModel = { }; export type PaymentLinksResourceOptionalItemAdjustableQuantityModel = { + /** + * Set to true if the quantity can be adjusted to any non-negative integer. + */ 'enabled': boolean; + /** + * The maximum quantity of this item the customer can purchase. By default this value is 99. + */ 'maximum': number; + /** + * The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + */ 'minimum': number; }; @@ -8277,23 +20871,53 @@ export type PaymentLinksResourceOptionalItemModel = { }; export type PaymentLinksResourcePaymentIntentDataModel = { + /** + * Indicates when the funds will be captured from the customer's account. + */ 'capture_method': 'automatic' | 'automatic_async' | 'manual'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + */ 'metadata': { [key: string]: string; }; + /** + * Indicates that you intend to make future payments with the payment method collected during checkout. + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. + */ 'statement_descriptor': string; + /** + * For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. + */ 'statement_descriptor_suffix': string; + /** + * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + */ 'transfer_group': string; }; export type PaymentLinksResourcePhoneNumberCollectionModel = { + /** + * If `true`, a phone number will be collected during checkout. + */ 'enabled': boolean; }; export type PaymentLinksResourceCompletedSessionsModel = { + /** + * The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. + */ 'count': number; + /** + * The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + */ 'limit': number; }; @@ -8302,11 +20926,20 @@ export type PaymentLinksResourceRestrictionsModel = { }; export type PaymentLinksResourceShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentLinksResourceShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The ID of the Shipping Rate to use for this shipping option. + */ 'shipping_rate': string | ShippingRateModel; }; @@ -8315,322 +20948,961 @@ export type PaymentLinksResourceSubscriptionDataInvoiceSettingsModel = { }; export type PaymentLinksResourceSubscriptionDataModel = { + /** + * 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; 'invoice_settings': PaymentLinksResourceSubscriptionDataInvoiceSettingsModel; + /** + * 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. + */ 'metadata': { [key: string]: string; }; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days': number; + /** + * Settings related to subscription trials. + */ 'trial_settings': SubscriptionsTrialsResourceTrialSettingsModel; }; export type PaymentLinksResourceTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session. + */ 'enabled': boolean; 'required': 'if_supported' | 'never'; }; export type PaymentLinksResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ 'amount': number; + /** + * The connected account receiving the transfer. + */ 'destination': string | AccountModel; }; +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export type PaymentLinkModel = { + /** + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + */ 'active': boolean; 'after_completion': PaymentLinksResourceAfterCompletionModel; + /** + * Whether user redeemable promotion codes are enabled. + */ 'allow_promotion_codes': boolean; + /** + * The ID of the Connect application that created the Payment Link. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + */ 'application_fee_amount': number; + /** + * This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + */ 'application_fee_percent': number; 'automatic_tax': PaymentLinksResourceAutomaticTaxModel; + /** + * Configuration for collecting the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection': 'auto' | 'required'; + /** + * When set, provides configuration to gather active consent from customers. + */ 'consent_collection': PaymentLinksResourceConsentCollectionModel; + /** + * 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; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentLinksResourceCustomFieldsModel[]; 'custom_text': PaymentLinksResourceCustomTextModel; + /** + * Configuration for Customer creation during checkout. + */ 'customer_creation': 'always' | 'if_required'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The custom message to be displayed to a customer when a payment link is no longer active. + */ 'inactive_message': string; + /** + * Configuration for creating invoice for payment mode payment links. + */ 'invoice_creation': PaymentLinksResourceInvoiceCreationModel; + /** + * The line items representing what is being sold. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; 'name_collection'?: PaymentLinksResourceNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_link'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentLinksResourceOptionalItemModel[] | undefined; + /** + * Indicates the parameters to be passed to PaymentIntent creation during checkout. + */ 'payment_intent_data': PaymentLinksResourcePaymentIntentDataModel; + /** + * Configuration for collecting a payment method during checkout. Defaults to `always`. + */ 'payment_method_collection': 'always' | 'if_required'; + /** + * The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + */ 'payment_method_types': Array<'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'eps' | 'fpx' | 'giropay' | 'gopay' | 'grabpay' | 'ideal' | 'klarna' | 'konbini' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'oxxo' | 'p24' | 'pay_by_bank' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rechnung' | 'satispay' | 'sepa_debit' | 'shopeepay' | 'sofort' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'>; 'phone_number_collection': PaymentLinksResourcePhoneNumberCollectionModel; + /** + * Settings that restrict the usage of a payment link. + */ 'restrictions': PaymentLinksResourceRestrictionsModel; + /** + * Configuration for collecting the customer's shipping address. + */ 'shipping_address_collection': PaymentLinksResourceShippingAddressCollectionModel; + /** + * The shipping rate options applied to the session. + */ 'shipping_options': PaymentLinksResourceShippingOptionModel[]; + /** + * Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + */ 'submit_type': 'auto' | 'book' | 'donate' | 'pay' | 'subscribe'; + /** + * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ 'subscription_data': PaymentLinksResourceSubscriptionDataModel; 'tax_id_collection': PaymentLinksResourceTaxIdCollectionModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ 'transfer_data': PaymentLinksResourceTransferDataModel; + /** + * The public URL that can be shared with customers. + */ 'url': string; }; export type CheckoutAcssDebitMandateOptionsModel = { + /** + * A URL for custom mandate text + */ 'custom_mandate_url'?: string | undefined; + /** + * List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + */ 'default_for'?: Array<'invoice' | 'subscription'> | undefined; + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ 'interval_description': string; + /** + * Payment schedule for the mandate. + */ 'payment_schedule': 'combined' | 'interval' | 'sporadic'; + /** + * Transaction type of the mandate. + */ 'transaction_type': 'business' | 'personal'; }; export type CheckoutAcssDebitPaymentMethodOptionsModel = { + /** + * Currency supported by the bank account. Returned when the Session is in `setup` mode. + */ 'currency'?: 'cad' | 'usd' | undefined; 'mandate_options'?: CheckoutAcssDebitMandateOptionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; export type CheckoutAffirmPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAfterpayClearpayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlipayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutAlmaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutAmazonPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutAuBecsDebitPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutBacsDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsBacsDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutBancontactPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutBilliePaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutBoletoPaymentMethodOptionsModel = { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutCardInstallmentsOptionsModel = { + /** + * Indicates if installments are enabled + */ 'enabled'?: boolean | undefined; }; export type PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel = { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + */ 'brands_blocked'?: Array<'american_express' | 'discover_global_network' | 'mastercard' | 'visa'> | undefined; }; export type CheckoutCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; 'installments'?: CheckoutCardInstallmentsOptionsModel | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + */ 'request_decremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + */ 'request_extended_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + */ 'request_incremental_authorization'?: 'if_available' | 'never' | undefined; + /** + * Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + */ 'request_multicapture'?: 'if_available' | 'never' | undefined; + /** + * Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + */ 'request_overcapture'?: 'if_available' | 'never' | undefined; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ 'request_three_d_secure': 'any' | 'automatic' | 'challenge'; 'restrictions'?: PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ 'statement_descriptor_suffix_kana'?: string | undefined; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ 'statement_descriptor_suffix_kanji'?: string | undefined; }; export type CheckoutCashappPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel = { 'eu_bank_transfer'?: PaymentMethodOptionsCustomerBalanceEuBankAccountModel | undefined; + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ 'requested_address_types'?: Array<'aba' | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'swift' | 'zengin'> | undefined; + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ 'type': 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' | 'us_bank_transfer'; }; export type CheckoutCustomerBalancePaymentMethodOptionsModel = { 'bank_transfer'?: CheckoutCustomerBalanceBankTransferPaymentMethodOptionsModel | undefined; + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ 'funding_type': 'bank_transfer'; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutEpsPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutFpxPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGiropayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutGrabPayPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutIdealPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKakaoPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutKlarnaPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; }; export type CheckoutKonbiniPaymentMethodOptionsModel = { + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutKrCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutLinkPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutMobilepayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutMultibancoPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutNaverPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutOxxoPaymentMethodOptionsModel = { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ 'expires_after_days': number; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutP24PaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaycoPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaynowPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutPaypalPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Preferred locale of the PayPal checkout page that the customer is redirected to. + */ 'preferred_locale': string; + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; + /** + * 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'?: string[] | undefined; }; export type MandateOptionsPaytoModel = { + /** + * Amount that will be collected. It is required when `amount_type` is `fixed`. + */ 'amount': number; + /** + * The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. + */ 'amount_type': 'fixed' | 'maximum'; + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + */ 'end_date': string; + /** + * The periodicity at which payments will be collected. Defaults to `adhoc`. + */ 'payment_schedule': 'adhoc' | 'annual' | 'daily' | 'fortnightly' | 'monthly' | 'quarterly' | 'semi_annual' | 'weekly'; + /** + * The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + */ 'payments_per_period': number; + /** + * The purpose for which payments are made. Has a default value based on your merchant category code. + */ 'purpose': 'dependant_support' | 'government' | 'loan' | 'mortgage' | 'other' | 'pension' | 'personal' | 'retail' | 'salary' | 'tax' | 'utility'; + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + */ 'start_date': string; }; export type CheckoutPaytoPaymentMethodOptionsModel = { 'mandate_options'?: MandateOptionsPaytoModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutPixPaymentMethodOptionsModel = { + /** + * Determines if the amount includes the IOF tax. + */ 'amount_includes_iof'?: 'always' | 'never' | undefined; + /** + * The number of seconds after which Pix payment will expire. + */ 'expires_after_seconds': number; 'mandate_options'?: PaymentMethodOptionsMandateOptionsPixModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutRevolutPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | undefined; }; export type CheckoutSamsungPayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutSatispayPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | undefined; }; export type CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel = { + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ 'reference_prefix'?: string | undefined; }; export type CheckoutSepaDebitPaymentMethodOptionsModel = { 'mandate_options'?: CheckoutPaymentMethodOptionsMandateOptionsSepaDebitModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; }; export type CheckoutSofortPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutSwishPaymentMethodOptionsModel = { + /** + * The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + */ 'reference': string; }; export type CheckoutTwintPaymentMethodOptionsModel = { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | undefined; }; export type CheckoutUsBankAccountPaymentMethodOptionsModel = { 'financial_connections'?: LinkedAccountOptionsCommonModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ 'target_date'?: string | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | undefined; }; @@ -8680,61 +21952,153 @@ export type CheckoutSessionPaymentMethodOptionsModel = { }; export type PaymentPagesCheckoutSessionUpdatePermissionModel = { + /** + * Determines which entity is allowed to update the line items. + * + * Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + * + * When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + */ 'line_items'?: 'client_only' | 'server_only' | undefined; + /** + * Determines which entity is allowed to update the shipping details. + * + * Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + * + * When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + */ 'shipping_details': 'client_only' | 'server_only'; }; export type PaymentPagesCheckoutSessionPermissionsModel = { + /** + * Permissions for updating the Checkout Session. + */ 'update'?: PaymentPagesCheckoutSessionUpdatePermissionModel | undefined; + /** + * Determines which entity is allowed to update the line items. + * + * Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + * + * When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + */ 'update_line_items'?: 'client_only' | 'server_only' | undefined; + /** + * Determines which entity is allowed to update the shipping details. + * + * Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + * + * When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + */ 'update_shipping_details': 'client_only' | 'server_only'; }; export type PaymentPagesCheckoutSessionPhoneNumberCollectionModel = { + /** + * Indicates whether phone number collection is enabled for the session + */ 'enabled': boolean; }; export type PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel = { + /** + * Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + */ 'allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + */ 'payment_method_save': 'disabled' | 'enabled'; }; export type PaymentPagesCheckoutSessionShippingAddressCollectionModel = { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`. + */ 'allowed_countries': Array<'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'>; }; export type PaymentPagesCheckoutSessionShippingCostModel = { + /** + * Total shipping cost before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this order. + */ 'shipping_rate': string | ShippingRateModel; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type PaymentPagesCheckoutSessionShippingOptionModel = { + /** + * A non-negative integer in cents representing how much to charge. + */ 'shipping_amount': number; + /** + * The shipping rate. + */ 'shipping_rate': string | ShippingRateModel; }; export type PaymentPagesCheckoutSessionTaxIdCollectionModel = { + /** + * Indicates whether tax ID collection is enabled for the session + */ 'enabled': boolean; + /** + * Indicates whether a tax ID is required on the payment page + */ 'required': 'if_supported' | 'never'; }; export type PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type PaymentPagesCheckoutSessionTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownModel | undefined; }; export type CheckoutLinkWalletOptionsModel = { + /** + * Describes whether Checkout should display Link. Defaults to `auto`. + */ 'display'?: 'auto' | 'never' | undefined; }; @@ -8742,235 +22106,700 @@ export type CheckoutSessionWalletOptionsModel = { 'link'?: CheckoutLinkWalletOptionsModel | undefined; }; +/** + * A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + * new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and redirect to its URL + * to begin Checkout. + * + * Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) + */ export type CheckoutSessionModel = { + /** + * Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + */ 'adaptive_pricing': PaymentPagesCheckoutSessionAdaptivePricingModel; + /** + * When set, provides configuration for actions to take if this Checkout Session expires. + */ 'after_expiration': PaymentPagesCheckoutSessionAfterExpirationModel; + /** + * Enables user redeemable promotion codes. + */ 'allow_promotion_codes': boolean; + /** + * Total of all items before discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total of all items after discounts and taxes are applied. + */ 'amount_total': number; 'automatic_tax': PaymentPagesCheckoutSessionAutomaticTaxModel; + /** + * Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. + */ 'billing_address_collection': 'auto' | 'required'; 'branding_settings'?: PaymentPagesCheckoutSessionBrandingSettingsModel | undefined; + /** + * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + */ 'cancel_url': string; + /** + * A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * Session with your internal systems. + */ 'client_reference_id': string; + /** + * The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout. + * For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + */ 'client_secret': string; + /** + * Information about the customer collected within the Checkout Session. + */ 'collected_information': PaymentPagesCheckoutSessionCollectedInformationModel; + /** + * Results of `consent_collection` for this session. + */ 'consent': PaymentPagesCheckoutSessionConsentModel; + /** + * When set, provides configuration for the Checkout Session to gather active consent from customers. + */ 'consent_collection': PaymentPagesCheckoutSessionConsentCollectionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31. + */ 'currency_conversion': PaymentPagesCheckoutSessionCurrencyConversionModel; + /** + * Collect additional information from your customer using custom fields. Up to 3 fields are supported. + */ 'custom_fields': PaymentPagesCheckoutSessionCustomFieldsModel[]; 'custom_text': PaymentPagesCheckoutSessionCustomTextModel; + /** + * The ID of the customer for this Session. + * For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + * will create a new customer object based on information provided + * during the payment flow unless an existing customer was provided when + * the Session was created. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The ID of the account for this Session. + */ 'customer_account'?: string | undefined; + /** + * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + */ 'customer_creation': 'always' | 'if_required'; + /** + * The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + */ 'customer_details': PaymentPagesCheckoutSessionCustomerDetailsModel; + /** + * If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once the payment flow is + * complete, use the `customer` attribute. + */ 'customer_email': string; + /** + * List of coupons and promotion codes attached to the Checkout Session. + */ 'discounts': PaymentPagesCheckoutSessionDiscountModel[]; + /** + * A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + */ 'excluded_payment_method_types'?: string[] | undefined; + /** + * The timestamp at which the Checkout Session will expire. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice created by the Checkout Session, if it exists. + */ 'invoice': string | InvoiceModel; + /** + * Details on the state of invoice creation for the Checkout Session. + */ 'invoice_creation': PaymentPagesCheckoutSessionInvoiceCreationModel; + /** + * The line items purchased by the customer. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + */ 'locale': 'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-GB' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW'; + /** + * 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': { [key: string]: string; }; + /** + * The mode of the Checkout Session. + */ 'mode': 'payment' | 'setup' | 'subscription'; 'name_collection'?: PaymentPagesCheckoutSessionNameCollectionModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'checkout.session'; + /** + * The optional items presented to the customer at checkout. + */ 'optional_items'?: PaymentPagesCheckoutSessionOptionalItemModel[] | undefined; + /** + * Where the user is coming from. This informs the optimizations that are applied to the session. + */ 'origin_context': 'mobile_app' | 'web'; + /** + * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'payment_intent': string | PaymentIntentModel; + /** + * The ID of the Payment Link that created this Session. + */ 'payment_link': string | PaymentLinkModel; + /** + * Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + */ 'payment_method_collection': 'always' | 'if_required'; + /** + * Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + */ 'payment_method_configuration_details': PaymentMethodConfigBizPaymentMethodConfigurationDetailsModel; + /** + * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + */ 'payment_method_options': CheckoutSessionPaymentMethodOptionsModel; + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ 'payment_method_types': string[]; + /** + * The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + * You can use this value to decide when to fulfill your customer's order. + */ 'payment_status': 'no_payment_required' | 'paid' | 'unpaid'; + /** + * This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + * + * For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. + */ 'permissions': PaymentPagesCheckoutSessionPermissionsModel; 'phone_number_collection'?: PaymentPagesCheckoutSessionPhoneNumberCollectionModel | undefined; 'presentment_details'?: PaymentFlowsPaymentIntentPresentmentDetailsModel | undefined; + /** + * The ID of the original expired Checkout Session that triggered the recovery flow. + */ 'recovered_from': string; + /** + * This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + */ 'redirect_on_completion'?: 'always' | 'if_required' | 'never' | undefined; + /** + * Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + */ 'return_url'?: string | undefined; + /** + * Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + */ 'saved_payment_method_options': PaymentPagesCheckoutSessionSavedPaymentMethodOptionsModel; + /** + * The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + */ 'setup_intent': string | SetupIntentModel; + /** + * When set, provides configuration for Checkout to collect a shipping address from a customer. + */ 'shipping_address_collection': PaymentPagesCheckoutSessionShippingAddressCollectionModel; + /** + * The details of the customer cost of shipping, including the customer chosen ShippingRate. + */ 'shipping_cost': PaymentPagesCheckoutSessionShippingCostModel; + /** + * The shipping rate options applied to this Session. + */ 'shipping_options': PaymentPagesCheckoutSessionShippingOptionModel[]; + /** + * The status of the Checkout Session, one of `open`, `complete`, or `expired`. + */ 'status': 'complete' | 'expired' | 'open'; + /** + * Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + */ 'submit_type': 'auto' | 'book' | 'donate' | 'pay' | 'subscribe'; + /** + * The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode. + */ 'subscription': string | SubscriptionModel; + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ 'success_url': string; 'tax_id_collection'?: PaymentPagesCheckoutSessionTaxIdCollectionModel | undefined; + /** + * Tax and discount details for the computed total amount. + */ 'total_details': PaymentPagesCheckoutSessionTotalDetailsModel; + /** + * The UI mode of the Session. Defaults to `hosted`. + */ 'ui_mode': 'custom' | 'embedded' | 'hosted'; + /** + * The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ 'url': string; + /** + * Wallet-specific configuration for this Checkout Session. + */ 'wallet_options': CheckoutSessionWalletOptionsModel; }; +/** + * Occurs when a payment intent using a delayed payment method fails. + */ export type CheckoutSessionAsyncPaymentFailedModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a payment intent using a delayed payment method finally succeeds. + */ export type CheckoutSessionAsyncPaymentSucceededModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a Checkout Session has been successfully completed. + */ export type CheckoutSessionCompletedModel = { 'object': CheckoutSessionModel; }; +/** + * Occurs when a Checkout Session is expired. + */ export type CheckoutSessionExpiredModel = { 'object': CheckoutSessionModel; }; export type ClimateRemovalsBeneficiaryModel = { + /** + * Publicly displayable name for the end beneficiary of carbon removal. + */ 'public_name': string; }; export type ClimateRemovalsLocationModel = { + /** + * The city where the supplier is located. + */ 'city': string; + /** + * Two-letter ISO code representing the country where the supplier is located. + */ 'country': string; + /** + * The geographic latitude where the supplier is located. + */ 'latitude': number; + /** + * The geographic longitude where the supplier is located. + */ 'longitude': number; + /** + * The state/county/province/region where the supplier is located. + */ 'region': string; }; +/** + * A supplier of carbon removal. + */ export type ClimateSupplierModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Link to a webpage to learn more about the supplier. + */ 'info_url': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The locations in which this supplier operates. + */ 'locations': ClimateRemovalsLocationModel[]; + /** + * Name of this carbon removal supplier. + */ 'name': string; + /** + * String representing the object’s type. Objects of the same type share the same value. + */ 'object': 'climate.supplier'; + /** + * The scientific pathway used for carbon removal. + */ 'removal_pathway': 'biomass_carbon_removal_and_storage' | 'direct_air_capture' | 'enhanced_weathering'; }; +/** + * The delivery of a specified quantity of carbon for an order. + */ export type ClimateRemovalsOrderDeliveriesModel = { + /** + * Time at which the delivery occurred. Measured in seconds since the Unix epoch. + */ 'delivered_at': number; + /** + * Specific location of this delivery. + */ 'location': ClimateRemovalsLocationModel; + /** + * Quantity of carbon removal supplied by this delivery. + */ 'metric_tons': string; + /** + * Once retired, a URL to the registry entry for the tons from this delivery. + */ 'registry_url': string; 'supplier': ClimateSupplierModel; }; export type ClimateRemovalsProductsPriceModel = { + /** + * Fees for one metric ton of carbon removal in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + */ 'amount_total': number; }; +/** + * A Climate product represents a type of carbon removal unit available for reservation. + * You can retrieve it to see the current price and availability. + */ export type ClimateProductModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Current prices for a metric ton of carbon removal in a currency's smallest unit. + */ 'current_prices_per_metric_ton': { [key: string]: ClimateRemovalsProductsPriceModel; }; + /** + * The year in which the carbon removal is expected to be delivered. + */ 'delivery_year': number; + /** + * Unique identifier for the object. For convenience, Climate product IDs are human-readable strings + * that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + * for a list of available carbon removal products. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The quantity of metric tons available for reservation. + */ 'metric_tons_available': string; + /** + * The Climate product's name. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.product'; + /** + * The carbon removal suppliers that fulfill orders for this Climate product. + */ 'suppliers': ClimateSupplierModel[]; }; +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export type ClimateOrderModel = { + /** + * Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + */ 'amount_fees': number; + /** + * Total amount of the carbon removal in the currency's smallest unit. + */ 'amount_subtotal': number; + /** + * Total amount of the order including fees in the currency's smallest unit. + */ 'amount_total': number; 'beneficiary'?: ClimateRemovalsBeneficiaryModel | undefined; + /** + * Time at which the order was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Reason for the cancellation of this order. + */ 'cancellation_reason': 'expired' | 'product_unavailable' | 'requested'; + /** + * For delivered orders, a URL to a delivery certificate for the order. + */ 'certificate': string; + /** + * Time at which the order was confirmed. Measured in seconds since the Unix epoch. + */ 'confirmed_at': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + */ 'currency': string; + /** + * Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. + */ 'delayed_at': number; + /** + * Time at which the order was delivered. Measured in seconds since the Unix epoch. + */ 'delivered_at': number; + /** + * Details about the delivery of carbon removal for this order. + */ 'delivery_details': ClimateRemovalsOrderDeliveriesModel[]; + /** + * The year this order is expected to be delivered. + */ 'expected_delivery_year': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * Quantity of carbon removal that is included in this order. + */ 'metric_tons': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'climate.order'; + /** + * Unique ID for the Climate `Product` this order is purchasing. + */ 'product': string | ClimateProductModel; + /** + * Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + */ 'product_substituted_at': number; + /** + * The current status of this order. + */ 'status': 'awaiting_funds' | 'canceled' | 'confirmed' | 'delivered' | 'open'; }; +/** + * Occurs when a Climate order is canceled. + */ export type ClimateOrderCanceledModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is created. + */ export type ClimateOrderCreatedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is delayed. + */ export type ClimateOrderDelayedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order is delivered. + */ export type ClimateOrderDeliveredModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate order's product is substituted for another. + */ export type ClimateOrderProductSubstitutedModel = { 'object': ClimateOrderModel; }; +/** + * Occurs when a Climate product is created. + */ export type ClimateProductCreatedModel = { 'object': ClimateProductModel; }; +/** + * Occurs when a Climate product is updated. + */ export type ClimateProductPricingUpdatedModel = { 'object': ClimateProductModel; }; +/** + * This hash contains details about the online acceptance. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel = { + /** + * The IP address from which the Mandate was accepted by the customer. + */ 'ip_address': string; + /** + * The user agent of the browser from which the Mandate was accepted by the customer. + */ 'user_agent': string; }; +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel = { + /** + * If this is a Mandate accepted online, this hash contains details about the online acceptance. + */ 'online': ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineModel; + /** + * The type of customer acceptance information included with the Mandate. + */ 'type': string; }; +/** + * Data used for generating a Mandate. + */ export type ConfirmationTokensResourceMandateDataModel = { 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceModel; }; +/** + * Installment configuration for payments. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel = { 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; +/** + * This hash contains the card payment method options. + */ export type ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel = { + /** + * The `cvc_update` Token collected from the Payment Element. + */ 'cvc_token': string; 'installments'?: ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallmentModel | undefined; }; +/** + * Payment-method-specific configuration + */ export type ConfirmationTokensResourcePaymentMethodOptionsModel = { + /** + * This hash contains the card payment method options. + */ 'card': ConfirmationTokensResourcePaymentMethodOptionsResourceCardModel; }; +/** + * Details of the PaymentMethod collected by Payment Element + */ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'acss_debit'?: PaymentMethodAcssDebitModel | undefined; 'affirm'?: PaymentMethodAffirmModel | undefined; 'afterpay_clearpay'?: PaymentMethodAfterpayClearpayModel | undefined; 'alipay'?: PaymentFlowsPrivatePaymentMethodsAlipayModel | undefined; + /** + * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + */ 'allow_redisplay'?: 'always' | 'limited' | 'unspecified' | undefined; 'alma'?: PaymentMethodAlmaModel | undefined; 'amazon_pay'?: PaymentMethodAmazonPayModel | undefined; @@ -8985,6 +22814,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'card_present'?: PaymentMethodCardPresentModel | undefined; 'cashapp'?: PaymentMethodCashappModel | undefined; 'crypto'?: PaymentMethodCryptoModel | undefined; + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ 'customer': string | CustomerModel; 'customer_account'?: string | undefined; 'customer_balance'?: PaymentMethodCustomerBalanceModel | undefined; @@ -9027,6 +22859,9 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { 'stripe_balance'?: PaymentMethodStripeBalanceModel | undefined; 'swish'?: PaymentMethodSwishModel | undefined; 'twint'?: PaymentMethodTwintModel | undefined; + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ 'type': 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'blik' | 'boleto' | 'card' | 'card_present' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'interac_present' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'sepa_debit' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'us_bank_account' | 'wechat_pay' | 'zip'; 'us_bank_account'?: PaymentMethodUsBankAccountModel | undefined; 'wechat_pay'?: PaymentMethodWechatPayModel | undefined; @@ -9035,29 +22870,94 @@ export type ConfirmationTokensResourcePaymentMethodPreviewModel = { export type ConfirmationTokensResourceShippingModel = { 'address': AddressModel; + /** + * Recipient name. + */ 'name': string; + /** + * Recipient phone (including extension). + */ 'phone': string; }; +/** + * ConfirmationTokens help transport client side data collected by Stripe JS over + * to your server for confirming a PaymentIntent or SetupIntent. If the confirmation + * is successful, values present on the ConfirmationToken are written onto the Intent. + * + * To learn more about how to use ConfirmationToken, visit the related guides: + * - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) + * - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). + */ export type ConfirmationTokenModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Data used for generating a Mandate. + */ 'mandate_data'?: ConfirmationTokensResourceMandateDataModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'confirmation_token'; + /** + * ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'payment_intent': string; + /** + * Payment-method-specific configuration for this ConfirmationToken. + */ 'payment_method_options': ConfirmationTokensResourcePaymentMethodOptionsModel; + /** + * Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + */ 'payment_method_preview': ConfirmationTokensResourcePaymentMethodPreviewModel; + /** + * Return URL used to confirm the Intent. + */ 'return_url': string; + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ 'setup_future_usage': 'off_session' | 'on_session'; + /** + * ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ 'setup_intent': string; + /** + * Shipping information collected on this ConfirmationToken. + */ 'shipping': ConfirmationTokensResourceShippingModel; + /** + * Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + */ 'use_stripe_sdk': boolean; }; export type CountrySpecVerificationFieldDetailsModel = { + /** + * Additional fields which are only required for some users. + */ 'additional': string[]; + /** + * Fields which every account must eventually provide. + */ 'minimum': string[]; }; @@ -9066,304 +22966,811 @@ export type CountrySpecVerificationFieldsModel = { 'individual': CountrySpecVerificationFieldDetailsModel; }; +/** + * Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. + * + * You can also view the information from this API call as [an online + * guide](/docs/connect/required-verification-information). + */ export type CountrySpecModel = { + /** + * The default currency for this country. This applies to both payment methods and bank accounts. + */ 'default_currency': string; + /** + * Unique identifier for the object. Represented as the ISO country code for this country. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'country_spec'; + /** + * Currencies that can be accepted in the specific country (for transfers). + */ 'supported_bank_account_currencies': { [key: string]: string[]; }; + /** + * Currencies that can be accepted in the specified country (for payments). + */ 'supported_payment_currencies': string[]; + /** + * Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + */ 'supported_payment_methods': string[]; + /** + * Countries that can accept transfers from the specified country. + */ 'supported_transfer_countries': string[]; 'verification_fields': CountrySpecVerificationFieldsModel; }; +/** + * Occurs whenever a coupon is created. + */ export type CouponCreatedModel = { 'object': CouponModel; }; +/** + * Occurs whenever a coupon is deleted. + */ export type CouponDeletedModel = { 'object': CouponModel; }; +/** + * Occurs whenever a coupon is updated. + */ export type CouponUpdatedModel = { 'object': CouponModel; }; +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export type CustomerBalanceTransactionModel = { + /** + * The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + */ 'amount': number; + /** + * The ID of the checkout session (if any) that created the transaction. + */ 'checkout_session': string | CheckoutSessionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The ID of the credit note (if any) related to the transaction. + */ 'credit_note': string | CreditNoteModel; + /** + * 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; + /** + * The ID of the customer the transaction belongs to. + */ 'customer': string | CustomerModel; 'customer_account'?: string | undefined; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + */ 'ending_balance': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice (if any) related to the transaction. + */ 'invoice': string | InvoiceModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_balance_transaction'; + /** + * Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + */ 'type': 'adjustment' | 'applied_to_invoice' | 'checkout_session_subscription_payment' | 'checkout_session_subscription_payment_canceled' | 'credit_note' | 'initial' | 'invoice_overpaid' | 'invoice_too_large' | 'invoice_too_small' | 'migration' | 'unapplied_from_invoice' | 'unspent_receiver_credit'; }; export type CreditNotesPretaxCreditAmountModel = { + /** + * The amount, in cents (or local equivalent), of the pretax credit amount. + */ 'amount': number; + /** + * The credit balance transaction that was applied to get this pretax credit amount. + */ 'credit_balance_transaction'?: string | BillingCreditBalanceTransactionModel | undefined; + /** + * The discount that was applied to get this pretax credit amount. + */ 'discount'?: string | DiscountModel | DeletedDiscountModel | undefined; + /** + * Type of the pretax credit amount referenced. + */ 'type': 'credit_balance_transaction' | 'discount'; }; +/** + * The credit note line item object + */ export type CreditNoteLineItemModel = { + /** + * The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + */ 'amount': number; + /** + * Description of the item being credited. + */ 'description': string; + /** + * The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + */ 'discount_amount': number; + /** + * The amount of discount calculated per discount for this line item + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice line item being credited + */ 'invoice_line_item'?: string | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note_line_item'; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * The number of units of product being credited. + */ 'quantity': number; + /** + * The tax calculation identifiers of the line item. + */ 'tax_calculation_reference'?: TaxProductIntegrationResourceTaxCalculationReferenceModel | undefined; + /** + * The tax rates which apply to the line item. + */ 'tax_rates': TaxRateModel[]; + /** + * The tax information of the line item. + */ 'taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + */ 'type': 'custom_line_item' | 'invoice_line_item'; + /** + * The cost of each unit of product being credited. + */ 'unit_amount': number; + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ 'unit_amount_decimal': string; }; export type CreditNotesPaymentRecordRefundModel = { + /** + * ID of the payment record. + */ 'payment_record': string; + /** + * ID of the refund group. + */ 'refund_group': string; }; export type CreditNoteRefundModel = { + /** + * Amount of the refund that applies to this credit note, in cents (or local equivalent). + */ 'amount_refunded': number; + /** + * The PaymentRecord refund details associated with this credit note refund. + */ 'payment_record_refund': CreditNotesPaymentRecordRefundModel; + /** + * ID of the refund. + */ 'refund': string | RefundModel; + /** + * Type of the refund, one of `refund` or `payment_record_refund`. + */ 'type': 'payment_record_refund' | 'refund'; }; +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export type CreditNoteModel = { + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + */ 'amount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the customer. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the account. + */ 'customer_account'?: string | undefined; + /** + * Customer balance transaction related to this credit note. + */ 'customer_balance_transaction': string | CustomerBalanceTransactionModel; + /** + * The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + */ 'discount_amount': number; + /** + * The aggregate amounts calculated per discount for all line items. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + */ 'effective_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * ID of the invoice. + */ 'invoice': string | InvoiceModel; + /** + * Line items that make up the credit note + */ 'lines': { + /** + * Details about each object. + */ 'data': CreditNoteLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Customer-facing text that appears on the credit note PDF. + */ 'memo': string; + /** + * 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': { [key: string]: string; }; + /** + * A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'credit_note'; + /** + * Amount that was credited outside of Stripe. + */ 'out_of_band_amount': number; + /** + * The link to download the PDF of the credit note. + */ 'pdf': string; + /** + * The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. + */ 'post_payment_amount': number; + /** + * The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. + */ 'pre_payment_amount': number; + /** + * The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + */ 'pretax_credit_amounts': CreditNotesPretaxCreditAmountModel[]; + /** + * Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + */ 'reason': 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory'; + /** + * Refunds related to this credit note. + */ 'refunds': CreditNoteRefundModel[]; + /** + * The details of the cost of shipping, including the ShippingRate applied to the invoice. + */ 'shipping_cost': InvoicesResourceShippingCostModel; + /** + * Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + */ 'status': 'issued' | 'void'; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + */ 'subtotal_excluding_tax': number; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + */ 'total': number; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + */ 'total_excluding_tax': number; + /** + * The aggregate tax information for all line items. + */ 'total_taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + */ 'type': 'mixed' | 'post_payment' | 'pre_payment'; + /** + * The time that the credit note was voided. + */ 'voided_at': number; }; +/** + * Occurs whenever a credit note is created. + */ export type CreditNoteCreatedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a credit note is updated. + */ export type CreditNoteUpdatedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a credit note is voided. + */ export type CreditNoteVoidedModel = { 'object': CreditNoteModel; }; +/** + * Occurs whenever a new customer is created. + */ export type CustomerCreatedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a customer is deleted. + */ export type CustomerDeletedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a coupon is attached to a customer. + */ export type CustomerDiscountCreatedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a coupon is removed from a customer. + */ export type CustomerDiscountDeletedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a customer is switched from one coupon to another. + */ export type CustomerDiscountUpdatedModel = { 'object': DiscountModel; }; +/** + * Occurs whenever a new source is created for a customer. + */ export type CustomerSourceCreatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever a source is removed from a customer. + */ export type CustomerSourceDeletedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won't occur. + */ export type CustomerSourceExpiringModel = { 'object': CardModel | SourceModel; }; +/** + * Occurs whenever a source's details are changed. + */ export type CustomerSourceUpdatedModel = { 'object': BankAccountModel | CardModel | SourceModel; }; +/** + * Occurs whenever collection is paused on a customer's subscription. Only applies when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused, not when subscriptions enter `status=paused`. + */ export type CustomerSubscriptionCollectionPausedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever collection is resumed on a customer's subscription that is currently paused. Only applies when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed, not when subscriptions exit `status=paused`. + */ export type CustomerSubscriptionCollectionResumedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer is signed up for a new plan. + */ export type CustomerSubscriptionCreatedModel = { 'object': SubscriptionModel; }; +/** + * An ad-hoc custom event that is sent based on user configured [Automation](https://docs.stripe.com/billing/automations#send-custom-webhook-event-action). + */ export type CustomerSubscriptionCustomEventModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription ends. + */ export type CustomerSubscriptionDeletedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription is paused. Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused. + */ export type CustomerSubscriptionPausedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated. + */ export type CustomerSubscriptionPendingUpdateAppliedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription's pending update expires before the related invoice is paid. + */ export type CustomerSubscriptionPendingUpdateExpiredModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a price migration failed to transition prices on a subscription. + */ export type CustomerSubscriptionPriceMigrationFailedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a customer's subscription is no longer paused. Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed. + */ export type CustomerSubscriptionResumedModel = { 'object': SubscriptionModel; }; +/** + * Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`). + */ export type CustomerSubscriptionTrialWillEndModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). + */ export type CustomerSubscriptionUpdatedModel = { 'object': SubscriptionModel; }; +/** + * Occurs whenever a tax ID is created for a customer. + */ export type CustomerTaxIdCreatedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever a tax ID is deleted from a customer. + */ export type CustomerTaxIdDeletedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever a customer's tax ID is updated. + */ export type CustomerTaxIdUpdatedModel = { 'object': TaxIdModel; }; +/** + * Occurs whenever any property of a customer changes. + */ export type CustomerUpdatedModel = { 'object': CustomerModel; }; +/** + * Occurs whenever a new customer cash balance transactions is created. + */ export type CustomerCashBalanceTransactionCreatedModel = { 'object': CustomerCashBalanceTransactionModel; }; +/** + * This hash contains whether the buy button is enabled. + */ export type CustomerSessionResourceComponentsResourceBuyButtonModel = { + /** + * Whether the buy button is enabled. + */ 'enabled': boolean; }; +/** + * This hash contains the features the customer sheet supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether the customer sheet displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; }; +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceCustomerSheetModel = { + /** + * Whether the customer sheet is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the customer sheet supports certain features. + */ 'features': CustomerSessionResourceComponentsResourceCustomerSheetResourceFeaturesModel; }; +/** + * This hash contains the features the mobile payment element supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether or not the mobile payment element shows saved payment methods. + */ 'payment_method_redisplay': 'disabled' | 'enabled'; + /** + * Controls whether the mobile payment element displays the option to remove a saved payment method." + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new payment method. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save': 'disabled' | 'enabled'; + /** + * Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". + * + * If not specified, defaults to `nil` (no override value). + */ 'payment_method_save_allow_redisplay_override': 'always' | 'limited' | 'unspecified'; }; +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourceMobilePaymentElementModel = { + /** + * Whether the mobile payment element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the mobile payment element supports certain features. + */ 'features': CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeaturesModel; }; +/** + * This hash contains the features the Payment Element supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel = { + /** + * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + * + * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + */ 'payment_method_allow_redisplay_filters': Array<'always' | 'limited' | 'unspecified'>; + /** + * Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + */ 'payment_method_redisplay': 'disabled' | 'enabled'; + /** + * Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. + */ 'payment_method_redisplay_limit': number; + /** + * Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + * + * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + */ 'payment_method_remove': 'disabled' | 'enabled'; + /** + * Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + * + * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + */ 'payment_method_save': 'disabled' | 'enabled'; + /** + * When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + * + * When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + */ 'payment_method_save_usage': 'off_session' | 'on_session'; }; +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export type CustomerSessionResourceComponentsResourcePaymentElementModel = { + /** + * Whether the Payment Element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the Payment Element supports certain features. + */ 'features': CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesModel; }; +/** + * This hash contains whether the pricing table is enabled. + */ export type CustomerSessionResourceComponentsResourcePricingTableModel = { + /** + * Whether the pricing table is enabled. + */ 'enabled': boolean; }; +/** + * This hash defines whether the Tax ID Element supports certain features. + */ export type CustomerSessionResourceTaxIdElementResourceFeaturesModel = { + /** + * Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`. + * + * When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers. + */ 'tax_id_redisplay': 'disabled' | 'enabled'; + /** + * Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`. + * + * When enabled, customers can enter and save new tax identification numbers during the payment flow, which will be stored securely and associated with their customer object for future use. + */ 'tax_id_save': 'disabled' | 'enabled'; }; +/** + * This hash contains whether the Tax ID Element is enabled and the features it supports. + */ export type CustomerSessionResourceTaxIdElementModel = { + /** + * Whether the Tax ID Element is enabled. + */ 'enabled': boolean; + /** + * This hash defines whether the Tax ID Element supports certain features. + */ 'features': CustomerSessionResourceTaxIdElementResourceFeaturesModel; }; +/** + * Configuration for the components supported by this Customer Session. + */ export type CustomerSessionResourceComponentsModel = { 'buy_button': CustomerSessionResourceComponentsResourceBuyButtonModel; 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheetModel; @@ -9373,156 +23780,413 @@ export type CustomerSessionResourceComponentsModel = { 'tax_id_element'?: CustomerSessionResourceTaxIdElementModel | undefined; }; +/** + * A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access + * control over a Customer. + * + * Related guides: [Customer Session with the Payment Element](/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), + * [Customer Session with the Pricing Table](/payments/checkout/pricing-table#customer-session), + * [Customer Session with the Buy Button](/payment-links/buy-button#pass-an-existing-customer). + */ export type CustomerSessionModel = { + /** + * The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. + * + * The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ 'client_secret': string; 'components'?: CustomerSessionResourceComponentsModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The Customer the Customer Session was created for. + */ 'customer': string | CustomerModel; + /** + * The Account that the Customer Session was created for. + */ 'customer_account'?: string | undefined; + /** + * The timestamp at which this Customer Session will expire. + */ 'expires_at': 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; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'customer_session'; }; export type DeletedAccountModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'account'; }; export type DeletedApplePayDomainModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'apple_pay_domain'; }; export type DeletedCouponModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'coupon'; }; export type DeletedInvoiceitemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; }; export type DeletedPersonModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'person'; }; export type DeletedProductFeatureModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; export type DeletedRadarValueListModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type DeletedRadarValueListItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; }; export type DeletedSubscriptionItemModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'subscription_item'; }; export type DeletedTerminalConfigurationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; }; export type DeletedTerminalLocationModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; }; export type DeletedTerminalReaderModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; }; export type DeletedTestHelpersTestClockModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'test_helpers.test_clock'; }; export type DeletedWebhookEndpointModel = { + /** + * Always true for a deleted object + */ 'deleted': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; }; +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type EntitlementsFeatureModel = { + /** + * Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + */ 'active': boolean; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ 'metadata': { [key: string]: string; }; + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.feature'; }; +/** + * An active entitlement describes access to a feature for a customer. + */ export type EntitlementsActiveEntitlementModel = { + /** + * The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + */ 'feature': string | EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ 'lookup_key': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.active_entitlement'; }; +/** + * A summary of a customer's active entitlements. + */ export type EntitlementsActiveEntitlementSummaryModel = { + /** + * The customer that is entitled to this feature. + */ 'customer': string; + /** + * The list of entitlements this customer has. + */ 'entitlements': { 'data': EntitlementsActiveEntitlementModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'entitlements.active_entitlement_summary'; }; +/** + * Occurs whenever a customer's entitlements change. + */ export type EntitlementsActiveEntitlementSummaryUpdatedModel = { 'object': EntitlementsActiveEntitlementSummaryModel; }; export type EphemeralKeyModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Time at which the key will expire. Measured in seconds since the Unix epoch. + */ 'expires': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'ephemeral_key'; + /** + * The key's secret. You can use this value to make authorized requests to the Stripe API. + */ 'secret'?: string | undefined; }; +/** + * An error response from the Stripe API + */ export type ErrorModel = { 'error': ApiErrorsModel; }; export type NotificationEventDataModel = { + /** + * Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. + */ 'object': {}; + /** + * Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. + */ 'previous_attributes'?: {} | undefined; }; export type NotificationEventAutomationActionResourceSendWebhookCustomEventModel = { + /** + * Set of key-value pairs attached to the action when creating an Automation. + */ 'custom_data': { [key: string]: string; }; @@ -9530,411 +24194,1250 @@ export type NotificationEventAutomationActionResourceSendWebhookCustomEventModel export type NotificationEventAutomationActionModel = { 'stripe_send_webhook_custom_event'?: NotificationEventAutomationActionResourceSendWebhookCustomEventModel | undefined; + /** + * The trigger name of the automation that triggered this action. + * Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. + */ 'trigger': string; + /** + * The type of the `automation_action`. + */ 'type': 'stripe_send_webhook_custom_event'; }; export type NotificationEventRequestModel = { + /** + * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + */ 'id': string; + /** + * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + */ 'idempotency_key': string; }; export type NotificationEventReasonModel = { 'automation_action'?: NotificationEventAutomationActionModel | undefined; 'request'?: NotificationEventRequestModel | undefined; + /** + * The type of the reason for the event. + */ 'type': 'automation_action' | 'request'; }; +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export type EventModel = { + /** + * The connected account that originates the event. + */ 'account'?: string | undefined; + /** + * The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. + */ 'api_version': string; + /** + * Authentication context needed to fetch the event or related object. + */ 'context'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'data': NotificationEventDataModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'event'; + /** + * Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + */ 'pending_webhooks': number; + /** + * Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. + */ 'reason'?: NotificationEventReasonModel | undefined; + /** + * Information on the API request that triggers the event. + */ 'request': NotificationEventRequestModel; + /** + * Description of the event (for example, `invoice.created` or `charge.refunded`). + */ 'type': 'account.application.authorized' | 'account.application.deauthorized' | 'account.external_account.created' | 'account.external_account.deleted' | 'account.external_account.updated' | 'account.updated' | 'account_notice.created' | 'account_notice.updated' | 'application_fee.created' | 'application_fee.refund.updated' | 'application_fee.refunded' | 'balance.available' | 'balance_settings.updated' | 'billing.alert.triggered' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' | 'billing_portal.session.created' | 'capability.updated' | 'capital.financing_offer.accepted' | 'capital.financing_offer.accepted_other_offer' | 'capital.financing_offer.canceled' | 'capital.financing_offer.created' | 'capital.financing_offer.expired' | 'capital.financing_offer.fully_repaid' | 'capital.financing_offer.paid_out' | 'capital.financing_offer.rejected' | 'capital.financing_offer.replacement_created' | 'capital.financing_transaction.created' | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' | 'charge.dispute.funds_reinstated' | 'charge.dispute.funds_withdrawn' | 'charge.dispute.updated' | 'charge.expired' | 'charge.failed' | 'charge.pending' | 'charge.refund.updated' | 'charge.refunded' | 'charge.succeeded' | 'charge.updated' | 'checkout.session.async_payment_failed' | 'checkout.session.async_payment_succeeded' | 'checkout.session.completed' | 'checkout.session.expired' | 'climate.order.canceled' | 'climate.order.created' | 'climate.order.delayed' | 'climate.order.delivered' | 'climate.order.product_substituted' | 'climate.product.created' | 'climate.product.pricing_updated' | 'coupon.created' | 'coupon.deleted' | 'coupon.updated' | 'credit_note.created' | 'credit_note.updated' | 'credit_note.voided' | 'customer.created' | 'customer.deleted' | 'customer.discount.created' | 'customer.discount.deleted' | 'customer.discount.updated' | 'customer.source.created' | 'customer.source.deleted' | 'customer.source.expiring' | 'customer.source.updated' | 'customer.subscription.collection_paused' | 'customer.subscription.collection_resumed' | 'customer.subscription.created' | 'customer.subscription.custom_event' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' | 'customer.subscription.pending_update_expired' | 'customer.subscription.price_migration_failed' | 'customer.subscription.resumed' | 'customer.subscription.trial_will_end' | 'customer.subscription.updated' | 'customer.tax_id.created' | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' | 'customer_cash_balance_transaction.created' | 'entitlements.active_entitlement_summary.updated' | 'file.created' | 'financial_connections.account.account_numbers_updated' | 'financial_connections.account.created' | 'financial_connections.account.deactivated' | 'financial_connections.account.disconnected' | 'financial_connections.account.reactivated' | 'financial_connections.account.refreshed_balance' | 'financial_connections.account.refreshed_inferred_balances' | 'financial_connections.account.refreshed_ownership' | 'financial_connections.account.refreshed_transactions' | 'financial_connections.account.upcoming_account_number_expiry' | 'financial_connections.session.updated' | 'fx_quote.expired' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' | 'identity.verification_session.redacted' | 'identity.verification_session.requires_input' | 'identity.verification_session.verified' | 'invoice.created' | 'invoice.deleted' | 'invoice.finalization_failed' | 'invoice.finalized' | 'invoice.marked_uncollectible' | 'invoice.overdue' | 'invoice.overpaid' | 'invoice.paid' | 'invoice.payment.overpaid' | 'invoice.payment_action_required' | 'invoice.payment_attempt_required' | 'invoice.payment_failed' | 'invoice.payment_succeeded' | 'invoice.sent' | 'invoice.upcoming' | 'invoice.updated' | 'invoice.voided' | 'invoice.will_be_due' | 'invoice_payment.paid' | 'invoiceitem.created' | 'invoiceitem.deleted' | 'issuing_authorization.created' | 'issuing_authorization.request' | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' | 'issuing_dispute.created' | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.funds_rescinded' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' | 'issuing_dispute_settlement_detail.created' | 'issuing_dispute_settlement_detail.updated' | 'issuing_fraud_liability_debit.created' | 'issuing_personalization_design.activated' | 'issuing_personalization_design.deactivated' | 'issuing_personalization_design.rejected' | 'issuing_personalization_design.updated' | 'issuing_settlement.created' | 'issuing_settlement.updated' | 'issuing_token.created' | 'issuing_token.updated' | 'issuing_transaction.created' | 'issuing_transaction.purchase_details_receipt_updated' | 'issuing_transaction.updated' | 'mandate.updated' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' | 'payment_intent.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' | 'payment_link.created' | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' | 'payment_method.updated' | 'payout.canceled' | 'payout.created' | 'payout.failed' | 'payout.paid' | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' | 'person.updated' | 'plan.created' | 'plan.deleted' | 'plan.updated' | 'price.created' | 'price.deleted' | 'price.updated' | 'privacy.redaction_job.canceled' | 'privacy.redaction_job.created' | 'privacy.redaction_job.ready' | 'privacy.redaction_job.succeeded' | 'privacy.redaction_job.validation_error' | 'product.created' | 'product.deleted' | 'product.updated' | 'promotion_code.created' | 'promotion_code.updated' | 'quote.accept_failed' | 'quote.accepted' | 'quote.accepting' | 'quote.canceled' | 'quote.created' | 'quote.draft' | 'quote.finalized' | 'quote.reestimate_failed' | 'quote.reestimated' | 'quote.stale' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' | 'refund.created' | 'refund.failed' | 'refund.updated' | 'reporting.report_run.failed' | 'reporting.report_run.succeeded' | 'reporting.report_type.updated' | 'review.closed' | 'review.opened' | 'setup_intent.canceled' | 'setup_intent.created' | 'setup_intent.requires_action' | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' | 'source.canceled' | 'source.chargeable' | 'source.failed' | 'source.mandate_notification' | 'source.refund_attributes_required' | 'source.transaction.created' | 'source.transaction.updated' | 'subscription_schedule.aborted' | 'subscription_schedule.canceled' | 'subscription_schedule.completed' | 'subscription_schedule.created' | 'subscription_schedule.expiring' | 'subscription_schedule.price_migration_failed' | 'subscription_schedule.released' | 'subscription_schedule.updated' | 'tax.form.updated' | 'tax.settings.updated' | 'tax_rate.created' | 'tax_rate.updated' | 'terminal.reader.action_failed' | 'terminal.reader.action_succeeded' | 'terminal.reader.action_updated' | 'test_helpers.test_clock.advancing' | 'test_helpers.test_clock.created' | 'test_helpers.test_clock.deleted' | 'test_helpers.test_clock.internal_failure' | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' | 'transfer.reversed' | 'transfer.updated' | 'treasury.credit_reversal.created' | 'treasury.credit_reversal.posted' | 'treasury.debit_reversal.completed' | 'treasury.debit_reversal.created' | 'treasury.debit_reversal.initial_credit_granted' | 'treasury.financial_account.closed' | 'treasury.financial_account.created' | 'treasury.financial_account.features_status_updated' | 'treasury.inbound_transfer.canceled' | 'treasury.inbound_transfer.created' | 'treasury.inbound_transfer.failed' | 'treasury.inbound_transfer.succeeded' | 'treasury.outbound_payment.canceled' | 'treasury.outbound_payment.created' | 'treasury.outbound_payment.expected_arrival_date_updated' | 'treasury.outbound_payment.failed' | 'treasury.outbound_payment.posted' | 'treasury.outbound_payment.returned' | 'treasury.outbound_payment.tracking_details_updated' | 'treasury.outbound_transfer.canceled' | 'treasury.outbound_transfer.created' | 'treasury.outbound_transfer.expected_arrival_date_updated' | 'treasury.outbound_transfer.failed' | 'treasury.outbound_transfer.posted' | 'treasury.outbound_transfer.returned' | 'treasury.outbound_transfer.tracking_details_updated' | 'treasury.received_credit.created' | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created'; }; +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export type ExchangeRateModel = { + /** + * Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'exchange_rate'; + /** + * Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + */ 'rates': { [key: string]: number; }; }; +/** + * Occurs whenever a new Stripe-generated file is available for your account. + */ export type FileCreatedModel = { 'object': FileModel; }; +/** + * An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow. + */ export type FinancialConnectionsInstitutionModel = { + /** + * The list of countries supported by this institution, formatted as ISO country codes. + */ 'countries': string[]; 'features': BankConnectionsResourceInstitutionFeatureSupportModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The name of this institution. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.institution'; + /** + * A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. + */ 'routing_numbers': string[]; + /** + * The status of this institution in the Financial Connections authentication flow. + */ 'status': 'active' | 'degraded' | 'inactive'; + /** + * A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. + */ 'url': string; }; +/** + * Describes an owner of an account. + */ export type FinancialConnectionsAccountOwnerModel = { + /** + * The email address of the owner. + */ 'email': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The full name of the owner. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_owner'; + /** + * The ownership object that this owner belongs to. + */ 'ownership': string; + /** + * The raw phone number of the owner. + */ 'phone': string; + /** + * The raw physical address of the owner. + */ 'raw_address': string; + /** + * The timestamp of the refresh that updated this owner. + */ 'refreshed_at': number; }; +/** + * Describes a snapshot of the owners of an account at a particular point in time. + */ export type FinancialConnectionsAccountOwnershipModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_ownership'; + /** + * A paginated list of owners for this account. + */ 'owners': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountOwnerModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; }; +/** + * A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ export type FinancialConnectionsAccountModel = { + /** + * The account holder that this account belongs to. + */ 'account_holder': BankConnectionsResourceAccountholderModel; + /** + * Details about the account numbers. + */ 'account_numbers': BankConnectionsResourceAccountNumberDetailsModel[]; + /** + * The most recent information about the account's balance. + */ 'balance': BankConnectionsResourceBalanceModel; + /** + * The state of the most recent attempt to refresh the account balance. + */ 'balance_refresh': BankConnectionsResourceBalanceRefreshModel; + /** + * The type of the account. Account category is further divided in `subcategory`. + */ 'category': 'cash' | 'credit' | 'investment' | 'other'; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * A human-readable name that has been assigned to this account, either by the account holder or by the institution. + */ 'display_name': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The state of the most recent attempt to refresh the account's inferred balance history. + */ 'inferred_balances_refresh'?: BankConnectionsResourceInferredBalancesRefreshModel | undefined; + /** + * The ID of the Financial Connections Institution this account belongs to. Note that this relationship may sometimes change in rare circumstances (e.g. institution mergers). + */ 'institution'?: string | FinancialConnectionsInstitutionModel | undefined; + /** + * The name of the institution that holds this account. + */ 'institution_name': string; + /** + * The last 4 digits of the account number. If present, this will be 4 numeric characters. + */ 'last4': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account'; + /** + * The most recent information about the account's owners. + */ 'ownership': string | FinancialConnectionsAccountOwnershipModel; + /** + * The state of the most recent attempt to refresh the account owners. + */ 'ownership_refresh': BankConnectionsResourceOwnershipRefreshModel; + /** + * The list of permissions granted by this account. + */ 'permissions': Array<'balances' | 'ownership' | 'payment_method' | 'transactions'>; + /** + * The status of the link to the account. + */ 'status': 'active' | 'disconnected' | 'inactive'; + /** + * If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + */ 'subcategory': 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings'; + /** + * The list of data refresh subscriptions requested on this account. + */ 'subscriptions': Array<'balance' | 'inferred_balances' | 'transactions'>; + /** + * The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + */ 'supported_payment_method_types': Array<'link' | 'us_bank_account'>; + /** + * The state of the most recent attempt to refresh the account transactions. + */ 'transaction_refresh': BankConnectionsResourceTransactionRefreshModel; }; +/** + * Occurs when a Financial Connections account's account numbers are updated. + */ export type FinancialConnectionsAccountAccountNumbersUpdatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a new Financial Connections account is created. + */ export type FinancialConnectionsAccountCreatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account's status is updated from `active` to `inactive`. + */ export type FinancialConnectionsAccountDeactivatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account is disconnected. + */ export type FinancialConnectionsAccountDisconnectedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when a Financial Connections account's status is updated from `inactive` to `active`. + */ export type FinancialConnectionsAccountReactivatedModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedBalanceModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `inferred_balances_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedInferredBalancesModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedOwnershipModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export type FinancialConnectionsAccountRefreshedTransactionsModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * Occurs when an Account’s tokenized account number is about to expire. + */ export type FinancialConnectionsAccountUpcomingAccountNumberExpiryModel = { 'object': FinancialConnectionsAccountModel; }; +/** + * A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. + */ export type FinancialConnectionsAccountInferredBalanceModel = { + /** + * The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. + */ 'as_of': number; + /** + * The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ 'current': { [key: string]: number; }; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.account_inferred_balance'; }; +/** + * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ export type FinancialConnectionsSessionModel = { + /** + * The account holder for whom accounts are collected in this session. + */ 'account_holder': BankConnectionsResourceAccountholderModel; + /** + * The accounts that were collected as part of this Session. + */ 'accounts': { + /** + * Details about each object. + */ 'data': FinancialConnectionsAccountModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * A value that will be passed to the client to launch the authentication flow. + */ 'client_secret': string; 'filters'?: BankConnectionsResourceLinkAccountSessionFiltersModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'limits'?: BankConnectionsResourceLinkAccountSessionLimitsModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'manual_entry'?: BankConnectionsResourceLinkAccountSessionManualEntryModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.session'; + /** + * Permissions requested for accounts collected during this session. + */ 'permissions': Array<'balances' | 'ownership' | 'payment_method' | 'transactions'>; + /** + * Data features requested to be retrieved upon account creation. + */ 'prefetch': Array<'balances' | 'inferred_balances' | 'ownership' | 'transactions'>; + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ 'return_url'?: string | undefined; + /** + * The current state of the session. + */ 'status'?: 'cancelled' | 'failed' | 'pending' | 'succeeded' | undefined; 'status_details'?: BankConnectionsResourceLinkAccountSessionStatusDetailsModel | undefined; }; +/** + * Occurs when a Financial Connections Session `status` transitions from `pending` to `failed`, `cancelled`, or `completed`. + */ export type FinancialConnectionsSessionUpdatedModel = { 'object': FinancialConnectionsSessionModel; }; +/** + * A Transaction represents a real transaction that affects a Financial Connections Account balance. + */ export type FinancialConnectionsTransactionModel = { + /** + * The ID of the Financial Connections Account this transaction belongs to. + */ 'account': string; + /** + * The amount of this transaction, in cents (or local equivalent). + */ 'amount': number; + /** + * 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; + /** + * The description of this transaction. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'financial_connections.transaction'; + /** + * The status of the transaction. + */ 'status': 'pending' | 'posted' | 'void'; 'status_transitions': BankConnectionsResourceTransactionResourceStatusTransitionsModel; + /** + * Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + */ 'transacted_at': number; + /** + * The token of the transaction refresh that last updated or created this transaction. + */ 'transaction_refresh': string; + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ 'updated': number; }; export type FinancialReportingFinanceReportRunRunParametersModel = { + /** + * The set of output columns requested for inclusion in the report run. + */ 'columns'?: string[] | undefined; + /** + * Connected account ID by which to filter the report run. + */ 'connected_account'?: string | undefined; + /** + * Currency of objects to be included in the report run. + */ 'currency'?: string | undefined; + /** + * Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. + */ 'interval_end'?: number | undefined; + /** + * Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. + */ 'interval_start'?: number | undefined; + /** + * Payout ID by which to filter the report run. + */ 'payout'?: string | undefined; + /** + * Category of balance transactions to be included in the report run. + */ 'reporting_category'?: string | undefined; + /** + * Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + */ 'timezone'?: string | undefined; }; +/** + * Metadata about the forwarded request. + */ export type ForwardedRequestContextModel = { + /** + * The time it took in milliseconds for the destination endpoint to respond. + */ 'destination_duration': number; + /** + * The IP address of the destination. + */ 'destination_ip_address': string; }; +/** + * Header data. + */ export type ForwardedRequestHeaderModel = { + /** + * The header name. + */ 'name': string; + /** + * The header value. + */ 'value': string; }; +/** + * Details about the request forwarded to the destination endpoint. + */ export type ForwardedRequestDetailsModel = { + /** + * The body payload to send to the destination endpoint. + */ 'body': string; + /** + * The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP method used to call the destination endpoint. + */ 'http_method': 'POST'; }; +/** + * Details about the response from the destination endpoint. + */ export type ForwardedResponseDetailsModel = { + /** + * The response body from the destination endpoint to Stripe. + */ 'body': string; + /** + * HTTP headers that the destination endpoint returned. + */ 'headers': ForwardedRequestHeaderModel[]; + /** + * The HTTP status code that the destination endpoint returned. + */ 'status': number; }; +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export type ForwardingRequestModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'forwarding.request'; + /** + * The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + */ 'payment_method': string; + /** + * The field kinds to be replaced in the forwarded request. + */ 'replacements': Array<'card_cvc' | 'card_expiry' | 'card_number' | 'cardholder_name' | 'request_signature'>; + /** + * Context about the request from Stripe's servers to the destination endpoint. + */ 'request_context': ForwardedRequestContextModel; + /** + * The request that was sent to the destination endpoint. We redact any sensitive fields. + */ 'request_details': ForwardedRequestDetailsModel; + /** + * The response that the destination endpoint returned to us. We redact any sensitive fields. + */ 'response_details': ForwardedResponseDetailsModel; + /** + * The destination URL for the forwarded request. Must be supported by the config. + */ 'url': string; }; export type FundingInstructionsBankTransferModel = { + /** + * The country of the bank account to fund + */ 'country': string; + /** + * A list of financial addresses that can be used to fund a particular balance + */ 'financial_addresses': FundingInstructionsBankTransferFinancialAddressModel[]; + /** + * The bank_transfer type + */ 'type': 'eu_bank_transfer' | 'jp_bank_transfer'; }; +/** + * Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) + */ export type FundingInstructionsModel = { 'bank_transfer': FundingInstructionsBankTransferModel; + /** + * 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; + /** + * The `funding_type` of the returned instructions + */ 'funding_type': 'bank_transfer'; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'funding_instructions'; }; export type FxQuoteRateDetailsModel = { + /** + * The rate for the currency pair. + */ 'base_rate': number; + /** + * The fee for locking the conversion rates. + */ 'duration_premium': number; + /** + * The FX fee for the currency pair. + */ 'fx_fee_rate': number; + /** + * A reference rate for the currency pair provided by the reference rate provider. + */ 'reference_rate': number; + /** + * The reference rate provider. + */ 'reference_rate_provider': 'ecb'; }; export type FxQuoteRateModel = { + /** + * The rate that includes the FX fee rate. + */ 'exchange_rate': number; 'rate_details': FxQuoteRateDetailsModel; }; export type FxQuoteUsagePaymentModel = { + /** + * The Stripe account ID that the funds will be transferred to. + * + * This field should match the account ID that would be used in the PaymentIntent’s transfer_data[destination] field. + */ 'destination': string; + /** + * The Stripe account ID that these funds are intended for. + * + * This field must match the account ID that would be used in the PaymentIntent’s on_behalf_of field. + */ 'on_behalf_of': string; }; export type FxQuoteUsageTransferModel = { + /** + * The Stripe account ID that the funds will be transferred to. + * + * This field should match the account ID that would be used in the Transfer’s destination field. + */ 'destination': string; }; export type FxQuoteUsageModel = { + /** + * The details required to use an FX Quote for a payment + */ 'payment': FxQuoteUsagePaymentModel; + /** + * The details required to use an FX Quote for a transfer + */ 'transfer': FxQuoteUsageTransferModel; + /** + * The transaction type for which the FX Quote will be used. + * + * Can be 'payment' or 'transfer'. + */ 'type': 'payment' | 'transfer'; }; +/** + * The FX Quotes API provides three functions: + * - View Stripe's current exchange rate for any given currency pair. + * - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing uncertainty from FX fluctuations. + * - Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs. + * + * [View the docs](/payments/currencies/localize-prices/fx-quotes-api) + */ export type FxQuoteModel = { + /** + * Time at which the quote was created, measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions. + */ 'lock_duration': 'day' | 'five_minutes' | 'hour' | 'none'; + /** + * Time at which the quote will expire, measured in seconds since the Unix epoch. + * + * If lock_duration is set to ‘none’ this field will be set to null. + */ 'lock_expires_at': number; + /** + * Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp. + * + * Can return value none, active, or expired. + */ 'lock_status': 'active' | 'expired' | 'none'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'fx_quote'; + /** + * Information about the rates. + */ 'rates': { [key: string]: FxQuoteRateModel; }; + /** + * The currency to convert into, typically this is the currency that you want to settle to your Stripe balance. Three-letter ISO currency code, in lowercase. Must be a supported currency. + */ 'to_currency': string; 'usage': FxQuoteUsageModel; }; +/** + * Occurs when FX Quote's lock_status field transitions to 'Expired'. + */ export type FxQuoteExpiredModel = { 'object': FxQuoteModel; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportDateOfBirthModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportExpirationDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataDocumentReportIssuedDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataIdNumberReportDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; +/** + * Point in Time + */ export type GelatoDataVerifiedOutputsDateModel = { + /** + * Numerical day between 1 and 31. + */ 'day': number; + /** + * Numerical month between 1 and 12. + */ 'month': number; + /** + * The four-digit year. + */ 'year': number; }; export type GelatoDocumentReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'document_expired' | 'document_type_not_supported' | 'document_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a document check + */ export type GelatoDocumentReportModel = { + /** + * Address as it appears in the document. + */ 'address': AddressModel; + /** + * Date of birth as it appears in the document. + */ 'dob'?: GelatoDataDocumentReportDateOfBirthModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoDocumentReportErrorModel; + /** + * Expiration date of the document. + */ 'expiration_date'?: GelatoDataDocumentReportExpirationDateModel | undefined; + /** + * Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. + */ 'files': string[]; + /** + * First name as it appears in the document. + */ 'first_name': string; + /** + * Issued date of the document. + */ 'issued_date': GelatoDataDocumentReportIssuedDateModel; + /** + * Issuing country of the document. + */ 'issuing_country': string; + /** + * Last name as it appears in the document. + */ 'last_name': string; + /** + * Document ID number. + */ 'number'?: string | undefined; + /** + * Sex of the person in the document. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * Status of this `document` check. + */ 'status': 'unverified' | 'verified'; + /** + * Type of the document. + */ 'type': 'driving_license' | 'id_card' | 'passport'; + /** + * Place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * Sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; export type GelatoEmailReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'email_unverified_other' | 'email_verification_declined'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a email check + */ export type GelatoEmailReportModel = { + /** + * Email to be verified. + */ 'email': string; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoEmailReportErrorModel; + /** + * Status of this `email` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoIdNumberReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from an id_number check + */ export type GelatoIdNumberReportModel = { + /** + * Date of birth. + */ 'dob'?: GelatoDataIdNumberReportDateModel | undefined; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoIdNumberReportErrorModel; + /** + * First name. + */ 'first_name': string; + /** + * ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. + */ 'id_number'?: string | undefined; + /** + * Type of ID number. + */ 'id_number_type': 'br_cpf' | 'sg_nric' | 'us_ssn'; + /** + * Last name. + */ 'last_name': string; + /** + * Status of this `id_number` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoPhoneReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'phone_unverified_other' | 'phone_verification_declined'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a phone check + */ export type GelatoPhoneReportModel = { + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoPhoneReportErrorModel; + /** + * Phone to be verified. + */ 'phone': string; + /** + * Status of this `phone` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoProvidedDetailsModel = { + /** + * Email of user being verified + */ 'email'?: string | undefined; + /** + * Phone number of user being verified + */ 'phone'?: string | undefined; }; export type GelatoRelatedPersonModel = { + /** + * Token referencing the associated Account of the related Person resource. + */ 'account': string; + /** + * Token referencing the related Person resource. + */ 'person': string; }; export type GelatoReportDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; @@ -9943,25 +25446,61 @@ export type GelatoReportIdNumberOptionsModel = { }; export type GelatoSelfieReportErrorModel = { + /** + * A short machine-readable string giving the reason for the verification failure. + */ 'code': 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other'; + /** + * A human-readable message giving the reason for the failure. These messages can be shown to your users. + */ 'reason': string; }; +/** + * Result from a selfie check + */ export type GelatoSelfieReportModel = { + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. + */ 'document': string; + /** + * Details on the verification error. Present when status is `unverified`. + */ 'error': GelatoSelfieReportErrorModel; + /** + * ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. + */ 'selfie': string; + /** + * Status of this `selfie` check. + */ 'status': 'unverified' | 'verified'; }; export type GelatoSessionDocumentOptionsModel = { + /** + * Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + */ 'allowed_types'?: Array<'driving_license' | 'id_card' | 'passport'> | undefined; + /** + * Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + */ 'require_id_number'?: boolean | undefined; + /** + * Disable image uploads, identity document images have to be captured using the device’s camera. + */ 'require_live_capture'?: boolean | undefined; + /** + * Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + */ 'require_matching_selfie'?: boolean | undefined; }; export type GelatoSessionEmailOptionsModel = { + /** + * Request one time password verification of `provided_details.email`. + */ 'require_verification'?: boolean | undefined; }; @@ -9969,17 +25508,35 @@ export type GelatoSessionIdNumberOptionsModel = { }; +/** + * Shows last VerificationSession error + */ export type GelatoSessionLastErrorModel = { + /** + * A short machine-readable string giving the reason for the verification or user-session failure. + */ 'code': 'abandoned' | 'consent_declined' | 'country_not_supported' | 'device_not_supported' | 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | 'email_unverified_other' | 'email_verification_declined' | 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | 'phone_unverified_other' | 'phone_verification_declined' | 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | 'under_supported_age'; + /** + * A message that explains the reason for verification or user-session failure. + */ 'reason': string; }; export type GelatoSessionMatchingOptionsModel = { + /** + * Strictness of the DOB matching policy to apply. + */ 'dob'?: 'none' | 'similar' | undefined; + /** + * Strictness of the name matching policy to apply. + */ 'name'?: 'none' | 'similar' | undefined; }; export type GelatoSessionPhoneOptionsModel = { + /** + * Request one time password verification of `provided_details.phone`. + */ 'require_verification'?: boolean | undefined; }; @@ -9997,482 +25554,1167 @@ export type GelatoVerificationSessionOptionsModel = { }; export type GelatoVerifiedOutputsModel = { + /** + * The user's verified address. + */ 'address': AddressModel; + /** + * The user’s verified date of birth. + */ 'dob'?: GelatoDataVerifiedOutputsDateModel | undefined; + /** + * The user's verified email address + */ 'email': string; + /** + * The user's verified first name. + */ 'first_name': string; + /** + * The user's verified id number. + */ 'id_number'?: string | undefined; + /** + * The user's verified id number type. + */ 'id_number_type': 'br_cpf' | 'sg_nric' | 'us_ssn'; + /** + * The user's verified last name. + */ 'last_name': string; + /** + * The user's verified phone number + */ 'phone': string; + /** + * The user's verified sex. + */ 'sex'?: '[redacted]' | 'female' | 'male' | 'unknown' | undefined; + /** + * The user's verified place of birth as it appears in the document. + */ 'unparsed_place_of_birth'?: string | undefined; + /** + * The user's verified sex as it appears in the document. + */ 'unparsed_sex'?: string | undefined; }; +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export type IdentityVerificationReportModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'document'?: GelatoDocumentReportModel | undefined; 'email'?: GelatoEmailReportModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'id_number'?: GelatoIdNumberReportModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_report'; 'options'?: GelatoVerificationReportOptionsModel | undefined; 'phone'?: GelatoPhoneReportModel | undefined; 'selfie'?: GelatoSelfieReportModel | undefined; + /** + * Type of report. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * ID of the VerificationSession that created this report. + */ 'verification_session': string; }; export type VerificationSessionRedactionModel = { + /** + * Indicates whether this object and its related objects have been redacted or not. + */ 'status': 'processing' | 'redacted'; }; +/** + * A VerificationSession guides you through the process of collecting and verifying the identities + * of your users. It contains details about the type of verification, such as what [verification + * check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for + * each verification in your system. + * + * A VerificationSession transitions through [multiple + * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through + * the verification flow. The VerificationSession contains the user's verified data after + * verification checks are complete. + * + * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) + */ export type IdentityVerificationSessionModel = { + /** + * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + */ 'client_reference_id': string; + /** + * The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + */ 'client_secret': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * If present, this property tells you the last error encountered when processing the verification. + */ 'last_error': GelatoSessionLastErrorModel; + /** + * ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + */ 'last_verification_report': string | IdentityVerificationReportModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'identity.verification_session'; + /** + * A set of options for the session’s verification checks. + */ 'options': GelatoVerificationSessionOptionsModel; + /** + * Details provided about the user being verified. These details may be shown to the user. + */ 'provided_details'?: GelatoProvidedDetailsModel | undefined; + /** + * Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + */ 'redaction': VerificationSessionRedactionModel; + /** + * Customer ID + */ 'related_customer': string; + /** + * Token referencing a Customer Account resource. + */ 'related_customer_account'?: string | undefined; 'related_person'?: GelatoRelatedPersonModel | undefined; + /** + * Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + */ 'status': 'canceled' | 'processing' | 'requires_input' | 'verified'; + /** + * The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + */ 'type': 'document' | 'id_number' | 'verification_flow'; + /** + * The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + */ 'url': string; + /** + * The configuration token of a verification flow from the dashboard. + */ 'verification_flow'?: string | undefined; + /** + * The user’s verified data. + */ 'verified_outputs'?: GelatoVerifiedOutputsModel | undefined; }; +/** + * Occurs whenever a VerificationSession is canceled + */ export type IdentityVerificationSessionCanceledModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession is created + */ export type IdentityVerificationSessionCreatedModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to processing + */ export type IdentityVerificationSessionProcessingModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession is redacted. + */ export type IdentityVerificationSessionRedactedModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to require user input + */ export type IdentityVerificationSessionRequiresInputModel = { 'object': IdentityVerificationSessionModel; }; +/** + * Occurs whenever a VerificationSession transitions to verified + */ export type IdentityVerificationSessionVerifiedModel = { 'object': IdentityVerificationSessionModel; }; export type TreasurySharedResourceBillingDetailsModel = { 'address': AddressModel; + /** + * Email address. + */ 'email': string; + /** + * Full name. + */ 'name': string; }; export type InboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type InboundTransfersModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; + /** + * The type of the payment method used in the InboundTransfer. + */ 'type': 'us_bank_account'; 'us_bank_account'?: InboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks). + */ export type InvoiceCreatedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice is deleted. Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview). + */ export type InvoiceDeletedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice cannot be finalized. See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details. + */ export type InvoiceFinalizationFailedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever a draft invoice is finalized and updated to be an open invoice. + */ export type InvoiceFinalizedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice is marked uncollectible. + */ export type InvoiceMarkedUncollectibleModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days after an invoice becomes due—where X is determined by Automations + */ export type InvoiceOverdueModel = { 'object': InvoiceModel; }; +/** + * Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + */ export type InvoiceOverpaidModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. + */ export type InvoicePaidModel = { 'object': InvoiceModel; }; +/** + * Occurs when an InvoicePayment transitions to paid with a non-zero amount_overpaid. + */ export type InvoicePaymentOverpaidModel = { 'object': InvoicePaymentModel; }; +/** + * Occurs whenever an invoice payment attempt requires further user action to complete. + */ export type InvoicePaymentActionRequiredModel = { 'object': InvoiceModel; }; +/** + * Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe. + */ export type InvoicePaymentAttemptRequiredModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method. + */ export type InvoicePaymentFailedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice payment attempt succeeds. + */ export type InvoicePaymentSucceededModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice email is sent out. + */ export type InvoiceSentModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). Note: The received `Invoice` object will not have an invoice ID. + */ export type InvoiceUpcomingModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice changes (e.g., the invoice amount). + */ export type InvoiceUpdatedModel = { 'object': InvoiceModel; }; +/** + * Occurs whenever an invoice is voided. + */ export type InvoiceVoidedModel = { 'object': InvoiceModel; }; +/** + * Occurs X number of days before an invoice becomes due—where X is determined by Automations + */ export type InvoiceWillBeDueModel = { 'object': InvoiceModel; }; +/** + * Occurs when an InvoicePayment is successfully paid. + */ export type InvoicePaymentPaidModel = { 'object': InvoicePaymentModel; }; +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export type InvoiceRenderingTemplateModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * A brief description of the template, hidden from customers + */ 'nickname': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoice_rendering_template'; + /** + * The status of the template, one of `active` or `archived`. + */ 'status': 'active' | 'archived'; + /** + * Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + */ 'version': number; }; export type InvoiceSettingQuoteSettingModel = { + /** + * 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; 'issuer': ConnectAccountReferenceModel; }; export type ProrationDetailsModel = { + /** + * Discount amounts applied when the proration was created. + */ 'discount_amounts': DiscountsResourceDiscountAmountModel[]; }; +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export type InvoiceitemModel = { + /** + * Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + */ 'amount': number; + /** + * 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; + /** + * The ID of the customer who will be billed when this invoice item is billed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The ID of the account who will be billed when this invoice item is billed. + */ 'customer_account'?: string | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'date': number; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * If true, discounts will apply to this invoice item. Always false for prorations. + */ 'discountable': boolean; + /** + * The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The ID of the invoice this invoice item belongs to. + */ 'invoice': string | InvoiceModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ '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 | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The amount after discounts, but before credits and taxes. This field is `null` for `discountable=true` items. + */ 'net_amount'?: number | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'invoiceitem'; + /** + * The parent that generated this invoice item. + */ 'parent': BillingBillResourceInvoiceItemParentsInvoiceItemParentModel; 'period': InvoiceLineItemPeriodModel; + /** + * The pricing information of the invoice item. + */ 'pricing': BillingBillResourceInvoicingPricingPricingModel; + /** + * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + */ 'proration': boolean; 'proration_details'?: ProrationDetailsModel | undefined; + /** + * Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + */ 'quantity': number; + /** + * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + */ 'tax_rates': TaxRateModel[]; + /** + * ID of the test clock this invoice item belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; }; +/** + * Occurs whenever an invoice item is created. + */ export type InvoiceitemCreatedModel = { 'object': InvoiceitemModel; }; +/** + * Occurs whenever an invoice item is deleted. + */ export type InvoiceitemDeletedModel = { 'object': InvoiceitemModel; }; export type IssuingComplianceCreditUnderwritingRecordApplicationModel = { + /** + * The channel through which the applicant has submitted their application. + */ 'application_method': 'in_person' | 'mail' | 'online' | 'phone'; + /** + * Scope of demand made by the applicant. + */ 'purpose': 'credit_limit_increase' | 'credit_line_opening'; + /** + * Date when the applicant submitted their application. + */ 'submitted_at': number; }; export type IssuingComplianceCreditUnderwritingRecordCreditUserModel = { + /** + * Email of the applicant or accountholder. + */ 'email': string; + /** + * Full name of the company or person. + */ 'name': string; }; export type IssuingComplianceCreditUnderwritingRecordDecisionTypeApplicationRejectedModel = { + /** + * Details about the `reasons.other` when present. + */ 'reason_other_explanation': string; + /** + * List of reasons why the application was rejected up to 4 reasons, in order of importance. + */ 'reasons': Array<'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' | 'foreclosure_or_repossession' | 'frozen_file_at_credit_bureau' | 'garnishment_or_attachment' | 'government_loan_program_criteria' | 'high_concentration_of_clients' | 'high_risk_industry' | '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_deposits' | 'insufficient_income' | 'insufficient_margin_ratio' | 'insufficient_operating_profit' | 'insufficient_period_in_operation' | 'insufficient_reserves' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_time_in_network' | 'insufficient_trade_credit_insurance' | 'invalid_business_license' | 'lacking_cash_account' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' | 'no_credit_file' | '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' | 'recent_inquiries_on_business_credit_report' | 'removal_of_bank_account_connection' | 'revenue_discrepancy' | 'runway_too_short' | 'suspected_fraud' | 'too_many_non_sufficient_funds_or_overdrafts' | 'unable_to_verify_address' | 'unable_to_verify_identity' | 'unable_to_verify_income_or_revenue' | 'unprofitable' | 'unsupportable_business_type'>; }; export type IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLimitApprovedModel = { + /** + * Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + */ 'amount': number; + /** + * 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; }; export type IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLimitDecreasedModel = { + /** + * Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + */ 'amount': number; + /** + * 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; + /** + * Details about the `reasons.other` when present. + */ 'reason_other_explanation': string; + /** + * List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + */ 'reasons': Array<'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' | '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' | 'high_risk_industry' | '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_margin_ratio' | 'insufficient_operating_profit' | 'insufficient_period_in_operation' | 'insufficient_reserves' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_time_in_network' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' | 'invalid_business_license' | 'lacking_cash_account' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' | 'no_credit_file' | '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' | 'recent_inquiries_on_business_credit_report' | 'removal_of_bank_account_connection' | 'revenue_discrepancy' | 'runway_too_short' | 'suspected_fraud' | 'too_many_non_sufficient_funds_or_overdrafts' | 'unable_to_verify_address' | 'unable_to_verify_identity' | 'unable_to_verify_income_or_revenue' | 'unprofitable' | 'unsupportable_business_type'>; }; export type IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLineClosedModel = { + /** + * Details about the `reasons.other` when present. + */ 'reason_other_explanation': string; + /** + * List of reasons why the existing account was closed, up to 4 reasons, in order of importance. + */ 'reasons': Array<'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' | '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' | 'high_risk_industry' | '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_margin_ratio' | 'insufficient_operating_profit' | 'insufficient_period_in_operation' | 'insufficient_reserves' | 'insufficient_revenue' | 'insufficient_social_media_performance' | 'insufficient_time_in_network' | 'insufficient_trade_credit_insurance' | 'insufficient_usage_as_qualified_expenses' | 'invalid_business_license' | 'lacking_cash_account' | 'late_payment_history_reported_to_bureau' | 'lien_collection_action_or_judgement' | 'negative_public_information' | 'no_credit_file' | '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' | 'recent_inquiries_on_business_credit_report' | 'removal_of_bank_account_connection' | 'revenue_discrepancy' | 'runway_too_short' | 'suspected_fraud' | 'too_many_non_sufficient_funds_or_overdrafts' | 'unable_to_verify_address' | 'unable_to_verify_identity' | 'unable_to_verify_income_or_revenue' | 'unprofitable' | 'unsupportable_business_type'>; }; export type IssuingComplianceCreditUnderwritingRecordDecisionModel = { + /** + * Details about a decision application_rejected. + */ 'application_rejected': IssuingComplianceCreditUnderwritingRecordDecisionTypeApplicationRejectedModel; + /** + * Details about a decision credit_limit_approved. + */ 'credit_limit_approved': IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLimitApprovedModel; + /** + * Details about a decision credit_limit_decreased. + */ 'credit_limit_decreased': IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLimitDecreasedModel; + /** + * Details about a decision credit_line_closed. + */ 'credit_line_closed': IssuingComplianceCreditUnderwritingRecordDecisionTypeCreditLineClosedModel; + /** + * Outcome of the decision. + */ 'type': 'additional_information_requested' | 'application_rejected' | 'credit_limit_approved' | 'credit_limit_decreased' | 'credit_line_closed' | 'no_changes' | 'withdrawn_by_applicant'; }; export type IssuingComplianceCreditUnderwritingRecordUnderwritingExceptionModel = { + /** + * Written explanation for the exception. + */ 'explanation': string; + /** + * The decision before the exception was applied. + */ 'original_decision_type': 'additional_information_requested' | 'application_rejected' | 'credit_limit_approved' | 'credit_limit_decreased' | 'credit_line_closed' | 'no_changes' | 'withdrawn_by_applicant'; }; +/** + * 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/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. + */ export type IssuingCreditUnderwritingRecordModel = { + /** + * For decisions triggered by an application, details about the submission. + */ 'application': IssuingComplianceCreditUnderwritingRecordApplicationModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The event that triggered the underwriting. + */ 'created_from': 'application' | 'proactive_review'; 'credit_user': IssuingComplianceCreditUnderwritingRecordCreditUserModel; + /** + * Date when a decision was made. + */ 'decided_at': number; + /** + * Details about the decision. + */ 'decision': IssuingComplianceCreditUnderwritingRecordDecisionModel; + /** + * For underwriting initiated by an application, a decision must be taken 30 days after the submission. + */ 'decision_deadline': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.credit_underwriting_record'; + /** + * File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + */ 'regulatory_reporting_file': string; + /** + * If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + */ 'underwriting_exception': IssuingComplianceCreditUnderwritingRecordUnderwritingExceptionModel; }; export type IssuingDisputeSettlementDetailNetworkDataModel = { + /** + * The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + */ 'processing_date': string; }; +/** + * Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. + */ export type IssuingDisputeSettlementDetailModel = { + /** + * Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + */ 'amount': number; + /** + * The card used to make the original transaction. + */ 'card': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency the original transaction was made in. 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; + /** + * The ID of the linked dispute. + */ 'dispute': string; + /** + * The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. + */ 'event_type': 'filing' | 'loss' | 'representment' | 'win'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] + */ 'network': 'maestro' | 'mastercard' | 'visa'; + /** + * Details about the transaction, such as processing dates, set by the card network. + */ 'network_data': IssuingDisputeSettlementDetailNetworkDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.dispute_settlement_detail'; + /** + * The ID of the linked card network settlement. + */ 'settlement': string; }; +/** + * A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. + */ export type IssuingFraudLiabilityDebitModel = { + /** + * Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. + */ 'amount': number; + /** + * ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. + */ 'balance_transaction': string | BalanceTransactionModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The currency of the debit. 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; + /** + * The ID of the linked dispute. + */ 'dispute': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'issuing.fraud_liability_debit'; }; +/** + * Occurs whenever an authorization is created. + */ export type IssuingAuthorizationCreatedModel = { 'object': IssuingAuthorizationModel; }; +/** + * Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling). + */ export type IssuingAuthorizationRequestModel = { 'object': IssuingAuthorizationModel; }; +/** + * Occurs whenever an authorization is updated. + */ export type IssuingAuthorizationUpdatedModel = { 'object': IssuingAuthorizationModel; }; +/** + * Occurs whenever a card is created. + */ export type IssuingCardCreatedModel = { 'object': IssuingCardModel; }; +/** + * Occurs whenever a card is updated. + */ export type IssuingCardUpdatedModel = { 'object': IssuingCardModel; }; +/** + * Occurs whenever a cardholder is created. + */ export type IssuingCardholderCreatedModel = { 'object': IssuingCardholderModel; }; +/** + * Occurs whenever a cardholder is updated. + */ export type IssuingCardholderUpdatedModel = { 'object': IssuingCardholderModel; }; +/** + * Occurs whenever a dispute is won, lost or expired. + */ export type IssuingDisputeClosedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is created. + */ export type IssuingDisputeCreatedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever funds are reinstated to your account for an Issuing dispute. + */ export type IssuingDisputeFundsReinstatedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever funds are deducted from your account for an Issuing dispute. + */ export type IssuingDisputeFundsRescindedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is submitted. + */ export type IssuingDisputeSubmittedModel = { 'object': IssuingDisputeModel; }; +/** + * Occurs whenever a dispute is updated. + */ export type IssuingDisputeUpdatedModel = { 'object': IssuingDisputeModel; }; +/** + * Emitted when the DisputeSettlementDetail object is created + */ export type IssuingDisputeSettlementDetailCreatedModel = { 'object': IssuingDisputeSettlementDetailModel; }; +/** + * Emitted when the DisputeSettlementDetail object is updated + */ export type IssuingDisputeSettlementDetailUpdatedModel = { 'object': IssuingDisputeSettlementDetailModel; }; +/** + * Occurs whenever funds are deducted from your account for fraud dispute loss liability. + */ export type IssuingFraudLiabilityDebitCreatedModel = { 'object': IssuingFraudLiabilityDebitModel; }; +/** + * Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it. + */ export type IssuingPersonalizationDesignActivatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it. + */ export type IssuingPersonalizationDesignDeactivatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is rejected by design review. + */ export type IssuingPersonalizationDesignRejectedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever a personalization design is updated. + */ export type IssuingPersonalizationDesignUpdatedModel = { 'object': IssuingPersonalizationDesignModel; }; +/** + * Occurs whenever an issuing settlement is created. + */ export type IssuingSettlementCreatedModel = { 'object': IssuingSettlementModel; }; +/** + * Occurs whenever an issuing settlement is updated. + */ export type IssuingSettlementUpdatedModel = { 'object': IssuingSettlementModel; }; +/** + * Occurs whenever an issuing digital wallet token is created. + */ export type IssuingTokenCreatedModel = { 'object': IssuingTokenModel; }; +/** + * Occurs whenever an issuing digital wallet token is updated. + */ export type IssuingTokenUpdatedModel = { 'object': IssuingTokenModel; }; +/** + * Occurs whenever an issuing transaction is created. + */ export type IssuingTransactionCreatedModel = { 'object': IssuingTransactionModel; }; +/** + * Occurs whenever an issuing transaction is updated with receipt data. + */ export type IssuingTransactionPurchaseDetailsReceiptUpdatedModel = { 'object': IssuingTransactionModel; }; +/** + * Occurs whenever an issuing transaction is updated. + */ export type IssuingTransactionUpdatedModel = { 'object': IssuingTransactionModel; }; +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export type LoginLinkModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'login_link'; + /** + * The URL for the login link. + */ 'url': string; }; +/** + * Occurs whenever a Mandate is updated. + */ export type MandateUpdatedModel = { 'object': MandateModel; }; export type OrdersV2ResourceAutomaticTaxModel = { + /** + * Whether Stripe automatically computes tax on this Order. + */ 'enabled': boolean; + /** + * The status of the most recent automated tax calculation for this Order. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type OrdersV2ResourceBillingDetailsModel = { + /** + * Billing address for the order. + */ 'address': AddressModel; + /** + * Email address for the order. + */ 'email': string; + /** + * Full name for the order. + */ 'name': string; + /** + * Billing phone number for the order (including extension). + */ 'phone': string; }; export type OrdersV2ResourceAutomaticPaymentMethodsModel = { + /** + * Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + */ 'enabled': boolean; }; export type OrdersPaymentMethodOptionsAfterpayClearpayModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'automatic' | 'automatic_async' | 'manual' | undefined; + /** + * Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + */ 'reference': string; + /** + * Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * 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). + * + * 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'?: 'none' | undefined; }; export type OrdersV2ResourceCardPaymentMethodOptionsModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method': 'automatic' | 'automatic_async' | 'manual'; + /** + * Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * 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). + * + * 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'?: 'none' | 'off_session' | 'on_session' | undefined; }; @@ -10495,142 +26737,384 @@ export type OrdersV2ResourcePaymentMethodOptionsModel = { }; export type OrdersV2ResourceTransferDataModel = { + /** + * The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + */ 'amount': number; + /** + * ID of the Connected account receiving the transfer. + */ 'destination': string | AccountModel; }; export type OrdersV2ResourcePaymentSettingsModel = { + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + */ 'application_fee_amount': number; + /** + * Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. + */ 'automatic_payment_methods': OrdersV2ResourceAutomaticPaymentMethodsModel; + /** + * PaymentMethod-specific configuration to provide to the order's PaymentIntent. + */ 'payment_method_options': OrdersV2ResourcePaymentMethodOptionsModel; + /** + * The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + */ 'payment_method_types': Array<'acss_debit' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'card' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' | 'link' | 'oxxo' | 'p24' | 'paypal' | 'sepa_debit' | 'sofort' | 'wechat_pay'>; + /** + * The URL to redirect the customer to after they authenticate their payment. + */ 'return_url': string; + /** + * For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + */ 'statement_descriptor': string; + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ 'statement_descriptor_suffix': string; + /** + * Provides configuration for completing a transfer for the order after it is paid. + */ 'transfer_data': OrdersV2ResourceTransferDataModel; }; export type OrdersV2ResourcePaymentModel = { + /** + * ID of the payment intent associated with this order. Null when the order is `open`. + */ 'payment_intent': string | PaymentIntentModel; + /** + * Settings describing how the order should configure generated PaymentIntents. + */ 'settings': OrdersV2ResourcePaymentSettingsModel; + /** + * The status of the underlying payment associated with this order, if any. Null when the order is `open`. + */ 'status': 'canceled' | 'complete' | 'not_required' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method'; }; export type OrdersV2ResourceShippingCostModel = { + /** + * Total shipping cost before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ 'amount_tax': number; + /** + * Total shipping cost after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The ID of the ShippingRate for this order. + */ 'shipping_rate': string | ShippingRateModel; + /** + * The taxes applied to the shipping rate. + */ 'taxes'?: LineItemsTaxAmountModel[] | undefined; }; export type OrdersV2ResourceShippingDetailsModel = { + /** + * Recipient shipping address. Required if the order includes products that are shippable. + */ 'address': AddressModel; + /** + * Recipient name. + */ 'name': string; + /** + * Recipient phone (including extension). + */ 'phone': string; }; export type OrdersV2ResourceTaxDetailsResourceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type OrdersV2ResourceTaxDetailsModel = { + /** + * Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + */ 'tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The purchaser's tax IDs to be used in calculation of tax for this Order. + */ 'tax_ids': OrdersV2ResourceTaxDetailsResourceTaxIdModel[]; }; export type OrdersV2ResourceTotalDetailsApiResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type OrdersV2ResourceTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: OrdersV2ResourceTotalDetailsApiResourceBreakdownModel | undefined; }; +/** + * An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. + * + * Related guide: [Orders overview](https://stripe.com/docs/orders) + */ export type OrderModel = { + /** + * Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + */ 'amount_subtotal': number; + /** + * Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + */ 'amount_total': number; + /** + * ID of the Connect application that created the Order, if any. + */ 'application': string | ApplicationModel; 'automatic_tax'?: OrdersV2ResourceAutomaticTaxModel | undefined; + /** + * Customer billing details associated with the order. + */ 'billing_details': OrdersV2ResourceBillingDetailsModel; + /** + * The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ 'client_secret': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer which this orders belongs to. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The discounts applied to the order. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A recent IP address of the purchaser used for tax reporting and tax location inference. + */ 'ip_address': string; + /** + * A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'order'; 'payment': OrdersV2ResourcePaymentModel; + /** + * The details of the customer cost of shipping, including the customer chosen ShippingRate. + */ 'shipping_cost': OrdersV2ResourceShippingCostModel; + /** + * Customer shipping information associated with the order. + */ 'shipping_details': OrdersV2ResourceShippingDetailsModel; + /** + * The overall status of the order. + */ 'status': 'canceled' | 'complete' | 'open' | 'processing' | 'submitted'; 'tax_details'?: OrdersV2ResourceTaxDetailsModel | undefined; 'total_details': OrdersV2ResourceTotalDetailsModel; }; export type OutboundPaymentsPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundPaymentsPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type OutboundPaymentsPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundPaymentsPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundPayment. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundPaymentsPaymentMethodDetailsUsBankAccountModel | undefined; }; export type OutboundTransfersPaymentMethodDetailsFinancialAccountModel = { + /** + * Token of the FinancialAccount. + */ 'id': string; + /** + * The rails used to send funds. + */ 'network': 'stripe'; }; export type OutboundTransfersPaymentMethodDetailsUsBankAccountModel = { + /** + * Account holder type: individual or company. + */ 'account_holder_type': 'company' | 'individual'; + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ 'account_type': 'checking' | 'savings'; + /** + * Name of the bank associated with the bank account. + */ 'bank_name': string; + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ 'fingerprint': string; + /** + * Last four digits of the bank account number. + */ 'last4': string; + /** + * ID of the mandate used to make this payment. + */ 'mandate'?: string | MandateModel | undefined; + /** + * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + */ 'network': 'ach' | 'us_domestic_wire'; + /** + * Routing number of the bank account. + */ 'routing_number': string; }; export type OutboundTransfersPaymentMethodDetailsModel = { 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: OutboundTransfersPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * The type of the payment method used in the OutboundTransfer. + */ 'type': 'financial_account' | 'us_bank_account'; 'us_bank_account'?: OutboundTransfersPaymentMethodDetailsUsBankAccountModel | undefined; }; +/** + * A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. + * Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment + * method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record + * can have guaranteed funds. + */ export type PaymentAttemptRecordModel = { 'amount': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmountModel; @@ -10639,21 +27123,60 @@ export type PaymentAttemptRecordModel = { 'amount_guaranteed': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_refunded': PaymentsPrimitivesPaymentRecordsResourceAmountModel; 'amount_requested': PaymentsPrimitivesPaymentRecordsResourceAmountModel; + /** + * ID of the Connect application that created the PaymentAttemptRecord. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Customer information for this payment. + */ 'customer_details': PaymentsPrimitivesPaymentRecordsResourceCustomerDetailsModel; + /** + * Indicates whether the customer was present in your checkout flow during this payment. + */ 'customer_presence': 'off_session' | 'on_session'; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_attempt_record'; + /** + * Information about the Payment Method debited for this payment. + */ 'payment_method_details': PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetailsModel; + /** + * ID of the Payment Record this Payment Attempt Record belongs to. + */ 'payment_record': string; 'processor_details': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsModel; + /** + * Indicates who reported the payment. + */ 'reported_by': 'self' | 'stripe'; + /** + * Shipping information for this payment. + */ 'shipping_details': PaymentsPrimitivesPaymentRecordsResourceShippingDetailsModel; }; @@ -10666,85 +27189,179 @@ export type PaymentFlowsInstallmentOptionsModel = { 'plan'?: PaymentMethodDetailsCardInstallmentsPlanModel | undefined; }; +/** + * Occurs when a PaymentIntent has funds to be captured. Check the `amount_capturable` property on the PaymentIntent to determine the amount that can be captured. You may capture the PaymentIntent with an `amount_to_capture` value up to the specified amount. [Learn more about capturing PaymentIntents.](https://docs.stripe.com/api/payment_intents/capture) + */ export type PaymentIntentAmountCapturableUpdatedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent is canceled. + */ export type PaymentIntentCanceledModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a new PaymentIntent is created. + */ export type PaymentIntentCreatedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes. + */ export type PaymentIntentPartiallyFundedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. + */ export type PaymentIntentPaymentFailedModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has started processing. + */ export type PaymentIntentProcessingModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent transitions to requires_action state + */ export type PaymentIntentRequiresActionModel = { 'object': PaymentIntentModel; }; +/** + * Occurs when a PaymentIntent has successfully completed payment. + */ export type PaymentIntentSucceededModel = { 'object': PaymentIntentModel; }; export type PaymentIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Controls when the funds will be captured from the customer's account. + */ 'capture_method'?: 'manual' | 'manual_preferred' | undefined; 'installments'?: PaymentFlowsInstallmentOptionsModel | undefined; + /** + * 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 | undefined; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + */ 'require_cvc_recollection'?: boolean | undefined; 'routing'?: PaymentMethodOptionsCardPresentRoutingModel | undefined; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + */ 'setup_future_usage'?: 'none' | 'off_session' | 'on_session' | undefined; + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; +/** + * Occurs when a payment link is created. + */ export type PaymentLinkCreatedModel = { 'object': PaymentLinkModel; }; +/** + * Occurs when a payment link is updated. + */ export type PaymentLinkUpdatedModel = { 'object': PaymentLinkModel; }; +/** + * Occurs whenever a new payment method is attached to a customer. + */ export type PaymentMethodAttachedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method's details are automatically updated by the network. + */ export type PaymentMethodAutomaticallyUpdatedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method is detached from a customer. + */ export type PaymentMethodDetachedModel = { 'object': PaymentMethodModel; }; +/** + * Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update). + */ export type PaymentMethodUpdatedModel = { 'object': PaymentMethodModel; }; export type PaymentMethodConfigResourceDisplayPreferenceModel = { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ 'overridable': boolean; + /** + * The account's display preference. + */ 'preference': 'none' | 'off' | 'on'; + /** + * The effective display preference value. + */ 'value': 'off' | 'on'; }; export type PaymentMethodConfigResourcePaymentMethodPropertiesModel = { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ 'available': boolean; 'display_preference': PaymentMethodConfigResourceDisplayPreferenceModel; }; +/** + * PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. + * + * There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): + * + * **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + * + * **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + * + * Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. + * + * Related guides: + * - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) + * - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + * - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) + */ export type PaymentMethodConfigurationModel = { 'acss_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Whether the configuration can be used for new payments. + */ 'active': boolean; 'affirm'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'afterpay_clearpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -10752,6 +27369,9 @@ export type PaymentMethodConfigurationModel = { 'alma'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'amazon_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'apple_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the Connect application associated with the configuration. + */ 'application': string; 'au_becs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'bacs_debit'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -10770,9 +27390,15 @@ export type PaymentMethodConfigurationModel = { 'google_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'gopay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'grabpay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; 'id_bank_transfer'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'ideal'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The default configuration is used whenever a payment method configuration is not specified. + */ 'is_default': boolean; 'jcb'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kakao_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -10780,16 +27406,28 @@ export type PaymentMethodConfigurationModel = { 'konbini'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'kr_card'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'link'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'mb_way'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'mobilepay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'multibanco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * The configuration's name. + */ 'name': string; 'naver_pay'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'nz_bank_account'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_configuration'; 'oxxo'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'p24'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; + /** + * For child configs, the configuration's parent configuration. + */ 'parent': string; 'pay_by_bank'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; 'payco'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; @@ -10813,269 +27451,623 @@ export type PaymentMethodConfigurationModel = { 'zip'?: PaymentMethodConfigResourcePaymentMethodPropertiesModel | undefined; }; +/** + * Contains additional details about the status of a payment method for a specific payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusDetailsModel = { + /** + * The error message associated with the status of the payment method on the domain. + */ 'error_message': string; }; +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export type PaymentMethodDomainResourcePaymentMethodStatusModel = { + /** + * The status of the payment method on the domain. + */ 'status': 'active' | 'inactive'; 'status_details'?: PaymentMethodDomainResourcePaymentMethodStatusDetailsModel | undefined; }; +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export type PaymentMethodDomainModel = { 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The domain name that this payment method domain object represents. + */ 'domain_name': string; + /** + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + */ 'enabled': boolean; 'google_pay': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Unique identifier for the object. + */ 'id': string; 'klarna': PaymentMethodDomainResourcePaymentMethodStatusModel; 'link': PaymentMethodDomainResourcePaymentMethodStatusModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'payment_method_domain'; 'paypal': PaymentMethodDomainResourcePaymentMethodStatusModel; }; +/** + * Occurs whenever a payout is canceled. + */ export type PayoutCanceledModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is created. + */ export type PayoutCreatedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout attempt fails. + */ export type PayoutFailedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is *expected* to be available in the destination account. If the payout fails, a `payout.failed` notification is also sent, at a later time. + */ export type PayoutPaidModel = { 'object': PayoutModel; }; +/** + * Occurs whenever balance transactions paid out in an automatic payout can be queried. + */ export type PayoutReconciliationCompletedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a payout is updated. + */ export type PayoutUpdatedModel = { 'object': PayoutModel; }; +/** + * Occurs whenever a person associated with an account is created. + */ export type PersonCreatedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a person associated with an account is deleted. + */ export type PersonDeletedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a person associated with an account is updated. + */ export type PersonUpdatedModel = { 'object': PersonModel; }; +/** + * Occurs whenever a plan is created. + */ export type PlanCreatedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a plan is deleted. + */ export type PlanDeletedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a plan is updated. + */ export type PlanUpdatedModel = { 'object': PlanModel; }; +/** + * Occurs whenever a price is created. + */ export type PriceCreatedModel = { 'object': PriceModel; }; +/** + * Occurs whenever a price is deleted. + */ export type PriceDeletedModel = { 'object': PriceModel; }; +/** + * Occurs whenever a price is updated. + */ export type PriceUpdatedModel = { 'object': PriceModel; }; +/** + * The objects to redact, grouped by type. All redactable objects associated with these objects will be redacted as well. + */ export type RedactionResourceRootObjectsModel = { + /** + * Charge object identifiers usually starting with `ch_` + */ 'charges': string[]; + /** + * CheckoutSession object identifiers starting with `cs_` + */ 'checkout_sessions': string[]; + /** + * Customer object identifiers starting with `cus_` + */ 'customers': string[]; + /** + * Identity VerificationSessions object identifiers starting with `vs_` + */ 'identity_verification_sessions': string[]; + /** + * Invoice object identifiers starting with `in_` + */ 'invoices': string[]; + /** + * Issuing Cardholder object identifiers starting with `ich_` + */ 'issuing_cardholders': string[]; + /** + * PaymentIntent object identifiers starting with `pi_` + */ 'payment_intents': string[]; + /** + * Fraud ValueListItem object identifiers starting with `rsli_` + */ 'radar_value_list_items': string[]; + /** + * SetupIntent object identifiers starting with `seti_` + */ 'setup_intents': string[]; }; +/** + * The Redaction Job object redacts Stripe objects. You can use it + * to coordinate the removal of personal information from selected + * objects, making them permanently inaccessible in the Stripe Dashboard + * and API. + */ export type PrivacyRedactionJobModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'privacy.redaction_job'; + /** + * The objects to redact in this job. + */ 'objects'?: RedactionResourceRootObjectsModel | undefined; + /** + * The status of the job. + */ 'status': 'canceled' | 'canceling' | 'created' | 'failed' | 'ready' | 'redacting' | 'succeeded' | 'validating'; + /** + * Validation behavior determines how a job validates objects for redaction eligibility. Default is `error`. + */ 'validation_behavior': 'error' | 'fix'; }; +/** + * Occurs whenever a redaction job is canceled. + */ export type PrivacyRedactionJobCanceledModel = { 'object': PrivacyRedactionJobModel; }; +/** + * Occurs whenever a redaction job is created. + */ export type PrivacyRedactionJobCreatedModel = { 'object': PrivacyRedactionJobModel; }; +/** + * Occurs whenever a redaction job has been successfully validated and is ready to run. + */ export type PrivacyRedactionJobReadyModel = { 'object': PrivacyRedactionJobModel; }; +/** + * Occurs whenever a redaction job finishes running. + */ export type PrivacyRedactionJobSucceededModel = { 'object': PrivacyRedactionJobModel; }; +/** + * Occurs whenever a redaction job fails validation. + */ export type PrivacyRedactionJobValidationErrorModel = { 'object': PrivacyRedactionJobModel; }; +/** + * If a Redaction Job Validation Error occurred because of a specific object, this will contain its identifier and object type. + */ export type RedactionResourceErroringObjectModel = { + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Erroring object type + */ 'object_type': string; }; +/** + * The Redaction Job validation error object contains information about + * errors that affect the ability to redact a specific object in a + * redaction job. + */ export type PrivacyRedactionJobValidationError_1Model = { + /** + * A code indicating the reason for the error. + */ 'code': 'invalid_cascading_source' | 'invalid_file_purpose' | 'invalid_state' | 'locked_by_other_job' | 'too_many_objects'; + /** + * If the error is related to a specific object, this field includes the object's identifier and object type. + */ 'erroring_object': RedactionResourceErroringObjectModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * A human-readable message providing more details about the error. + */ 'message': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'privacy.redaction_job_validation_error'; }; +/** + * Occurs whenever a product is created. + */ export type ProductCreatedModel = { 'object': ProductModel; }; +/** + * Occurs whenever a product is deleted. + */ export type ProductDeletedModel = { 'object': ProductModel; }; +/** + * Occurs whenever a product is updated. + */ export type ProductUpdatedModel = { 'object': ProductModel; }; +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export type ProductFeatureModel = { 'entitlement_feature': EntitlementsFeatureModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'product_feature'; }; +/** + * Occurs whenever a promotion code is created. + */ export type PromotionCodeCreatedModel = { 'object': PromotionCodeModel; }; +/** + * Occurs whenever a promotion code is updated. + */ export type PromotionCodeUpdatedModel = { 'object': PromotionCodeModel; }; export type QuotesResourceAutomaticTaxModel = { + /** + * Automatically calculate taxes + */ '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': ConnectAccountReferenceModel; + /** + * The tax provider powering automatic tax. + */ 'provider': string; + /** + * The status of the most recent automated tax calculation for this quote. + */ 'status': 'complete' | 'failed' | 'requires_location_inputs'; }; export type QuotesCoreApiResourceReestimateFailureModel = { + /** + * The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. + */ 'failure_code': string; + /** + * Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". + */ 'message': string; + /** + * The reason the reestimation failed. + */ 'reason': 'automation_failure' | 'internal_error'; }; export type QuotesCoreApiResourceLastReestimateDetailsModel = { + /** + * When `status` is `failed`, provides details about the quote reestimation failure. + */ 'failed': QuotesCoreApiResourceReestimateFailureModel; + /** + * Latest status of the reestimation. + */ 'status': 'failed' | 'in_progress' | 'succeeded'; }; export type QuotesResourceTotalDetailsResourceBreakdownModel = { + /** + * The aggregated discounts. + */ 'discounts': LineItemsDiscountAmountModel[]; + /** + * The aggregated tax amounts by rate. + */ 'taxes': LineItemsTaxAmountModel[]; }; export type QuotesResourceTotalDetailsModel = { + /** + * This is the sum of all the discounts. + */ 'amount_discount': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * This is the sum of all the tax amounts. + */ 'amount_tax': number; 'breakdown'?: QuotesResourceTotalDetailsResourceBreakdownModel | undefined; }; export type QuotesResourceRecurringModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ 'interval_count': number; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceUpfrontModel = { + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; 'total_details': QuotesResourceTotalDetailsModel; }; export type QuotesResourceComputedModel = { + /** + * Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. + */ 'last_reestimation_details'?: QuotesCoreApiResourceLastReestimateDetailsModel | undefined; + /** + * The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + */ 'recurring': QuotesResourceRecurringModel; + /** + * The time at which the quote's estimated schedules and upcoming invoices were generated. + */ 'updated_at'?: number | undefined; 'upfront': QuotesResourceUpfrontModel; }; export type QuotesResourceFromQuoteModel = { + /** + * Whether this quote is a revision of a different quote. + */ 'is_revision': boolean; + /** + * The quote that was cloned. + */ 'quote': string | QuoteModel; }; export type QuotesResourceStatusDetailsCanceledStatusDetailsModel = { + /** + * The reason this quote was marked as canceled. + */ 'reason': 'canceled' | 'quote_accepted' | 'quote_expired' | 'quote_superseded' | 'subscription_canceled'; + /** + * Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. + */ 'transitioned_at': number; }; export type QuotesResourceStatusDetailsLinesInvalidModel = { + /** + * The timestamp at which the lines were marked as invalid. + */ 'invalid_at': number; + /** + * The list of lines that became invalid at the given timestamp. + */ 'lines': string[]; }; export type QuotesResourceStatusDetailsSubscriptionChangedModel = { + /** + * The subscription's state before the quote was marked as stale. + */ 'previous_subscription': SubscriptionModel; }; export type QuotesResourceStatusDetailsSubscriptionScheduleChangedModel = { + /** + * The subscription schedule's state before the quote was marked as stale. + */ 'previous_subscription_schedule': SubscriptionScheduleModel; }; export type QuotesResourceStatusDetailsStaleReasonModel = { + /** + * The ID of the line that is invalid if the stale reason type is `line_invalid`. + */ 'line_invalid'?: string | undefined; + /** + * The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. + */ 'lines_invalid'?: QuotesResourceStatusDetailsLinesInvalidModel[] | undefined; + /** + * The user supplied mark stale reason. + */ 'marked_stale'?: string | undefined; + /** + * The ID of the subscription that was canceled. + */ 'subscription_canceled'?: string | undefined; 'subscription_changed'?: QuotesResourceStatusDetailsSubscriptionChangedModel | undefined; + /** + * The ID of the subscription that was expired. + */ 'subscription_expired'?: string | undefined; + /** + * The ID of the subscription schedule that was canceled. + */ 'subscription_schedule_canceled'?: string | undefined; 'subscription_schedule_changed'?: QuotesResourceStatusDetailsSubscriptionScheduleChangedModel | undefined; + /** + * The ID of the subscription schedule that was released. + */ 'subscription_schedule_released'?: string | undefined; + /** + * The reason the quote was marked as stale. + */ 'type': 'accept_failed_validations' | 'bill_on_acceptance_invalid' | 'line_invalid' | 'lines_invalid' | 'marked_stale' | 'subscription_canceled' | 'subscription_changed' | 'subscription_expired' | 'subscription_schedule_canceled' | 'subscription_schedule_changed' | 'subscription_schedule_released'; }; export type QuotesResourceStatusDetailsStaleStatusDetailsModel = { + /** + * Time at which the quote expires. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * The most recent reason this quote was marked as stale. + */ 'last_reason': QuotesResourceStatusDetailsStaleReasonModel; + /** + * Time at which the stale reason was updated. Measured in seconds since the Unix epoch. + */ 'last_updated_at': number; + /** + * Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. + */ 'transitioned_at': number; }; @@ -11085,42 +28077,99 @@ export type QuotesResourceStatusDetailsStatusDetailsModel = { }; export type QuotesResourceStatusTransitionsModel = { + /** + * The time that the quote was accepted. Measured in seconds since Unix epoch. + */ 'accepted_at': number; + /** + * The time that the quote was canceled. Measured in seconds since Unix epoch. + */ 'canceled_at': number; + /** + * The time that the quote was finalized. Measured in seconds since Unix epoch. + */ 'finalized_at': number; }; export type QuotesResourceQuoteLinesTimestampHelpersLineIdModel = { + /** + * Unique identifier for the object. + */ 'id': string; }; export type QuotesResourceSubscriptionDataBillFromModel = { + /** + * The materialized time. + */ 'computed': number; + /** + * The timestamp the given line starts at. + */ 'line_starts_at': QuotesResourceQuoteLinesTimestampHelpersLineIdModel; + /** + * A precise Unix timestamp. + */ 'timestamp': number; + /** + * The type of method to specify the `bill_from` time. + */ 'type': 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp'; }; export type QuotesResourceQuoteLinesTimestampHelpersDurationModel = { + /** + * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + */ 'interval': 'day' | 'month' | 'week' | 'year'; + /** + * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + */ 'interval_count': number; }; export type QuotesResourceSubscriptionDataBillUntilModel = { + /** + * The materialized time. + */ 'computed': number; + /** + * Time span for the quote line starting from the `starts_at` date. + */ 'duration': QuotesResourceQuoteLinesTimestampHelpersDurationModel; + /** + * The timestamp the given line ends at. + */ 'line_ends_at': QuotesResourceQuoteLinesTimestampHelpersLineIdModel; + /** + * A precise Unix timestamp. + */ 'timestamp': number; + /** + * The type of method to specify the `bill_until` time. + */ 'type': 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice'; }; export type QuotesResourceSubscriptionDataBillOnAcceptanceModel = { + /** + * The start of the period to bill from when the Quote is accepted. + */ 'bill_from': QuotesResourceSubscriptionDataBillFromModel; + /** + * The end of the period to bill until when the Quote is accepted. + */ 'bill_until': QuotesResourceSubscriptionDataBillUntilModel; }; +/** + * The billing mode of the quote. + */ export type QuotesResourceSubscriptionDataBillingModeModel = { 'flexible'?: SubscriptionsResourceBillingModeFlexibleModel | undefined; + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + */ 'type': 'classic' | 'flexible'; }; @@ -11129,745 +28178,2094 @@ export type QuotesResourcePrebillingModel = { }; export type QuotesResourceSubscriptionDataSubscriptionDataModel = { + /** + * Describes the period to bill for upon accepting the quote. + */ 'bill_on_acceptance'?: QuotesResourceSubscriptionDataBillOnAcceptanceModel | undefined; + /** + * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + */ 'billing_behavior'?: 'prorate_on_next_phase' | 'prorate_up_front' | undefined; + /** + * Whether the subscription will always start a new billing period when the quote is accepted. + */ 'billing_cycle_anchor'?: 'reset' | undefined; 'billing_mode': QuotesResourceSubscriptionDataBillingModeModel; + /** + * 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; + /** + * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + */ 'effective_date': number; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. + */ 'end_behavior'?: 'cancel' | 'release' | undefined; + /** + * The id of the subscription that will be updated when the quote is accepted. + */ 'from_subscription'?: string | SubscriptionModel | undefined; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + */ 'metadata': { [key: string]: string; }; + /** + * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + */ 'prebilling'?: QuotesResourcePrebillingModel | undefined; + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + */ 'proration_behavior'?: 'always_invoice' | 'create_prorations' | 'none' | undefined; + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ 'trial_period_days': number; }; export type QuotesResourceQuoteLinesAppliesToModel = { + /** + * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + */ 'new_reference': string; + /** + * The ID of the schedule the line applies to. + */ 'subscription_schedule': string; + /** + * Describes whether the quote line is affecting a new schedule or an existing schedule. + */ 'type': 'new_reference' | 'subscription_schedule'; }; export type QuotesResourceSubscriptionDataSubscriptionDataOverridesModel = { 'applies_to': QuotesResourceQuoteLinesAppliesToModel; + /** + * Describes the period to bill for upon accepting the quote. + */ 'bill_on_acceptance'?: QuotesResourceSubscriptionDataBillOnAcceptanceModel | undefined; + /** + * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + */ 'billing_behavior'?: 'prorate_on_next_phase' | 'prorate_up_front' | undefined; + /** + * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + */ 'customer': string; + /** + * 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; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. + */ 'end_behavior'?: 'cancel' | 'release' | undefined; + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + */ 'proration_behavior'?: 'always_invoice' | 'create_prorations' | 'none' | undefined; }; export type QuotesResourceSubscriptionScheduleWithAppliesToModel = { 'applies_to': QuotesResourceQuoteLinesAppliesToModel; + /** + * The subscription schedule that was created or updated from this quote. + */ 'subscription_schedule': string; }; export type QuotesResourceTransferDataModel = { + /** + * The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ 'amount': number; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + */ 'amount_percent': number; + /** + * The account where funds from the payment will be transferred to upon payment success. + */ 'destination': string | AccountModel; }; +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export type QuoteModel = { + /** + * Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + */ 'allow_backdated_lines'?: boolean | undefined; + /** + * Total before any discounts or taxes are applied. + */ 'amount_subtotal': number; + /** + * Total after discounts and taxes are applied. + */ 'amount_total': number; + /** + * ID of the Connect Application that created the quote. + */ 'application': string | ApplicationModel | DeletedApplicationModel; + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + */ 'application_fee_amount': number; + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + */ 'application_fee_percent': number; 'automatic_tax': QuotesResourceAutomaticTaxModel; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; 'computed': QuotesResourceComputedModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. + */ 'customer_account'?: string | undefined; + /** + * The tax rates applied to this quote. + */ 'default_tax_rates'?: Array | undefined; + /** + * A description that will be displayed on the quote PDF. + */ 'description': string; + /** + * The discounts applied to this quote. + */ 'discounts': Array; + /** + * The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * A footer that will be displayed on the quote PDF. + */ 'footer': string; + /** + * Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + */ 'from_quote': QuotesResourceFromQuoteModel; + /** + * A header that will be displayed on the quote PDF. + */ 'header': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The invoice that was created from this quote. + */ 'invoice': string | InvoiceModel | DeletedInvoiceModel; 'invoice_settings': InvoiceSettingQuoteSettingModel; + /** + * A list of items the customer is being quoted for. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': ItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + */ 'lines'?: string[] | undefined; + /** + * 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': { [key: string]: string; }; + /** + * A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote'; + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ 'on_behalf_of': string | AccountModel; + /** + * The status of the quote. + */ 'status': 'accepted' | 'accepting' | 'canceled' | 'draft' | 'open' | 'stale'; + /** + * Details on when and why a quote has been marked as stale or canceled. + */ 'status_details'?: QuotesResourceStatusDetailsStatusDetailsModel | undefined; 'status_transitions': QuotesResourceStatusTransitionsModel; + /** + * The subscription that was created or updated from this quote. + */ 'subscription': string | SubscriptionModel; 'subscription_data': QuotesResourceSubscriptionDataSubscriptionDataModel; + /** + * List representing overrides for `subscription_data` configurations for specific subscription schedules. + */ 'subscription_data_overrides'?: QuotesResourceSubscriptionDataSubscriptionDataOverridesModel[] | undefined; + /** + * The subscription schedule that was created or updated from this quote. + */ 'subscription_schedule': string | SubscriptionScheduleModel; + /** + * The subscription schedules that were created or updated from this quote. + */ 'subscription_schedules'?: QuotesResourceSubscriptionScheduleWithAppliesToModel[] | undefined; + /** + * ID of the test clock this quote belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; 'total_details': QuotesResourceTotalDetailsModel; + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + */ 'transfer_data': QuotesResourceTransferDataModel; }; +/** + * Occurs whenever a quote acceptance fails + */ export type QuoteAcceptFailedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is accepted. + */ export type QuoteAcceptedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote's status changes to accepting + */ export type QuoteAcceptingModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is canceled. + */ export type QuoteCanceledModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is created. + */ export type QuoteCreatedModel = { 'object': QuoteModel; }; +/** + * Occurs when a quote's status changes from stale to draft + */ export type QuoteDraftModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote is finalized. + */ export type QuoteFinalizedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote reestimate fails + */ export type QuoteReestimateFailedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever an async job to compute preview subscription schedules/upcoming invoices for the quote has completed. + */ export type QuoteReestimatedModel = { 'object': QuoteModel; }; +/** + * Occurs whenever a quote's status changes to stale + */ export type QuoteStaleModel = { 'object': QuoteModel; }; export type QuoteLineDiscountEndModel = { + /** + * The discount end type. + */ 'type': 'line_ends_at'; }; export type StackableDiscountWithIndexAndDiscountEndModel = { + /** + * ID of the coupon to create a new discount for. + */ 'coupon': string | CouponModel; + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ 'discount': string | DiscountModel; + /** + * Details to determine how long the discount should be applied for. + */ 'discount_end'?: QuoteLineDiscountEndModel | undefined; + /** + * The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + */ 'index': number; + /** + * ID of the promotion code to create a new discount for. + */ 'promotion_code': string | PromotionCodeModel; }; export type QuotesResourceQuoteLinesTrialModel = { + /** + * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + */ 'converts_to'?: string[] | undefined; + /** + * Determines the type of trial for this item. + */ 'type': 'free' | 'paid'; }; export type QuotesResourceQuoteLinesActionsConfigurationItemModel = { + /** + * The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': DiscountsResourceStackableDiscountModel[]; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + */ 'metadata': { [key: string]: string; }; + /** + * ID of the price to which the customer should be subscribed. + */ 'price': string | PriceModel | DeletedPriceModel; + /** + * Quantity of the plan to which the customer should be subscribed. + */ 'quantity'?: number | undefined; + /** + * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + */ 'tax_rates'?: TaxRateModel[] | undefined; + /** + * Options that configure the trial on the subscription item. + */ 'trial'?: QuotesResourceQuoteLinesTrialModel | undefined; }; export type QuotesResourceQuoteLinesActionsRemoveItemModel = { + /** + * ID of a price to remove. + */ 'price': string | PriceModel | DeletedPriceModel; }; export type QuoteLineActionModel = { + /** + * Details for the `add_discount` type. + */ 'add_discount': StackableDiscountWithIndexAndDiscountEndModel; + /** + * Details for the `add_item` type. + */ 'add_item': QuotesResourceQuoteLinesActionsConfigurationItemModel; + /** + * Details for the `add_metadata` type: specify a hash of key-value pairs. + */ 'add_metadata': { [key: string]: string; }; + /** + * Details for the `remove_discount` type. + */ 'remove_discount': DiscountsResourceStackableDiscountModel; + /** + * Details for the `remove_item` type. + */ 'remove_item': QuotesResourceQuoteLinesActionsRemoveItemModel; + /** + * Details for the `remove_metadata` type: specify an array of metadata keys. + */ 'remove_metadata': string[]; + /** + * Details for the `set_discounts` type. + */ 'set_discounts': DiscountsResourceStackableDiscountModel[]; + /** + * Details for the `set_items` type. + */ 'set_items': QuotesResourceQuoteLinesActionsConfigurationItemModel[]; + /** + * Details for the `set_metadata` type: specify an array of key-value pairs. + */ 'set_metadata': { [key: string]: string; }; + /** + * The type of action the quote line performs. + */ 'type': 'add_discount' | 'add_item' | 'add_metadata' | 'clear_discounts' | 'clear_metadata' | 'remove_discount' | 'remove_item' | 'remove_metadata' | 'set_discounts' | 'set_items' | 'set_metadata'; }; +/** + * Configures the immediate cancellation settings for a subscription schedule via quotes. + */ export type QuotesResourceQuoteLinesCancelSubscriptionScheduleModel = { + /** + * Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + */ 'cancel_at': 'line_starts_at'; + /** + * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + */ 'invoice_now': boolean; + /** + * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + */ 'prorate': boolean; }; export type QuotesResourceQuoteLinesTimestampHelpersDiscountEndModel = { + /** + * The ID of a specific discount. + */ 'discount': string; }; export type QuotesResourceQuoteLinesTimestampHelpersEndsAtModel = { + /** + * The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. + */ 'computed': number; + /** + * Use the `end` time of a given discount. + */ 'discount_end'?: QuotesResourceQuoteLinesTimestampHelpersDiscountEndModel | undefined; + /** + * Time span for the quote line starting from the `starts_at` date. + */ 'duration': QuotesResourceQuoteLinesTimestampHelpersDurationModel; + /** + * A precise Unix timestamp. + */ 'timestamp': number; + /** + * Select a way to pass in `ends_at`. + */ 'type': 'billing_period_end' | 'discount_end' | 'duration' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice'; }; +/** + * Configures the pause collection settings for a subscription during a phase. + */ export type QuotesResourceQuoteLinesSetPauseCollectionModel = { + /** + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + */ 'set'?: SubscriptionSchedulesResourcePauseCollectionModel | undefined; + /** + * Defines the type of the pause_collection behavior for the quote line. + */ 'type': 'remove' | 'set'; }; export type QuotesResourceQuoteLinesTimestampHelpersStartsAtModel = { + /** + * The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. + */ 'computed': number; + /** + * Use the `end` time of a given discount. + */ 'discount_end'?: QuotesResourceQuoteLinesTimestampHelpersDiscountEndModel | undefined; + /** + * The timestamp the given line ends at. + */ 'line_ends_at': QuotesResourceQuoteLinesTimestampHelpersLineIdModel; + /** + * A precise Unix timestamp. + */ 'timestamp': number; + /** + * Select a way to pass in `starts_at`. + */ 'type': 'discount_end' | 'line_ends_at' | 'now' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice'; }; +/** + * Defines how the scheduled subscription behaves when a trial ends. + */ export type QuotesResourceQuoteLinesEndBehaviorModel = { + /** + * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + */ 'prorate_up_front': 'defer' | 'include'; }; +/** + * Configures how the scheduled subscription behaves during the trial period. + */ export type QuotesResourceQuoteLinesTrialSettingsModel = { + /** + * Defines how the subscription should behave when a trial ends. + */ 'end_behavior': QuotesResourceQuoteLinesEndBehaviorModel; }; +/** + * A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance. + */ export type QuoteLineModel = { + /** + * A list of items the customer is being quoted for. + */ 'actions'?: QuoteLineActionModel[] | undefined; + /** + * Details to identify the subscription schedule the quote line applies to. + */ 'applies_to': QuotesResourceQuoteLinesAppliesToModel; + /** + * For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + */ 'billing_cycle_anchor': 'automatic' | 'line_starts_at'; + /** + * A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + */ 'cancel_subscription_schedule': QuotesResourceQuoteLinesCancelSubscriptionScheduleModel; + /** + * Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + */ 'ends_at': QuotesResourceQuoteLinesTimestampHelpersEndsAtModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote_line'; + /** + * Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + */ 'proration_behavior': 'always_invoice' | 'create_prorations' | 'none'; + /** + * Details to modify the pause_collection behavior of the subscription schedule. + */ 'set_pause_collection'?: QuotesResourceQuoteLinesSetPauseCollectionModel | undefined; + /** + * Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + */ 'set_schedule_end': 'line_ends_at' | 'line_starts_at'; + /** + * Details to identify the earliest timestamp where the proposed change should take effect. + */ 'starts_at': QuotesResourceQuoteLinesTimestampHelpersStartsAtModel; + /** + * Settings related to subscription trials. + */ 'trial_settings'?: QuotesResourceQuoteLinesTrialSettingsModel | undefined; }; +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export type QuotePreviewInvoiceModel = { + /** + * The country of the business associated with this invoice, most often the business creating the invoice. + */ 'account_country': string; + /** + * The public name of the business associated with this invoice, most often the business creating the invoice. + */ 'account_name': string; + /** + * The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + */ 'account_tax_ids': Array; + /** + * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + */ 'amount_due': number; + /** + * Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. + */ 'amount_overpaid': number; + /** + * The amount, in cents (or local equivalent), that was paid. + */ 'amount_paid': number; + /** + * The difference between amount_due and amount_paid, in cents (or local equivalent). + */ 'amount_remaining': number; + /** + * This is the sum of all the shipping amounts. + */ 'amount_shipping': number; + /** + * List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + */ 'amounts_due'?: PaymentPlanAmountModel[] | undefined; + /** + * ID of the Connect Application that created the invoice. + */ 'application': string | ApplicationModel | DeletedApplicationModel; 'applies_to': QuotesResourceQuoteLinesAppliesToModel; + /** + * Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + */ 'attempt_count': number; + /** + * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + */ 'attempted': boolean; 'automatic_tax': AutomaticTaxModel; + /** + * The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + */ 'automatically_finalizes_at': number; + /** + * Indicates the reason why the invoice was created. + * + * * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * * `subscription_create`: A new subscription was created. + * * `subscription_cycle`: A subscription advanced into a new period. + * * `subscription_threshold`: A subscription reached a billing threshold. + * * `subscription_update`: A subscription was updated. + * * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. + */ 'billing_reason': 'automatic_pending_invoice_item_invoice' | 'manual' | 'quote_accept' | 'subscription' | 'subscription_create' | 'subscription_cycle' | 'subscription_threshold' | 'subscription_update' | 'upcoming'; + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + */ 'collection_method': 'charge_automatically' | 'send_invoice'; + /** + * The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. + */ 'confirmation_secret'?: InvoicesResourceConfirmationSecretModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * Custom fields displayed on the invoice. + */ 'custom_fields': InvoiceSettingCustomFieldModel[]; + /** + * The ID of the account who will be billed. + */ 'customer_account'?: string | undefined; + /** + * The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_address': AddressModel; + /** + * The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_email': string; + /** + * The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_name': string; + /** + * The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_phone': string; + /** + * The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_shipping': ShippingModel; + /** + * The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_exempt': 'exempt' | 'none' | 'reverse'; + /** + * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + */ 'customer_tax_ids'?: InvoicesResourceInvoiceTaxIdModel[] | undefined; + /** + * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + */ 'default_margins'?: Array | undefined; + /** + * 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. + */ 'default_payment_method': string | PaymentMethodModel; + /** + * ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + */ 'default_source': string | PaymentSourceModel; + /** + * The tax rates applied to this invoice, if any. + */ 'default_tax_rates': TaxRateModel[]; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + */ 'description': string; + /** + * The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ 'discounts': Array; + /** + * The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ 'due_date': number; + /** + * The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + */ 'effective_at': number; + /** + * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + */ 'ending_balance': number; + /** + * Footer displayed on the invoice. + */ 'footer': string; + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ 'from_invoice': InvoicesResourceFromInvoiceModel; + /** + * Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`. + */ 'id': string; 'issuer': ConnectAccountReferenceModel; + /** + * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + */ 'last_finalization_error': ApiErrorsModel; + /** + * The ID of the most recent non-draft revision of this invoice + */ 'latest_revision': string | InvoiceModel; + /** + * The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + */ 'lines': { + /** + * Details about each object. + */ 'data': LineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ 'next_payment_attempt': number; + /** + * A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + */ 'number': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote_preview_invoice'; + /** + * 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': string | AccountModel; + /** + * The parent that generated this invoice + */ 'parent': BillingBillResourceInvoicingParentsInvoiceParentModel; 'payment_settings': InvoicesPaymentSettingsModel; + /** + * Payments for this invoice + */ 'payments'?: { + /** + * Details about each object. + */ 'data': InvoicePaymentModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_end': number; + /** + * Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + */ 'period_start': number; + /** + * Total amount of all post-payment credit notes issued for this invoice. + */ 'post_payment_credit_notes_amount': number; + /** + * Total amount of all pre-payment credit notes issued for this invoice. + */ 'pre_payment_credit_notes_amount': number; + /** + * This is the transaction number that appears on email receipts sent for this invoice. + */ 'receipt_number': string; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ 'rendering': InvoicesResourceInvoiceRenderingModel; + /** + * The details of the cost of shipping, including the ShippingRate applied on the invoice. + */ 'shipping_cost': InvoicesResourceShippingCostModel; + /** + * Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + */ 'shipping_details': ShippingModel; + /** + * Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + */ 'starting_balance': number; + /** + * Extra information about an invoice for the customer's credit card statement. + */ 'statement_descriptor': string; + /** + * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + */ 'status': 'draft' | 'open' | 'paid' | 'uncollectible' | 'void'; 'status_transitions': InvoicesResourceStatusTransitionsModel; 'subscription': string | SubscriptionModel; + /** + * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + */ 'subtotal': number; + /** + * The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + */ 'subtotal_excluding_tax': number; + /** + * ID of the test clock this invoice belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; 'threshold_reason'?: InvoiceThresholdReasonModel | undefined; + /** + * Total after discounts and taxes. + */ 'total': number; + /** + * The aggregate amounts calculated per discount across all line items. + */ 'total_discount_amounts': DiscountsResourceDiscountAmountModel[]; + /** + * The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + */ 'total_excluding_tax': number; + /** + * The aggregate amounts calculated per margin across all line items. + */ 'total_margin_amounts'?: MarginsResourceMarginAmountModel[] | undefined; + /** + * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + */ 'total_pretax_credit_amounts': InvoicesResourcePretaxCreditAmountModel[]; + /** + * The aggregate tax information of all line items. + */ 'total_taxes': BillingBillResourceInvoicingTaxesTaxModel[]; + /** + * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ 'webhooks_delivered_at': number; }; export type QuotePreviewSubscriptionScheduleModel = { + /** + * ID of the Connect Application that created the schedule. + */ 'application': string | ApplicationModel | DeletedApplicationModel; 'applies_to': QuotesResourceQuoteLinesAppliesToModel; + /** + * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + */ 'billing_behavior'?: 'prorate_on_next_phase' | 'prorate_up_front' | undefined; 'billing_mode': SubscriptionsResourceBillingModeModel; + /** + * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ 'canceled_at': number; + /** + * Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ 'completed_at': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + */ 'current_phase': SubscriptionScheduleCurrentPhaseModel; + /** + * ID of the customer who owns the subscription schedule. + */ 'customer': string | CustomerModel | DeletedCustomerModel; + /** + * ID of the account who owns the subscription schedule. + */ 'customer_account'?: string | undefined; 'default_settings': SubscriptionSchedulesResourceDefaultSettingsModel; + /** + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + */ 'end_behavior': 'cancel' | 'none' | 'release' | 'renew'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Details of the most recent price migration that failed for the subscription schedule. + */ 'last_price_migration_error'?: SubscriptionsResourcePriceMigrationErrorModel | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'quote_preview_subscription_schedule'; + /** + * Configuration for the subscription schedule's phases. + */ 'phases': SubscriptionSchedulePhaseConfigurationModel[]; + /** + * Time period and invoice for a Subscription billed in advance. + */ 'prebilling'?: SubscriptionPrebillingDataModel | undefined; + /** + * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ 'released_at': number; + /** + * ID of the subscription once managed by the subscription schedule (if it is released). + */ 'released_subscription': string; + /** + * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ 'status': 'active' | 'canceled' | 'completed' | 'not_started' | 'released'; + /** + * ID of the subscription managed by the subscription schedule. + */ 'subscription': string | SubscriptionModel; + /** + * ID of the test clock this subscription schedule belongs to. + */ 'test_clock': string | TestHelpersTestClockModel; }; +/** + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + */ export type RadarEarlyFraudWarningModel = { + /** + * An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + */ 'actionable': boolean; + /** + * ID of the charge this early fraud warning is for, optionally expanded. + */ 'charge': string | ChargeModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + */ 'fraud_type': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.early_fraud_warning'; + /** + * ID of the Payment Intent this early fraud warning is for, optionally expanded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; }; +/** + * Occurs whenever an early fraud warning is created. + */ export type RadarEarlyFraudWarningCreatedModel = { 'object': RadarEarlyFraudWarningModel; }; +/** + * Occurs whenever an early fraud warning is updated. + */ export type RadarEarlyFraudWarningUpdatedModel = { 'object': RadarEarlyFraudWarningModel; }; +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListItemModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who added this item to the value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list_item'; + /** + * The value of the item. + */ 'value': string; + /** + * The identifier of the value list this item belongs to. + */ 'value_list': string; }; +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export type RadarValueListModel = { + /** + * The name of the value list for use in rules. + */ 'alias': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The name or email address of the user who created this value list. + */ 'created_by': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. + */ 'item_type': 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'sepa_debit_fingerprint' | 'string' | 'us_bank_account_fingerprint'; + /** + * List of items contained within this value list. + */ 'list_items': { + /** + * Details about each object. + */ 'data': RadarValueListItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; }; + /** + * 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': { [key: string]: string; }; + /** + * The name of the value list. + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'radar.value_list'; }; export type ReceivedPaymentMethodDetailsFinancialAccountModel = { + /** + * The FinancialAccount ID. + */ 'id': string; + /** + * The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + */ 'network': 'stripe'; }; +/** + * Occurs whenever a refund is created. + */ export type RefundCreatedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a refund has failed. + */ export type RefundFailedModel = { 'object': RefundModel; }; +/** + * Occurs whenever a refund is updated. + */ export type RefundUpdatedModel = { 'object': RefundModel; }; +/** + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ 'error': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * `true` if the report is run on live mode data and `false` if it is run on test mode data. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_run'; 'parameters': FinancialReportingFinanceReportRunRunParametersModel; + /** + * The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + */ 'report_type': string; + /** + * The file object representing the result of the report run (populated when + * `status=succeeded`). + */ 'result': FileModel; + /** + * Status of this report run. This will be `pending` when the run is initially created. + * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + */ 'status': string; + /** + * Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ 'succeeded_at': number; }; +/** + * Occurs whenever a requested `ReportRun` failed to complete. + */ export type ReportingReportRunFailedModel = { 'object': ReportingReportRunModel; }; +/** + * Occurs whenever a requested `ReportRun` completed successfully. + */ export type ReportingReportRunSucceededModel = { 'object': ReportingReportRunModel; }; +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export type ReportingReportTypeModel = { + /** + * Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_end': number; + /** + * Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ 'data_available_start': number; + /** + * List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + */ 'default_columns': string[]; + /** + * The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * Human-readable name of the Report Type + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'reporting.report_type'; + /** + * When this Report Type was latest updated. Measured in seconds since the Unix epoch. + */ 'updated': number; + /** + * Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + */ 'version': number; }; +/** + * Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available). + */ export type ReportingReportTypeUpdatedModel = { 'object': ReportingReportTypeModel; }; +/** + * Occurs whenever a review is closed. The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`. + */ export type ReviewClosedModel = { 'object': ReviewModel; }; +/** + * Occurs whenever a review is opened. + */ export type ReviewOpenedModel = { 'object': ReviewModel; }; export type SigmaScheduledQueryRunErrorModel = { + /** + * Information about the run failure. + */ 'message': string; }; +/** + * If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + * receive a `sigma.scheduled_query_run.created` webhook each time the query + * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + * retrieve the query results. + */ export type ScheduledQueryRunModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * When the query was run, Sigma contained a snapshot of your Stripe data at this time. + */ 'data_load_time': number; 'error'?: SigmaScheduledQueryRunErrorModel | undefined; + /** + * The file object representing the results of the query. + */ 'file': FileModel; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'scheduled_query_run'; + /** + * Time at which the result expires and is no longer available for download. + */ 'result_available_until': number; + /** + * SQL for the query. + */ 'sql': string; + /** + * The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + */ 'status': string; + /** + * Title of the query. + */ 'title': string; }; +/** + * Occurs when a SetupIntent is canceled. + */ export type SetupIntentCanceledModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a new SetupIntent is created. + */ export type SetupIntentCreatedModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a SetupIntent is in requires_action state. + */ export type SetupIntentRequiresActionModel = { 'object': SetupIntentModel; }; +/** + * Occurs when a SetupIntent has failed the attempt to setup a payment method. + */ export type SetupIntentSetupFailedModel = { 'object': SetupIntentModel; }; +/** + * Occurs when an SetupIntent has successfully setup a payment method. + */ export type SetupIntentSucceededModel = { 'object': SetupIntentModel; }; export type SetupIntentTypeSpecificPaymentMethodOptionsClientModel = { + /** + * Bank account verification method. + */ 'verification_method'?: 'automatic' | 'instant' | 'microdeposits' | undefined; }; +/** + * Occurs whenever a Sigma scheduled query run finishes. + */ export type SigmaScheduledQueryRunCreatedModel = { 'object': ScheduledQueryRunModel; }; +/** + * Occurs whenever a source is canceled. + */ export type SourceCanceledModel = { 'object': SourceModel; }; +/** + * Occurs whenever a source transitions to chargeable. + */ export type SourceChargeableModel = { 'object': SourceModel; }; +/** + * Occurs whenever a source fails. + */ export type SourceFailedModel = { 'object': SourceModel; }; export type SourceMandateNotificationAcssDebitDataModel = { + /** + * The statement descriptor associate with the debit. + */ 'statement_descriptor'?: string | undefined; }; export type SourceMandateNotificationBacsDebitDataModel = { + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; }; export type SourceMandateNotificationSepaDebitDataModel = { + /** + * SEPA creditor ID. + */ 'creditor_identifier'?: string | undefined; + /** + * Last 4 digits of the account number associated with the debit. + */ 'last4'?: string | undefined; + /** + * Mandate reference associated with the debit. + */ 'mandate_reference'?: string | undefined; }; +/** + * Source mandate notifications should be created when a notification related to + * a source mandate must be sent to the payer. They will trigger a webhook or + * deliver an email to the customer. + */ export type SourceMandateNotification_1Model = { 'acss_debit'?: SourceMandateNotificationAcssDebitDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + */ 'amount': number; 'bacs_debit'?: SourceMandateNotificationBacsDebitDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_mandate_notification'; + /** + * The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + */ 'reason': string; 'sepa_debit'?: SourceMandateNotificationSepaDebitDataModel | undefined; 'source': SourceModel; + /** + * The status of the mandate notification. Valid statuses are `pending` or `submitted`. + */ 'status': string; + /** + * The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + */ 'type': string; }; +/** + * Occurs whenever a source mandate notification method is set to manual. + */ export type SourceMandateNotificationModel = { 'object': SourceMandateNotification_1Model; }; +/** + * Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment. + */ export type SourceRefundAttributesRequiredModel = { 'object': SourceModel; }; export type SourceTransactionAchCreditTransferDataModel = { + /** + * Customer data associated with the transfer. + */ 'customer_data'?: string | undefined; + /** + * Bank account fingerprint associated with the transfer. + */ 'fingerprint'?: string | undefined; + /** + * Last 4 digits of the account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Routing number associated with the transfer. + */ 'routing_number'?: string | undefined; }; export type SourceTransactionChfCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's country address. + */ 'sender_address_country'?: string | undefined; + /** + * Sender's line 1 address. + */ 'sender_address_line1'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; export type SourceTransactionGbpCreditTransferDataModel = { + /** + * Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. + */ 'fingerprint'?: string | undefined; + /** + * The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. + */ 'funding_method'?: string | undefined; + /** + * Last 4 digits of sender account number associated with the transfer. + */ 'last4'?: string | undefined; + /** + * Sender entered arbitrary information about the transfer. + */ 'reference'?: string | undefined; + /** + * Sender account number associated with the transfer. + */ 'sender_account_number'?: string | undefined; + /** + * Sender name associated with the transfer. + */ 'sender_name'?: string | undefined; + /** + * Sender sort code associated with the transfer. + */ 'sender_sort_code'?: string | undefined; }; export type SourceTransactionPaperCheckDataModel = { + /** + * Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. + */ 'available_at'?: string | undefined; + /** + * Comma-separated list of invoice IDs associated with the paper check. + */ 'invoices'?: string | undefined; }; export type SourceTransactionSepaCreditTransferDataModel = { + /** + * Reference associated with the transfer. + */ 'reference'?: string | undefined; + /** + * Sender's bank account IBAN. + */ 'sender_iban'?: string | undefined; + /** + * Sender's name. + */ 'sender_name'?: string | undefined; }; +/** + * Some payment methods have no required amount that a customer must send. + * Customers can be instructed to send any amount, and it can be made up of + * multiple transactions. As such, sources can have multiple associated + * transactions. + */ export type SourceTransactionModel = { 'ach_credit_transfer'?: SourceTransactionAchCreditTransferDataModel | undefined; + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + */ 'amount': number; 'chf_credit_transfer'?: SourceTransactionChfCreditTransferDataModel | undefined; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; 'gbp_credit_transfer'?: SourceTransactionGbpCreditTransferDataModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'source_transaction'; 'paper_check'?: SourceTransactionPaperCheckDataModel | undefined; 'sepa_credit_transfer'?: SourceTransactionSepaCreditTransferDataModel | undefined; + /** + * The ID of the source this transaction is attached to. + */ 'source': string; + /** + * The status of the transaction, one of `succeeded`, `pending`, or `failed`. + */ 'status': string; + /** + * The type of source this transaction is attached to. + */ 'type': 'ach_credit_transfer' | 'ach_debit' | 'alipay' | 'bancontact' | 'card' | 'card_present' | 'eps' | 'giropay' | 'ideal' | 'klarna' | 'multibanco' | 'p24' | 'sepa_debit' | 'sofort' | 'three_d_secure' | 'wechat'; }; +/** + * Occurs whenever a source transaction is created. + */ export type SourceTransactionCreatedModel = { 'object': SourceTransactionModel; }; +/** + * Occurs whenever a source transaction is updated. + */ export type SourceTransactionUpdatedModel = { 'object': SourceTransactionModel; }; +/** + * Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency. + */ export type SubscriptionScheduleAbortedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a subscription schedule is canceled. + */ export type SubscriptionScheduleCanceledModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is completed. + */ export type SubscriptionScheduleCompletedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is created. + */ export type SubscriptionScheduleCreatedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs 7 days before a subscription schedule will expire. + */ export type SubscriptionScheduleExpiringModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a price migration failed to transition prices on a subscription schedule. + */ export type SubscriptionSchedulePriceMigrationFailedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a new subscription schedule is released. + */ export type SubscriptionScheduleReleasedModel = { 'object': SubscriptionScheduleModel; }; +/** + * Occurs whenever a subscription schedule is updated. + */ export type SubscriptionScheduleUpdatedModel = { 'object': SubscriptionScheduleModel; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel = { + /** + * The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + */ 'transaction': string; }; export type TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel = { + /** + * Details on why we couldn't commit the tax transaction. + */ 'reason': 'another_payment_associated_with_calculation' | 'calculation_expired' | 'currency_mismatch' | 'original_transaction_voided' | 'unique_reference_violation'; }; export type TaxProductResourceTaxAssociationTransactionAttemptsModel = { 'committed'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceCommittedModel | undefined; 'errored'?: TaxProductResourceTaxAssociationTransactionAttemptsResourceErroredModel | undefined; + /** + * The source of the tax transaction attempt. This is either a refund or a payment intent. + */ 'source': string; + /** + * The status of the transaction attempt. This can be `errored` or `committed`. + */ 'status': string; }; +/** + * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input + */ export type TaxAssociationModel = { + /** + * The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + */ 'calculation': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.association'; + /** + * The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + */ 'payment_intent': string; + /** + * Information about the tax transactions linked to this payment intent + */ 'tax_transaction_attempts': TaxProductResourceTaxAssociationTransactionAttemptsModel[]; }; export type TaxProductResourcePostalAddressModel = { + /** + * City, district, suburb, town, or village. + */ 'city': string; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Address line 1, such as the street, PO Box, or company name. + */ 'line1': string; + /** + * Address line 2, such as the apartment, suite, unit, or building. + */ 'line2': string; + /** + * ZIP or postal code. + */ 'postal_code': string; + /** + * State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + */ 'state': string; }; export type TaxProductResourceCustomerDetailsResourceTaxIdModel = { + /** + * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` + */ 'type': 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin'; + /** + * The value of the tax ID. + */ 'value': string; }; export type TaxProductResourceCustomerDetailsModel = { + /** + * The customer's postal address (for example, home or business location). + */ 'address': TaxProductResourcePostalAddressModel; + /** + * The type of customer address provided. + */ 'address_source': 'billing' | 'shipping'; + /** + * The customer's IP address (IPv4 or IPv6). + */ 'ip_address': string; + /** + * The customer's tax IDs (for example, EU VAT numbers). + */ 'tax_ids': TaxProductResourceCustomerDetailsResourceTaxIdModel[]; + /** + * The taxability override used for taxation. + */ 'taxability_override': 'customer_exempt' | 'none' | 'reverse_charge'; }; export type TaxProductResourceJurisdictionModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * A human-readable name for the jurisdiction imposing the tax. + */ 'display_name': string; + /** + * Indicates the level of the jurisdiction imposing the tax. + */ 'level': 'city' | 'country' | 'county' | 'district' | 'state'; + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + */ 'state': string; }; export type TaxProductResourceLineItemTaxRateDetailsModel = { + /** + * A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + */ 'display_name': string; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + */ 'percentage_decimal': string; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxProductResourceLineItemTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; 'jurisdiction': TaxProductResourceJurisdictionModel; + /** + * Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + */ 'sourcing': 'destination' | 'origin'; + /** + * Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + */ 'tax_rate_details': TaxProductResourceLineItemTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; export type TaxCalculationLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product': string; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item. + */ 'reference': string; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to this line item. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; }; @@ -11876,193 +30274,440 @@ export type TaxProductResourceShipFromDetailsModel = { }; export type TaxProductResourceTaxCalculationShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to shipping cost. + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; export type TaxProductResourceTaxRateDetailsModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ 'flat_amount': TaxRateFlatAmountModel; + /** + * The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. + */ 'percentage_decimal': string; + /** + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. + */ 'rate_type': 'flat_amount' | 'percentage'; + /** + * State, county, province, or region. + */ 'state': string; + /** + * The tax type, such as `vat` or `sales_tax`. + */ 'tax_type': 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat'; }; export type TaxProductResourceTaxBreakdownModel = { + /** + * The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Specifies whether the tax amount is included in the line item amount. + */ 'inclusive': boolean; 'tax_rate_details': TaxProductResourceTaxRateDetailsModel; + /** + * The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. + */ 'taxability_reason': 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated'; + /** + * The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'taxable_amount': number; }; +/** + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom) + */ export type TaxCalculationModel = { + /** + * Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_total': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer': string; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Timestamp of date at which the tax calculation will expire. + */ 'expires_at': number; + /** + * Unique identifier for the calculation. + */ 'id': string; + /** + * The list of items the customer is purchasing. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxCalculationLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.calculation'; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details': TaxProductResourceShipFromDetailsModel; + /** + * The shipping cost details for the calculation. + */ 'shipping_cost': TaxProductResourceTaxCalculationShippingCostModel; + /** + * The amount of tax to be collected on top of the line item prices. + */ 'tax_amount_exclusive': number; + /** + * The amount of tax already included in the line item prices. + */ 'tax_amount_inclusive': number; + /** + * Breakdown of individual tax amounts that add up to the total. + */ 'tax_breakdown': TaxProductResourceTaxBreakdownModel[]; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; }; export type TaxReportingResourceTaxFormAuSerrModel = { + /** + * End date of the period represented by the information reported on the tax form. + */ 'reporting_period_end_date': string; + /** + * Start date of the period represented by the information reported on the tax form. + */ 'reporting_period_start_date': string; }; export type TaxReportingResourceTaxFormCaMrdpModel = { + /** + * End date of the period represented by the information reported on the tax form. + */ 'reporting_period_end_date': string; + /** + * Start date of the period represented by the information reported on the tax form. + */ 'reporting_period_start_date': string; }; export type TaxReportingResourceTaxFormEuDac7Model = { + /** + * End date of the period represented by the information reported on the tax form. + */ 'reporting_period_end_date': string; + /** + * Start date of the period represented by the information reported on the tax form. + */ 'reporting_period_start_date': string; }; export type TaxReportingResourceTaxFormFilingStatusResourceJurisdictionModel = { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Indicates the level of the jurisdiction where the form was filed. + */ 'level': 'country' | 'state'; + /** + * [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. Null for non-U.S. forms. + */ 'state': string; }; export type TaxReportingResourceTaxFormFilingStatusModel = { + /** + * Time when the filing status was updated. + */ 'effective_at': number; 'jurisdiction': TaxReportingResourceTaxFormFilingStatusResourceJurisdictionModel; + /** + * The current status of the filed form. + */ 'value': 'accepted' | 'filed' | 'rejected'; }; export type TaxReportingResourceTaxFormGbMrdpModel = { + /** + * End date of the period represented by the information reported on the tax form. + */ 'reporting_period_end_date': string; + /** + * Start date of the period represented by the information reported on the tax form. + */ 'reporting_period_start_date': string; }; export type TaxReportingResourceTaxFormNzMrdpModel = { + /** + * End date of the period represented by the information reported on the tax form. + */ 'reporting_period_end_date': string; + /** + * Start date of the period represented by the information reported on the tax form. + */ 'reporting_period_start_date': string; }; export type TaxReportingResourceTaxFormPayeeModel = { + /** + * The ID of the payee's Stripe account. + */ 'account': string | AccountModel; + /** + * The external reference to this payee. + */ 'external_reference': string; + /** + * Either `account` or `external_reference`. + */ 'type': 'account' | 'external_reference'; }; export type TaxReportingResourceTaxFormUs1099KModel = { + /** + * Year represented by the information reported on the tax form. + */ 'reporting_year': number; }; export type TaxReportingResourceTaxFormUs1099MiscModel = { + /** + * Year represented by the information reported on the tax form. + */ 'reporting_year': number; }; export type TaxReportingResourceTaxFormUs1099NecModel = { + /** + * Year represented by the information reported on the tax form. + */ 'reporting_year': number; }; +/** + * Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes. + * + * Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) + */ export type TaxFormModel = { 'au_serr'?: TaxReportingResourceTaxFormAuSerrModel | undefined; 'ca_mrdp'?: TaxReportingResourceTaxFormCaMrdpModel | undefined; + /** + * The form that corrects this form, if any. + */ 'corrected_by': string | TaxFormModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; 'eu_dac7'?: TaxReportingResourceTaxFormEuDac7Model | undefined; + /** + * A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. + */ 'filing_statuses': TaxReportingResourceTaxFormFilingStatusModel[]; 'gb_mrdp'?: TaxReportingResourceTaxFormGbMrdpModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; 'nz_mrdp'?: TaxReportingResourceTaxFormNzMrdpModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.form'; 'payee': TaxReportingResourceTaxFormPayeeModel; + /** + * The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. + */ 'type': 'au_serr' | 'ca_mrdp' | 'eu_dac7' | 'gb_mrdp' | 'nz_mrdp' | 'us_1099_k' | 'us_1099_misc' | 'us_1099_nec'; 'us_1099_k'?: TaxReportingResourceTaxFormUs1099KModel | undefined; 'us_1099_misc'?: TaxReportingResourceTaxFormUs1099MiscModel | undefined; 'us_1099_nec'?: TaxReportingResourceTaxFormUs1099NecModel | undefined; }; +/** + * Occurs when a tax form is updated. + */ export type TaxFormUpdatedModel = { 'object': TaxFormModel; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel = { + /** + * Place of supply scheme used in an Default standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultInboundGoodsModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsDefaultStandardModel | undefined; + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsDefaultModel = { + /** + * Type of registration in `country`. + */ 'type': 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsSimplifiedModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsEuStandardModel = { + /** + * Place of supply scheme used in an EU standard registration. + */ 'place_of_supply_scheme': 'inbound_goods' | 'small_seller' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsEuropeModel = { 'standard'?: TaxProductRegistrationsResourceCountryOptionsEuStandardModel | undefined; + /** + * Type of registration in an EU country. + */ 'type': 'ioss' | 'oss_non_union' | 'oss_union' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel = { + /** + * Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'province': string; }; export type TaxProductRegistrationsResourceCountryOptionsCanadaModel = { 'province_standard'?: TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardModel | undefined; + /** + * Type of registration in Canada. + */ 'type': 'province_standard' | 'simplified' | 'standard'; }; export type TaxProductRegistrationsResourceCountryOptionsThailandModel = { + /** + * Type of registration in `country`. + */ 'type': 'simplified'; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction': string; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel = { + /** + * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + */ 'jurisdiction'?: string | undefined; + /** + * The type of the election for the state sales tax registration. + */ 'type': 'local_use_tax' | 'simplified_sellers_use_tax' | 'single_local_use_tax'; }; export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel = { + /** + * Elections for the state sales tax registration. + */ 'elections'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionModel[] | undefined; }; export type TaxProductRegistrationsResourceCountryOptionsUnitedStatesModel = { 'local_amusement_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxModel | undefined; 'local_lease_tax'?: TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxModel | undefined; + /** + * Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + */ 'state': string; 'state_sales_tax'?: TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxModel | undefined; + /** + * Type of registration in the US. + */ 'type': 'local_amusement_tax' | 'local_lease_tax' | 'state_communications_tax' | 'state_retail_delivery_fee' | 'state_sales_tax'; }; @@ -12169,21 +30814,61 @@ export type TaxProductRegistrationsResourceCountryOptionsModel = { 'zw'?: TaxProductRegistrationsResourceCountryOptionsDefaultModel | undefined; }; +/** + * A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). + * + * Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering). + * + * Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api) + */ export type TaxRegistrationModel = { + /** + * Time at which the registration becomes active. Measured in seconds since the Unix epoch. + */ 'active_from': number; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; 'country_options': TaxProductRegistrationsResourceCountryOptionsModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + */ 'expires_at': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.registration'; + /** + * The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + */ 'status': 'active' | 'expired' | 'scheduled'; }; export type TaxProductResourceTaxSettingsDefaultsModel = { + /** + * The tax calculation provider this account uses. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps). + */ 'provider': 'anrok' | 'avalara' | 'sphere' | 'stripe'; + /** + * Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. + */ 'tax_behavior': 'exclusive' | 'inclusive' | 'inferred_by_currency'; + /** + * Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. + */ 'tax_code': string; }; @@ -12196,6 +30881,9 @@ export type TaxProductResourceTaxSettingsStatusDetailsResourceActiveModel = { }; export type TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel = { + /** + * The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. + */ 'missing_fields': string[]; }; @@ -12204,108 +30892,283 @@ export type TaxProductResourceTaxSettingsStatusDetailsModel = { 'pending'?: TaxProductResourceTaxSettingsStatusDetailsResourcePendingModel | undefined; }; +/** + * You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. + * + * Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) + */ export type TaxSettingsModel = { 'defaults': TaxProductResourceTaxSettingsDefaultsModel; + /** + * The place where your business is located. + */ 'head_office': TaxProductResourceTaxSettingsHeadOfficeModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.settings'; + /** + * The status of the Tax `Settings`. + */ 'status': 'active' | 'pending'; 'status_details': TaxProductResourceTaxSettingsStatusDetailsModel; }; +/** + * Occurs whenever tax settings is updated. + */ export type TaxSettingsUpdatedModel = { 'object': TaxSettingsModel; }; export type TaxProductResourceTaxTransactionLineItemResourceReversalModel = { + /** + * The `id` of the line item to reverse in the original transaction. + */ 'original_line_item': string; }; export type TaxTransactionLineItemModel = { + /** + * The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction_line_item'; + /** + * The ID of an existing [Product](https://stripe.com/docs/api/products/object). + */ 'product': string; + /** + * The number of units of the item being purchased. For reversals, this is the quantity reversed. + */ 'quantity': number; + /** + * A custom identifier for this line item in the transaction. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal': TaxProductResourceTaxTransactionLineItemResourceReversalModel; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + */ 'tax_code': string; + /** + * If `reversal`, this line item reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; export type TaxProductResourceTaxTransactionResourceReversalModel = { + /** + * The `id` of the reversed `Transaction` object. + */ 'original_transaction': string; }; export type TaxProductResourceTaxTransactionShippingCostModel = { + /** + * The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + */ 'amount': number; + /** + * The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount_tax': number; + /** + * The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + */ 'shipping_rate'?: string | undefined; + /** + * Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + */ 'tax_behavior': 'exclusive' | 'inclusive'; + /** + * Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) + */ 'tax_breakdown'?: TaxProductResourceLineItemTaxBreakdownModel[] | undefined; + /** + * The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + */ 'tax_code': string; }; +/** + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction) + */ export type TaxTransactionModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + */ 'customer': string; 'customer_details': TaxProductResourceCustomerDetailsModel; + /** + * Unique identifier for the transaction. + */ 'id': string; + /** + * The tax collected or refunded, by line item. + */ 'line_items'?: { + /** + * Details about each object. + */ 'data': TaxTransactionLineItemModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'tax.transaction'; + /** + * The Unix timestamp representing when the tax liability is assumed or reduced. + */ 'posted_at': number; + /** + * A custom unique identifier, such as 'myOrder_123'. + */ 'reference': string; + /** + * If `type=reversal`, contains information about what was reversed. + */ 'reversal': TaxProductResourceTaxTransactionResourceReversalModel; + /** + * The details of the ship from location, such as the address. + */ 'ship_from_details': TaxProductResourceShipFromDetailsModel; + /** + * The shipping cost details for the transaction. + */ 'shipping_cost': TaxProductResourceTaxTransactionShippingCostModel; + /** + * Timestamp of date at which the tax rules and rates in effect applies for the calculation. + */ 'tax_date': number; + /** + * If `reversal`, this transaction reverses an earlier transaction. + */ 'type': 'reversal' | 'transaction'; }; +/** + * Occurs whenever a new tax rate is created. + */ export type TaxRateCreatedModel = { 'object': TaxRateModel; }; +/** + * Occurs whenever a tax rate is updated. + */ export type TaxRateUpdatedModel = { 'object': TaxRateModel; }; export type TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel = { + /** + * A File ID representing an image to display on the reader + */ 'splashscreen'?: string | FileModel | undefined; }; export type TerminalConfigurationConfigurationResourceOfflineConfigModel = { + /** + * Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + */ 'enabled': boolean; }; export type TerminalConfigurationConfigurationResourceReaderSecurityConfigModel = { + /** + * Passcode used to access a reader's admin menu. + */ 'admin_menu_passcode': string; }; export type TerminalConfigurationConfigurationResourceRebootWindowModel = { + /** + * Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + */ 'end_hour': number; + /** + * Integer between 0 to 23 that represents the start hour of the reboot time window. + */ 'start_hour': number; }; export type TerminalConfigurationConfigurationResourceCurrencySpecificConfigModel = { + /** + * Fixed amounts displayed when collecting a tip + */ 'fixed_amounts'?: number[] | undefined; + /** + * Percentages displayed when collecting a tip + */ 'percentages'?: number[] | undefined; + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ 'smart_tip_threshold'?: number | undefined; }; @@ -12335,22 +31198,55 @@ export type TerminalConfigurationConfigurationResourceTippingModel = { }; export type TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; + /** + * Username for connecting to the WiFi network + */ 'username': string; }; export type TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel = { + /** + * A File ID representing a PEM file containing the server certificate + */ 'ca_certificate_file'?: string | undefined; + /** + * A File ID representing a PEM file containing the client certificate + */ 'client_certificate_file': string; + /** + * A File ID representing a PEM file containing the client RSA private key + */ 'private_key_file': string; + /** + * Password for the private key file + */ 'private_key_file_password'?: string | undefined; + /** + * Name of the WiFi network + */ 'ssid': string; }; export type TerminalConfigurationConfigurationResourcePersonalPskWifiModel = { + /** + * Password for connecting to the WiFi network + */ 'password': string; + /** + * Name of the WiFi network + */ 'ssid': string; }; @@ -12358,16 +31254,38 @@ export type TerminalConfigurationConfigurationResourceWifiConfigModel = { 'enterprise_eap_peap'?: TerminalConfigurationConfigurationResourceEnterprisePeapWifiModel | undefined; 'enterprise_eap_tls'?: TerminalConfigurationConfigurationResourceEnterpriseTlsWifiModel | undefined; 'personal_psk'?: TerminalConfigurationConfigurationResourcePersonalPskWifiModel | undefined; + /** + * Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type. + */ 'type': 'enterprise_eap_peap' | 'enterprise_eap_tls' | 'personal_psk'; }; +/** + * A Configurations object represents how features should be configured for terminal readers. + * For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). + */ export type TerminalConfigurationModel = { 'bbpos_wisepad3'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; 'bbpos_wisepos_e'?: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigModel | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Whether this Configuration is the default for your account + */ 'is_account_default': boolean; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String indicating the name of the Configuration object, set by the user + */ 'name': string; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.configuration'; 'offline'?: TerminalConfigurationConfigurationResourceOfflineConfigModel | undefined; 'reader_security'?: TerminalConfigurationConfigurationResourceReaderSecurityConfigModel | undefined; @@ -12378,532 +31296,1413 @@ export type TerminalConfigurationModel = { 'wifi'?: TerminalConfigurationConfigurationResourceWifiConfigModel | undefined; }; +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalConnectionTokenModel = { + /** + * The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + */ 'location'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.connection_token'; + /** + * Your application should pass this token to the Stripe Terminal SDK. + */ 'secret': string; }; +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export type TerminalLocationModel = { 'address': AddressModel; 'address_kana'?: LegalEntityJapanAddressModel | undefined; 'address_kanji'?: LegalEntityJapanAddressModel | undefined; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ 'configuration_overrides'?: string | undefined; + /** + * The display name of the location. + */ 'display_name': string; + /** + * The Kana variation of the display name of the location. + */ 'display_name_kana'?: string | undefined; + /** + * The Kanji variation of the display name of the location. + */ 'display_name_kanji'?: string | undefined; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.location'; + /** + * The phone number of the location. + */ 'phone'?: string | undefined; }; +/** + * Options associated with the Apple Terms and Conditions link type. + */ export type TerminalOnboardingLinkAppleTermsAndConditionsModel = { + /** + * Whether the link should also support users relinking their Apple account. + */ 'allow_relinking': boolean; + /** + * The business name of the merchant accepting Apple's Terms and Conditions. + */ 'merchant_display_name': string; }; +/** + * Link type options associated with the current onboarding link object. + */ export type TerminalOnboardingLinkLinkOptionsModel = { + /** + * The options associated with the Apple Terms and Conditions link type. + */ 'apple_terms_and_conditions': TerminalOnboardingLinkAppleTermsAndConditionsModel; }; +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export type TerminalOnboardingLinkModel = { 'link_options': TerminalOnboardingLinkLinkOptionsModel; + /** + * The type of link being generated. + */ 'link_type': 'apple_terms_and_conditions'; 'object': 'terminal.onboarding_link'; + /** + * Stripe account ID to generate the link for. + */ 'on_behalf_of': string; + /** + * The link passed back to the user for their onboarding. + */ 'redirect_url': string; }; +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export type TerminalReaderReaderResourceCustomTextModel = { + /** + * Customize the default description for this input + */ 'description': string; + /** + * Customize the default label for this input's skip button + */ 'skip_button': string; + /** + * Customize the default label for this input's submit button + */ 'submit_button': string; + /** + * Customize the default title for this input + */ 'title': string; }; +/** + * Information about a email being collected using a reader + */ export type TerminalReaderReaderResourceEmailModel = { + /** + * The collected email address + */ 'value': string; }; +/** + * Information about a number being collected using a reader + */ export type TerminalReaderReaderResourceNumericModel = { + /** + * The collected number + */ 'value': string; }; +/** + * Information about a phone number being collected using a reader + */ export type TerminalReaderReaderResourcePhoneModel = { + /** + * The collected phone number + */ 'value': string; }; +/** + * Choice to be selected on a Reader + */ export type TerminalReaderReaderResourceChoiceModel = { + /** + * The identifier for the selected choice. Maximum 50 characters. + */ 'id': string; + /** + * The button style for the choice. Can be `primary` or `secondary`. + */ 'style': 'primary' | 'secondary'; + /** + * The text to be selected. Maximum 30 characters. + */ 'text': string; }; +/** + * Information about a selection being collected using a reader + */ export type TerminalReaderReaderResourceSelectionModel = { + /** + * List of possible choices to be selected + */ 'choices': TerminalReaderReaderResourceChoiceModel[]; + /** + * The id of the selected choice + */ 'id': string; + /** + * The text of the selected choice + */ 'text': string; }; +/** + * Information about a signature being collected using a reader + */ export type TerminalReaderReaderResourceSignatureModel = { + /** + * The File ID of a collected signature image + */ 'value': string; }; +/** + * Information about text being collected using a reader + */ export type TerminalReaderReaderResourceTextModel = { + /** + * The collected text value + */ 'value': string; }; +/** + * Information about an input's toggle + */ export type TerminalReaderReaderResourceToggleModel = { + /** + * The toggle's default value. Can be `enabled` or `disabled`. + */ 'default_value': 'disabled' | 'enabled'; + /** + * The toggle's description text. Maximum 50 characters. + */ 'description': string; + /** + * The toggle's title text. Maximum 50 characters. + */ 'title': string; + /** + * The toggle's collected value. Can be `enabled` or `disabled`. + */ 'value': 'disabled' | 'enabled'; }; +/** + * Represents an input to be collected using the reader + */ export type TerminalReaderReaderResourceInputModel = { + /** + * Default text of input being collected. + */ 'custom_text': TerminalReaderReaderResourceCustomTextModel; 'email'?: TerminalReaderReaderResourceEmailModel | undefined; 'numeric'?: TerminalReaderReaderResourceNumericModel | undefined; 'phone'?: TerminalReaderReaderResourcePhoneModel | undefined; + /** + * Indicate that this input is required, disabling the skip button. + */ 'required': boolean; 'selection'?: TerminalReaderReaderResourceSelectionModel | undefined; 'signature'?: TerminalReaderReaderResourceSignatureModel | undefined; + /** + * Indicate that this input was skipped by the user. + */ 'skipped'?: boolean | undefined; 'text'?: TerminalReaderReaderResourceTextModel | undefined; + /** + * List of toggles being collected. Values are present if collection is complete. + */ 'toggles': TerminalReaderReaderResourceToggleModel[]; + /** + * Type of input being collected. + */ 'type': 'email' | 'numeric' | 'phone' | 'selection' | 'signature' | 'text'; }; +/** + * Represents a reader action to collect customer inputs + */ export type TerminalReaderReaderResourceCollectInputsActionModel = { + /** + * List of inputs to be collected. + */ 'inputs': TerminalReaderReaderResourceInputModel[]; + /** + * 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': { [key: string]: string; }; }; +/** + * Represents a per-transaction tipping configuration + */ export type TerminalReaderReaderResourceTippingConfigModel = { + /** + * Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + */ 'amount_eligible'?: number | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceCollectConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to collect a payment method + */ export type TerminalReaderReaderResourceCollectPaymentMethodActionModel = { + /** + * Account the payment intent belongs to. + */ 'account'?: string | undefined; 'collect_config'?: TerminalReaderReaderResourceCollectConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'payment_method'?: PaymentMethodModel | undefined; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceConfirmConfigModel = { + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; }; +/** + * Represents a reader action to confirm a payment + */ export type TerminalReaderReaderResourceConfirmPaymentIntentActionModel = { + /** + * Account the payment intent belongs to. + */ 'account'?: string | undefined; 'confirm_config'?: TerminalReaderReaderResourceConfirmConfigModel | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceProcessConfigModel = { + /** + * Enable customer-initiated cancellation when processing this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; + /** + * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + */ 'return_url'?: string | undefined; + /** + * Override showing a tipping selection screen on this transaction. + */ 'skip_tipping'?: boolean | undefined; 'tipping'?: TerminalReaderReaderResourceTippingConfigModel | undefined; }; +/** + * Represents a reader action to process a payment intent + */ export type TerminalReaderReaderResourceProcessPaymentIntentActionModel = { + /** + * Account the payment intent belongs to. + */ 'account'?: string | undefined; + /** + * Most recent PaymentIntent processed by the reader. + */ 'payment_intent': string | PaymentIntentModel; 'process_config'?: TerminalReaderReaderResourceProcessConfigModel | undefined; }; +/** + * Represents a per-setup override of a reader configuration + */ export type TerminalReaderReaderResourceProcessSetupConfigModel = { + /** + * Enable customer-initiated cancellation when processing this SetupIntent. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to process a setup intent + */ export type TerminalReaderReaderResourceProcessSetupIntentActionModel = { + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ 'generated_card'?: string | undefined; 'process_config'?: TerminalReaderReaderResourceProcessSetupConfigModel | undefined; + /** + * Most recent SetupIntent processed by the reader. + */ 'setup_intent': string | SetupIntentModel; }; +/** + * Represents a per-transaction override of a reader configuration + */ export type TerminalReaderReaderResourceRefundPaymentConfigModel = { + /** + * Enable customer-initiated cancellation when refunding this payment. + */ 'enable_customer_cancellation'?: boolean | undefined; }; +/** + * Represents a reader action to refund a payment + */ export type TerminalReaderReaderResourceRefundPaymentActionModel = { + /** + * Account the payment intent belongs to. + */ 'account'?: string | undefined; + /** + * The amount being refunded. + */ 'amount'?: number | undefined; + /** + * Charge that is being refunded. + */ 'charge'?: string | ChargeModel | undefined; + /** + * 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'?: { [key: string]: string; } | undefined; + /** + * Payment intent that is being refunded. + */ 'payment_intent'?: string | PaymentIntentModel | undefined; + /** + * The reason for the refund. + */ 'reason'?: 'duplicate' | 'fraudulent' | 'requested_by_customer' | undefined; + /** + * Unique identifier for the refund object. + */ 'refund'?: string | RefundModel | undefined; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + */ 'refund_application_fee'?: boolean | undefined; 'refund_payment_config'?: TerminalReaderReaderResourceRefundPaymentConfigModel | undefined; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + */ 'reverse_transfer'?: boolean | undefined; }; +/** + * Represents a line item to be displayed on the reader + */ export type TerminalReaderReaderResourceLineItemModel = { + /** + * The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'amount': number; + /** + * Description of the line item. + */ 'description': string; + /** + * The quantity of the line item. + */ 'quantity': number; }; +/** + * Represents a cart to be displayed on the reader + */ export type TerminalReaderReaderResourceCartModel = { + /** + * 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; + /** + * List of line items in the cart. + */ 'line_items': TerminalReaderReaderResourceLineItemModel[]; + /** + * Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'tax': number; + /** + * Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ 'total': number; }; +/** + * Represents a reader action to set the reader display + */ export type TerminalReaderReaderResourceSetReaderDisplayActionModel = { + /** + * Cart object to be displayed by the reader, including line items, amounts, and currency. + */ 'cart': TerminalReaderReaderResourceCartModel; + /** + * Type of information to be displayed by the reader. Only `cart` is currently supported. + */ 'type': 'cart'; }; +/** + * Represents an action performed by the reader + */ export type TerminalReaderReaderResourceReaderActionModel = { 'collect_inputs'?: TerminalReaderReaderResourceCollectInputsActionModel | undefined; 'collect_payment_method'?: TerminalReaderReaderResourceCollectPaymentMethodActionModel | undefined; 'confirm_payment_intent'?: TerminalReaderReaderResourceConfirmPaymentIntentActionModel | undefined; + /** + * Failure code, only set if status is `failed`. + */ 'failure_code': string; + /** + * Detailed failure message, only set if status is `failed`. + */ 'failure_message': string; 'process_payment_intent'?: TerminalReaderReaderResourceProcessPaymentIntentActionModel | undefined; 'process_setup_intent'?: TerminalReaderReaderResourceProcessSetupIntentActionModel | undefined; 'refund_payment'?: TerminalReaderReaderResourceRefundPaymentActionModel | undefined; 'set_reader_display'?: TerminalReaderReaderResourceSetReaderDisplayActionModel | undefined; + /** + * Status of the action performed by the reader. + */ 'status': 'failed' | 'in_progress' | 'succeeded'; + /** + * Type of action performed by the reader. + */ 'type': 'collect_inputs' | 'collect_payment_method' | 'confirm_payment_intent' | 'process_payment_intent' | 'process_setup_intent' | 'refund_payment' | 'set_reader_display'; }; +/** + * A Reader represents a physical device for accepting payment details. + * + * Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader) + */ export type TerminalReaderModel = { + /** + * The most recent action performed by the reader. + */ 'action': TerminalReaderReaderResourceReaderActionModel; + /** + * The current software version of the reader. + */ 'device_sw_version': string; + /** + * Device type of the reader. + */ 'device_type': 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'mobile_phone_reader' | 'simulated_stripe_s700' | 'simulated_wisepos_e' | 'stripe_m2' | 'stripe_s700' | 'verifone_P400'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * The local IP address of the reader. + */ 'ip_address': string; + /** + * Custom label given to the reader for easier identification. + */ 'label': string; + /** + * The last time this reader reported to Stripe backend. + */ 'last_seen_at': 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; + /** + * The location identifier of the reader. + */ 'location': string | TerminalLocationModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader'; + /** + * Serial number of the reader. + */ 'serial_number': string; + /** + * The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + */ 'status': 'offline' | 'online'; }; +/** + * Occurs whenever an action sent to a Terminal reader failed. + */ export type TerminalReaderActionFailedModel = { 'object': TerminalReaderModel; }; +/** + * Occurs whenever an action sent to a Terminal reader was successful. + */ export type TerminalReaderActionSucceededModel = { 'object': TerminalReaderModel; }; +/** + * Occurs whenever an action sent to a Terminal reader is updated. + */ export type TerminalReaderActionUpdatedModel = { 'object': TerminalReaderModel; }; +/** + * Represents magstripe data collected by the reader. + */ export type TerminalReaderCollectedDataResourceMagstripeDataModel = { + /** + * The raw magstripe data collected by the reader. + */ 'data': string; }; +/** + * Returns data collected by Terminal readers. This data is only stored for 24 hours. + */ export type TerminalReaderCollectedDataModel = { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The magstripe data collected by the reader. + */ 'magstripe': TerminalReaderCollectedDataResourceMagstripeDataModel; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'terminal.reader_collected_data'; + /** + * The type of data collected by the reader. + */ 'type': 'magstripe'; }; +/** + * Occurs whenever a test clock starts advancing. + */ export type TestHelpersTestClockAdvancingModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock is created. + */ export type TestHelpersTestClockCreatedModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock is deleted. + */ export type TestHelpersTestClockDeletedModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock fails to advance its frozen time. + */ export type TestHelpersTestClockInternalFailureModel = { 'object': TestHelpersTestClockModel; }; +/** + * Occurs whenever a test clock transitions to a ready status. + */ export type TestHelpersTestClockReadyModel = { 'object': TestHelpersTestClockModel; }; +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export type TokenModel = { 'bank_account'?: BankAccountModel | undefined; 'card'?: CardModel | undefined; + /** + * IP address of the client that generates the token. + */ 'client_ip': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'token'; + /** + * Type of the token: `account`, `bank_account`, `card`, or `pii`. + */ 'type': string; + /** + * Determines if you have already used this token (you can only use tokens once). + */ 'used': boolean; }; +/** + * Occurs whenever a top-up is canceled. + */ export type TopupCanceledModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up is created. + */ export type TopupCreatedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up fails. + */ export type TopupFailedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up is reversed. + */ export type TopupReversedModel = { 'object': TopupModel; }; +/** + * Occurs whenever a top-up succeeds. + */ export type TopupSucceededModel = { 'object': TopupModel; }; +/** + * Occurs whenever a transfer is created. + */ export type TransferCreatedModel = { 'object': TransferModel; }; +/** + * Occurs whenever a transfer is reversed, including partial reversals. + */ export type TransferReversedModel = { 'object': TransferModel; }; +/** + * Occurs whenever a transfer's description or metadata is updated. + */ export type TransferUpdatedModel = { 'object': TransferModel; }; export type TreasuryReceivedCreditsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the CreditReversal changed status to `posted` + */ 'posted_at': number; }; +/** + * Change to a FinancialAccount's balance + */ export type TreasuryTransactionsResourceBalanceImpactModel = { + /** + * The change made to funds the user can spend right now. + */ 'cash': number; + /** + * The change made to funds that are not spendable yet, but will become available at a later time. + */ 'inbound_pending': number; + /** + * The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': number; }; export type TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel = { + /** + * Set if there is an Issuing dispute associated with the DebitReversal. + */ 'issuing_dispute': string; }; export type TreasuryReceivedDebitsResourceStatusTransitionsModel = { + /** + * Timestamp describing when the DebitReversal changed status to `completed`. + */ 'completed_at': number; }; +/** + * You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ export type TreasuryDebitReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Other flows linked to a DebitReversal. + */ 'linked_flows': TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsModel; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'card'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.debit_reversal'; + /** + * The ReceivedDebit being reversed. + */ 'received_debit': string; + /** + * Status of the DebitReversal + */ 'status': 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryReceivedDebitsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryInboundTransfersResourceFailureDetailsModel = { + /** + * Reason for the failure. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'debit_not_authorized' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'insufficient_funds' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; }; export type TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel = { + /** + * If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. + */ 'received_debit': string; }; export type TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel = { + /** + * Timestamp describing when an InboundTransfer changed status to `canceled`. + */ 'canceled_at'?: number | undefined; + /** + * Timestamp describing when an InboundTransfer changed status to `failed`. + */ 'failed_at': number; + /** + * Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ 'succeeded_at': number; }; +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export type TreasuryInboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the InboundTransfer is able to be canceled. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Details about this InboundTransfer's failure. Only set when status is `failed`. + */ 'failure_details': TreasuryInboundTransfersResourceFailureDetailsModel; + /** + * The FinancialAccount that received the funds. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'linked_flows': TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsModel; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.inbound_transfer'; + /** + * The origin payment method to be debited for an InboundTransfer. + */ 'origin_payment_method': string; + /** + * Details about the PaymentMethod for an InboundTransfer. + */ 'origin_payment_method_details': InboundTransfersModel; + /** + * Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + */ 'returned': boolean; + /** + * Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + */ 'statement_descriptor': string; + /** + * Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + */ 'status': 'canceled' | 'failed' | 'processing' | 'succeeded'; 'status_transitions': TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel = { + /** + * IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. + */ 'ip_address': string; + /** + * `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + */ 'present': boolean; }; export type TreasuryOutboundPaymentsResourceReturnedStatusModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundPayment changed status to `canceled`. + */ 'canceled_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `failed`. + */ 'failed_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `posted`. + */ 'posted_at': number; + /** + * Timestamp describing when an OutboundPayment changed status to `returned`. + */ 'returned_at': number; }; export type TreasuryOutboundPaymentsResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundPayment for payments sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'chips': string; + /** + * IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'imad': string; + /** + * OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + */ 'omad': string; }; export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundPaymentsResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export type TreasuryOutboundPaymentModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + */ 'customer': string; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + */ 'destination_payment_method': string; + /** + * Details about the PaymentMethod for an OutboundPayment. + */ 'destination_payment_method_details': OutboundPaymentsPaymentMethodDetailsModel; + /** + * Details about the end user. + */ 'end_user_details': TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsModel; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_payment'; + /** + * Details about a returned OutboundPayment. Only set when the status is `returned`. + */ 'returned_details': TreasuryOutboundPaymentsResourceReturnedStatusModel; + /** + * The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + */ 'statement_descriptor': string; + /** + * Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details': TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceAchNetworkDetailsModel = { + /** + * ACH Addenda record + */ 'addenda': string; }; export type TreasuryOutboundTransfersResourceNetworkDetailsModel = { + /** + * Details about an ACH transaction. + */ 'ach'?: TreasuryOutboundTransfersResourceAchNetworkDetailsModel | undefined; + /** + * The type of flow that originated the OutboundTransfer. + */ 'type': 'ach'; }; export type TreasuryOutboundTransfersResourceReturnedDetailsModel = { + /** + * Reason for the return. + */ 'code': 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryOutboundTransfersResourceStatusTransitionsModel = { + /** + * Timestamp describing when an OutboundTransfer changed status to `canceled` + */ 'canceled_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `failed` + */ 'failed_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `posted` + */ 'posted_at': number; + /** + * Timestamp describing when an OutboundTransfer changed status to `returned` + */ 'returned_at': number; }; export type TreasuryOutboundTransfersResourceAchTrackingDetailsModel = { + /** + * ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. + */ 'trace_id': string; }; export type TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel = { + /** + * CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'chips': string; + /** + * IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'imad': string; + /** + * OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + */ 'omad': string; }; export type TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel = { 'ach'?: TreasuryOutboundTransfersResourceAchTrackingDetailsModel | undefined; + /** + * The US bank account network used to send funds. + */ 'type': 'ach' | 'us_domestic_wire'; 'us_domestic_wire'?: TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsModel | undefined; }; +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export type TreasuryOutboundTransferModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Returns `true` if the object can be canceled, and `false` otherwise. + */ 'cancelable': boolean; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * The PaymentMethod used as the payment instrument for an OutboundTransfer. + */ 'destination_payment_method': string; 'destination_payment_method_details': OutboundTransfersPaymentMethodDetailsModel; + /** + * The date when funds are expected to arrive in the destination account. + */ 'expected_arrival_date': number; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * Details about the network used for the OutboundTransfer. + */ 'network_details'?: TreasuryOutboundTransfersResourceNetworkDetailsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.outbound_transfer'; + /** + * Details about a returned OutboundTransfer. Only set when the status is `returned`. + */ 'returned_details': TreasuryOutboundTransfersResourceReturnedDetailsModel; + /** + * Information about the OutboundTransfer to be sent to the recipient account. + */ 'statement_descriptor': string; + /** + * Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + */ 'status': 'canceled' | 'failed' | 'posted' | 'processing' | 'returned'; 'status_transitions': TreasuryOutboundTransfersResourceStatusTransitionsModel; + /** + * Details about network-specific tracking information if available. + */ 'tracking_details': TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel = { + /** + * Bank name. + */ 'bank_name': string; + /** + * The last four digits of the bank account number. + */ 'last4': string; + /** + * The routing number for the bank account. + */ 'routing_number': string; }; export type TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel = { + /** + * Set when `type` is `balance`. + */ 'balance'?: 'payments' | undefined; 'billing_details': TreasurySharedResourceBillingDetailsModel; 'financial_account'?: ReceivedPaymentMethodDetailsFinancialAccountModel | undefined; + /** + * Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + */ 'issuing_card'?: string | undefined; + /** + * Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + */ 'type': 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account'; 'us_bank_account'?: TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountModel | undefined; }; @@ -12913,92 +32712,257 @@ export type TreasuryReceivedCreditsResourceSourceFlowsDetailsModel = { 'outbound_payment'?: TreasuryOutboundPaymentModel | undefined; 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'payout'?: PayoutModel | undefined; + /** + * The type of the source flow that originated the ReceivedCredit. + */ 'type': 'credit_reversal' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'payout'; }; export type TreasuryReceivedCreditsResourceLinkedFlowsModel = { + /** + * The CreditReversal created as a result of this ReceivedCredit being reversed. + */ 'credit_reversal': string; + /** + * Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization': string; + /** + * Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. + */ 'issuing_transaction': string; + /** + * ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. + */ 'source_flow': string; + /** + * The expandable object of the source flow. + */ 'source_flow_details'?: TreasuryReceivedCreditsResourceSourceFlowsDetailsModel | undefined; + /** + * The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). + */ 'source_flow_type': string; }; export type TreasuryReceivedCreditsResourceAchNetworkDetailsModel = { + /** + * ACH Addenda record + */ 'addenda': string; }; export type TreasuryReceivedCreditsResourceNetworkDetailsModel = { + /** + * Details about an ACH transaction. + */ 'ach'?: TreasuryReceivedCreditsResourceAchNetworkDetailsModel | undefined; + /** + * The type of flow that originated the ReceivedCredit. + */ 'type': 'ach'; }; export type TreasuryReceivedCreditsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedCredit can be reversed. + */ 'deadline': number; + /** + * Set if a ReceivedCredit cannot be reversed. + */ 'restricted_reason': 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted'; }; +/** + * ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ export type TreasuryReceivedCreditModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + */ 'failure_code': 'account_closed' | 'account_frozen' | 'international_transaction' | 'other'; + /** + * The FinancialAccount that received the funds. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details': TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel; 'linked_flows': TreasuryReceivedCreditsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The rails used to send the funds. + */ 'network': 'ach' | 'card' | 'stripe' | 'us_domestic_wire'; + /** + * Details specific to the money movement rails. + */ 'network_details'?: TreasuryReceivedCreditsResourceNetworkDetailsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_credit'; + /** + * Details describing when a ReceivedCredit may be reversed. + */ 'reversal_details': TreasuryReceivedCreditsResourceReversalDetailsModel; + /** + * Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; export type TreasuryReceivedDebitsResourceLinkedFlowsModel = { + /** + * The DebitReversal created as a result of this ReceivedDebit being reversed. + */ 'debit_reversal': string; + /** + * Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. + */ 'inbound_transfer': string; + /** + * Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + */ 'issuing_authorization': string; + /** + * Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. + */ 'issuing_transaction': string; + /** + * Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + */ 'payout': string; + /** + * The ReceivedCredit that Capital withheld from + */ 'received_credit_capital_withholding'?: string | undefined; }; export type TreasuryReceivedDebitsResourceAchNetworkDetailsModel = { + /** + * ACH Addenda record + */ 'addenda': string; }; export type TreasuryReceivedDebitsResourceNetworkDetailsModel = { + /** + * Details about an ACH transaction. + */ 'ach'?: TreasuryReceivedDebitsResourceAchNetworkDetailsModel | undefined; + /** + * The type of flow that originated the ReceivedDebit. + */ 'type': 'ach'; }; export type TreasuryReceivedDebitsResourceReversalDetailsModel = { + /** + * Time before which a ReceivedDebit can be reversed. + */ 'deadline': number; + /** + * Set if a ReceivedDebit can't be reversed. + */ 'restricted_reason': 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted'; }; +/** + * ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ export type TreasuryReceivedDebitModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + */ 'failure_code': 'account_closed' | 'account_frozen' | 'insufficient_funds' | 'international_transaction' | 'other'; + /** + * The FinancialAccount that funds were pulled from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; 'initiating_payment_method_details'?: TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsModel | undefined; 'linked_flows': TreasuryReceivedDebitsResourceLinkedFlowsModel; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * The network used for the ReceivedDebit. + */ 'network': 'ach' | 'card' | 'stripe'; + /** + * Details specific to the money movement rails. + */ 'network_details'?: TreasuryReceivedDebitsResourceNetworkDetailsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.received_debit'; + /** + * Details describing when a ReceivedDebit might be reversed. + */ 'reversal_details': TreasuryReceivedDebitsResourceReversalDetailsModel; + /** + * Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + */ 'status': 'failed' | 'succeeded'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; @@ -13011,329 +32975,793 @@ export type TreasuryTransactionsResourceFlowDetailsModel = { 'outbound_transfer'?: TreasuryOutboundTransferModel | undefined; 'received_credit'?: TreasuryReceivedCreditModel | undefined; 'received_debit'?: TreasuryReceivedDebitModel | undefined; + /** + * Type of the flow that created the Transaction. Set to the same value as `flow_type`. + */ 'type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; }; +/** + * TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ export type TreasuryTransactionEntryModel = { 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * When the TransactionEntry will impact the FinancialAccount's balance. + */ 'effective_at': number; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * Token of the flow associated with the TransactionEntry. + */ 'flow': string; + /** + * Details of the flow associated with the TransactionEntry. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow associated with the TransactionEntry. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction_entry'; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; + /** + * The specific money movement that generated the TransactionEntry. + */ 'type': 'credit_reversal' | 'credit_reversal_posting' | 'debit_reversal' | 'inbound_transfer' | 'inbound_transfer_return' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'other' | 'outbound_payment' | 'outbound_payment_cancellation' | 'outbound_payment_failure' | 'outbound_payment_posting' | 'outbound_payment_return' | 'outbound_transfer' | 'outbound_transfer_cancellation' | 'outbound_transfer_failure' | 'outbound_transfer_posting' | 'outbound_transfer_return' | 'received_credit' | 'received_debit'; }; export type TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel = { + /** + * Timestamp describing when the Transaction changed status to `posted`. + */ 'posted_at': number; + /** + * Timestamp describing when the Transaction changed status to `void`. + */ 'void_at': number; }; +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export type TreasuryTransactionModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; 'balance_impact': TreasuryTransactionsResourceBalanceImpactModel; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ 'description': string; + /** + * A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ 'entries'?: { + /** + * Details about each object. + */ 'data': TreasuryTransactionEntryModel[]; + /** + * True if this list has another page of items after this one that can be fetched. + */ 'has_more': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ 'object': 'list'; + /** + * The URL where this list can be accessed. + */ 'url': string; } | undefined; + /** + * The FinancialAccount associated with this object. + */ 'financial_account': string; + /** + * ID of the flow that created the Transaction. + */ 'flow': string; + /** + * Details of the flow that created the Transaction. + */ 'flow_details'?: TreasuryTransactionsResourceFlowDetailsModel | undefined; + /** + * Type of the flow that created the Transaction. + */ 'flow_type': 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit'; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ 'livemode': boolean; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.transaction'; + /** + * Status of the Transaction. + */ 'status': 'open' | 'posted' | 'void'; 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsModel; }; +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export type TreasuryCreditReversalModel = { + /** + * Amount (in cents) transferred. + */ 'amount': number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * 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; + /** + * The FinancialAccount to reverse funds from. + */ 'financial_account': string; + /** + * A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + */ 'hosted_regulatory_receipt_url': string; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * The rails used to reverse the funds. + */ 'network': 'ach' | 'stripe'; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.credit_reversal'; + /** + * The ReceivedCredit being reversed. + */ 'received_credit': string; + /** + * Status of the CreditReversal + */ 'status': 'canceled' | 'posted' | 'processing'; 'status_transitions': TreasuryReceivedCreditsResourceStatusTransitionsModel; + /** + * The Transaction associated with this object. + */ 'transaction': string | TreasuryTransactionModel; }; +/** + * Occurs whenever an CreditReversal is submitted and created. + */ export type TreasuryCreditReversalCreatedModel = { 'object': TreasuryCreditReversalModel; }; +/** + * Occurs whenever an CreditReversal post is posted. + */ export type TreasuryCreditReversalPostedModel = { 'object': TreasuryCreditReversalModel; }; +/** + * Occurs whenever a DebitReversal is completed. + */ export type TreasuryDebitReversalCompletedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Occurs whenever a DebitReversal is created. + */ export type TreasuryDebitReversalCreatedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Occurs whenever an initial credit is granted on a DebitReversal. + */ export type TreasuryDebitReversalInitialCreditGrantedModel = { 'object': TreasuryDebitReversalModel; }; +/** + * Balance information for the FinancialAccount + */ export type TreasuryFinancialAccountsResourceBalanceModel = { + /** + * Funds the user can spend right now. + */ 'cash': { [key: string]: number; }; + /** + * Funds not spendable yet, but will become available at a later time. + */ 'inbound_pending': { [key: string]: number; }; + /** + * Funds in the account, but not spendable because they are being held for pending outbound flows. + */ 'outbound_pending': { [key: string]: number; }; }; +/** + * Additional details on the FinancialAccount Features information. + */ export type TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel = { + /** + * Represents the reason why the status is `pending` or `restricted`. + */ 'code': 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other'; + /** + * Represents what the user should do, if anything, to activate the Feature. + */ 'resolution': 'contact_stripe' | 'provide_information' | 'remove_restriction'; + /** + * The `platform_restrictions` that are restricting this Feature. + */ 'restriction'?: 'inbound_flows' | 'outbound_flows' | undefined; }; +/** + * Toggle settings for enabling/disabling a feature + */ export type TreasuryFinancialAccountsResourceToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export type TreasuryFinancialAccountsResourceAbaToggleSettingsModel = { + /** + * Requested bank partner for this Financial Account + */ 'bank'?: 'evolve' | 'fifth_third' | 'goldman_sachs' | undefined; + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Financial Addresses features on a Financial Account + */ export type TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceInboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceInboundAchToggleSettingsModel | undefined; }; +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export type TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel = { + /** + * Whether the FinancialAccount should have the Feature. + */ 'requested': boolean; + /** + * Whether the Feature is operational. + */ 'status': 'active' | 'pending' | 'restricted'; + /** + * Additional details; includes at least one entry when the status is not `active`. + */ 'status_details': TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsModel[]; }; +/** + * Settings related to Outbound Payments features on a Financial Account + */ export type TreasuryFinancialAccountsResourceOutboundPaymentsModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceOutboundTransfersModel = { 'ach'?: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsModel | undefined; 'us_domestic_wire'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; }; +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export type TreasuryFinancialAccountFeaturesModel = { 'card_issuing'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'deposit_insurance'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; 'financial_addresses'?: TreasuryFinancialAccountsResourceFinancialAddressesFeaturesModel | undefined; 'inbound_transfers'?: TreasuryFinancialAccountsResourceInboundTransfersModel | undefined; 'intra_stripe_flows'?: TreasuryFinancialAccountsResourceToggleSettingsModel | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account_features'; 'outbound_payments'?: TreasuryFinancialAccountsResourceOutboundPaymentsModel | undefined; 'outbound_transfers'?: TreasuryFinancialAccountsResourceOutboundTransfersModel | undefined; }; +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export type TreasuryFinancialAccountsResourceAbaRecordModel = { + /** + * The name of the person or business that owns the bank account. + */ 'account_holder_name': string; + /** + * The account number. + */ 'account_number'?: string | undefined; + /** + * The last four characters of the account number. + */ 'account_number_last4': string; + /** + * Name of the bank. + */ 'bank_name': string; + /** + * Routing number for the account. + */ 'routing_number': string; }; +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ export type TreasuryFinancialAccountsResourceFinancialAddressModel = { 'aba'?: TreasuryFinancialAccountsResourceAbaRecordModel | undefined; + /** + * The list of networks that the address supports + */ 'supported_networks'?: Array<'ach' | 'us_domestic_wire'> | undefined; + /** + * The type of financial address + */ 'type': 'aba'; }; +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export type TreasuryFinancialAccountsResourcePlatformRestrictionsModel = { + /** + * Restricts all inbound money movement. + */ 'inbound_flows': 'restricted' | 'unrestricted'; + /** + * Restricts all outbound money movement. + */ 'outbound_flows': 'restricted' | 'unrestricted'; }; export type TreasuryFinancialAccountsResourceClosedStatusDetailsModel = { + /** + * The array that contains reasons for a FinancialAccount closure. + */ 'reasons': Array<'account_rejected' | 'closed_by_platform' | 'other'>; }; export type TreasuryFinancialAccountsResourceStatusDetailsModel = { + /** + * Details related to the closure of this FinancialAccount + */ 'closed': TreasuryFinancialAccountsResourceClosedStatusDetailsModel; }; +/** + * Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ export type TreasuryFinancialAccountModel = { + /** + * The array of paths to active Features in the Features hash. + */ 'active_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; 'balance': TreasuryFinancialAccountsResourceBalanceModel; + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ 'country': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + */ 'display_name'?: string | undefined; 'features'?: TreasuryFinancialAccountFeaturesModel | undefined; + /** + * The set of credentials that resolve to a FinancialAccount. + */ 'financial_addresses': TreasuryFinancialAccountsResourceFinancialAddressModel[]; + /** + * Unique identifier for the object. + */ 'id': string; 'is_default'?: boolean | undefined; + /** + * 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': { [key: string]: string; }; + /** + * The nickname for the FinancialAccount. + */ 'nickname'?: string | undefined; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'treasury.financial_account'; + /** + * The array of paths to pending Features in the Features hash. + */ 'pending_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * The set of functionalities that the platform can restrict on the FinancialAccount. + */ 'platform_restrictions'?: TreasuryFinancialAccountsResourcePlatformRestrictionsModel | undefined; + /** + * The array of paths to restricted Features in the Features hash. + */ 'restricted_features'?: Array<'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture'> | undefined; + /** + * Status of this FinancialAccount. + */ 'status': 'closed' | 'open'; 'status_details': TreasuryFinancialAccountsResourceStatusDetailsModel; + /** + * The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + */ 'supported_currencies': string[]; }; +/** + * Occurs whenever the status of the FinancialAccount becomes closed. + */ export type TreasuryFinancialAccountClosedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever a new FinancialAccount is created. + */ export type TreasuryFinancialAccountCreatedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever the statuses of any features within an existing FinancialAccount are updated. + */ export type TreasuryFinancialAccountFeaturesStatusUpdatedModel = { 'object': TreasuryFinancialAccountModel; }; +/** + * Occurs whenever an InboundTransfer is canceled. + */ export type TreasuryInboundTransferCanceledModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer is created. + */ export type TreasuryInboundTransferCreatedModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer has failed. + */ export type TreasuryInboundTransferFailedModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an InboundTransfer has succeeded. + */ export type TreasuryInboundTransferSucceededModel = { 'object': TreasuryInboundTransferModel; }; +/** + * Occurs whenever an OutboundPayment is canceled. + */ export type TreasuryOutboundPaymentCanceledModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever a new OutboundPayment is successfully created. + */ export type TreasuryOutboundPaymentCreatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever the arrival date on an OutboundPayment updates. + */ export type TreasuryOutboundPaymentExpectedArrivalDateUpdatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment fails. + */ export type TreasuryOutboundPaymentFailedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment posts. + */ export type TreasuryOutboundPaymentPostedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundPayment was returned. + */ export type TreasuryOutboundPaymentReturnedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever tracking_details on an OutboundPayment is updated. + */ export type TreasuryOutboundPaymentTrackingDetailsUpdatedModel = { 'object': TreasuryOutboundPaymentModel; }; +/** + * Occurs whenever an OutboundTransfer is canceled. + */ export type TreasuryOutboundTransferCanceledModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is created. + */ export type TreasuryOutboundTransferCreatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever the arrival date on an OutboundTransfer updates. + */ export type TreasuryOutboundTransferExpectedArrivalDateUpdatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer has failed. + */ export type TreasuryOutboundTransferFailedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is posted. + */ export type TreasuryOutboundTransferPostedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever an OutboundTransfer is returned. + */ export type TreasuryOutboundTransferReturnedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever tracking_details on an OutboundTransfer is updated. + */ export type TreasuryOutboundTransferTrackingDetailsUpdatedModel = { 'object': TreasuryOutboundTransferModel; }; +/** + * Occurs whenever a received_credit is created as a result of funds being pushed by another account. + */ export type TreasuryReceivedCreditCreatedModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits. + */ export type TreasuryReceivedCreditFailedModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_credit transitions to succeeded state. Only applicable for check deposits. + */ export type TreasuryReceivedCreditSucceededModel = { 'object': TreasuryReceivedCreditModel; }; +/** + * Occurs whenever a received_debit is created as a result of funds being pulled by another account. + */ export type TreasuryReceivedDebitCreatedModel = { 'object': TreasuryReceivedDebitModel; }; +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export type WebhookEndpointModel = { + /** + * The API version events are rendered as for this webhook endpoint. + */ 'api_version': string; + /** + * The ID of the associated Connect application. + */ 'application': string; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ 'created': number; + /** + * An optional description of what the webhook is used for. + */ 'description': string; + /** + * The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + */ 'enabled_events': string[]; + /** + * Unique identifier for the object. + */ 'id': string; + /** + * 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': { [key: string]: string; }; + /** + * String representing the object's type. Objects of the same type share the same value. + */ 'object': 'webhook_endpoint'; + /** + * The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. + */ 'secret'?: string | undefined; + /** + * The status of the webhook. It can be `enabled` or `disabled`. + */ 'status': string; + /** + * The URL of the webhook endpoint. + */ 'url': string; }; @@ -13486,6 +33914,11 @@ export const LegalEntityRepresentativeDeclaration: z.ZodType = z.object({ 'created': z.number().int(), 'expired': z.boolean(), @@ -13498,6 +33931,15 @@ export const FileLink: z.ZodType = z.object({ 'url': z.string() }); +/** + * 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 independently (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File upload guide](https://stripe.com/docs/file-upload) + */ export const File: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -13591,6 +34033,9 @@ export const CustomerBalanceCustomerBalanceSettings: z.ZodType = z.object({ 'available': z.record(z.string(), z.number().int()), 'customer': z.string(), @@ -13610,6 +34055,13 @@ export const TokenCardNetworks: z.ZodType = z.object({ 'preferred': z.string() }); +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + */ export const Card: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'address_city': z.string(), @@ -13951,6 +34403,18 @@ export const SourceTypeWechat: z.ZodType = z.object({ 'statement_descriptor': z.string().optional() }); +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ export const Source: z.ZodType = z.object({ 'ach_credit_transfer': SourceTypeAchCreditTransfer.optional(), 'ach_debit': SourceTypeAchDebit.optional(), @@ -14010,6 +34474,11 @@ export const Script: z.ZodType = z.object({ 'id': z.string() }); +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ export const Coupon: z.ZodType = z.object({ 'amount_off': z.number().int(), 'applies_to': CouponAppliesTo.optional(), @@ -14048,6 +34517,13 @@ export const PromotionCodesResourceRestrictions: z.ZodType = z.object({ 'active': z.boolean(), 'code': z.string(), @@ -14070,6 +34546,12 @@ export const DiscountSource: z.ZodType = z.object({ 'type': z.enum(['coupon']) }); +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + */ export const Discount: z.ZodType = z.object({ 'checkout_session': z.string(), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]), @@ -14379,6 +34861,9 @@ export const MandateSingleUse: z.ZodType = z.object({ 'currency': z.string() }); +/** + * A Mandate is a record of the permission that your customer gives you to debit their payment method. + */ export const Mandate: z.ZodType = z.object({ 'customer_acceptance': CustomerAcceptance, 'id': z.string(), @@ -14868,6 +35353,18 @@ export const PaymentFlowsPaymentIntentPresentmentDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_reversed': z.number().int(), @@ -14894,6 +35391,21 @@ export const Transfer: z.ZodType = z.object({ 'transfer_group': z.string() }); +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + */ export const TransferReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -14907,6 +35419,13 @@ export const TransferReversal: z.ZodType = z.object({ 'transfer': z.union([z.string(), z.lazy(() => Transfer)]) }); +/** + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds) + */ export const Refund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -14944,6 +35463,12 @@ export const CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromP 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ export const CustomerCashBalanceTransaction: z.ZodType = z.object({ 'adjusted_for_overdraft': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft).optional(), 'applied_to_payment': z.lazy(() => CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction).optional(), @@ -15095,6 +35620,13 @@ export const DisputeSmartDisputes: z.ZodType = z.obje 'status': z.enum(['available', 'processing', 'requires_evidence', 'unavailable']) }); +/** + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. + * + * Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) + */ export const Dispute: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)), @@ -15118,6 +35650,13 @@ export const Dispute: z.ZodType = z.object({ 'status': z.enum(['lost', 'needs_response', 'prevented', 'under_review', 'warning_closed', 'warning_needs_response', 'warning_under_review', 'won']) }); +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + */ export const FeeRefund: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -15195,6 +35734,11 @@ export const IssuingCardholderAuthorizationControls: z.ZodType = z.object({ 'billing': IssuingCardholderAddress, 'company': z.union([IssuingCardholderCompany]), @@ -15232,6 +35776,9 @@ export const IssuingPhysicalBundleFeatures: z.ZodType = z.object({ 'features': IssuingPhysicalBundleFeatures, 'id': z.string(), @@ -15252,6 +35799,9 @@ export const IssuingPersonalizationDesignRejectionReasons: z.ZodType = z.object({ 'card_logo': z.union([z.string(), z.lazy(() => File)]), 'carrier_text': z.union([IssuingPersonalizationDesignCarrierText]), @@ -15325,6 +35875,9 @@ export const IssuingCardWallets: z.ZodType = z.object({ 'primary_account_identifier': z.string() }); +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + */ export const IssuingCard: z.ZodType = z.object({ 'brand': z.string(), 'cancellation_reason': z.enum(['design_rejected', 'lost', 'stolen']), @@ -15497,6 +36050,9 @@ export const IssuingNetworkTokenNetworkData: z.ZodType = z.object({ 'card': z.union([z.string(), z.lazy(() => IssuingCard)]), 'created': z.number().int(), @@ -15598,6 +36154,11 @@ export const IssuingDisputeTreasury: z.ZodType = z. 'received_debit': z.string() }); +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + */ export const IssuingDispute: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transactions': z.array(z.lazy(() => BalanceTransaction)).optional(), @@ -15700,6 +36261,9 @@ export const IssuingTransactionPurchaseDetails: z.ZodType = z.object({ 'bin': z.string(), 'clearing_date': z.number().int(), @@ -15727,6 +36291,13 @@ export const IssuingTransactionTreasury: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingTransactionAmountDetails]), @@ -15778,6 +36349,13 @@ export const IssuingAuthorizationVerificationData: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_details': z.union([IssuingAuthorizationAmountDetails]), @@ -15831,6 +36409,16 @@ export const PayoutsTraceId: z.ZodType = z.object({ 'value': z.string() }); +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * and list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + */ export const Payout: z.ZodType = z.object({ 'amount': z.number().int(), 'application_fee': z.union([z.string(), z.lazy(() => ApplicationFee)]), @@ -15877,6 +36465,13 @@ export const TaxDeductedAtSource: z.ZodType = z.object 'tax_deduction_account_number': z.string() }); +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + */ export const Topup: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -15898,6 +36493,12 @@ export const Topup: z.ZodType = z.object({ export const BalanceTransactionSource: z.ZodType = z.union([z.lazy(() => ApplicationFee), z.lazy(() => Charge), z.lazy(() => ConnectCollectionTransfer), z.lazy(() => CustomerCashBalanceTransaction), z.lazy(() => Dispute), z.lazy(() => FeeRefund), z.lazy(() => IssuingAuthorization), z.lazy(() => IssuingDispute), z.lazy(() => IssuingTransaction), z.lazy(() => Payout), z.lazy(() => Refund), ReserveTransaction, TaxDeductedAtSource, z.lazy(() => Topup), z.lazy(() => Transfer), z.lazy(() => TransferReversal)]); +/** + * Balance transactions represent funds moving through your Stripe account. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + * + * Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + */ export const BalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'available_on': z.number().int(), @@ -16624,6 +37225,9 @@ export const PaymentMethodDetails: z.ZodType = z.obje 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ export const RadarRadarOptions: z.ZodType = z.object({ 'session': z.string().optional() }); @@ -16643,6 +37247,12 @@ export const RadarReviewResourceSession: z.ZodType = z.object({ 'billing_zip': z.string(), 'charge': z.union([z.string(), z.lazy(() => Charge)]), @@ -16665,6 +37275,11 @@ export const ChargeTransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * The `Charge` object represents a single attempt to move money into your Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://stripe.com/docs/connect/account-debits) may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ export const Charge: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_captured': z.number().int(), @@ -16752,6 +37367,9 @@ export const PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode: z.ZodT 'qr_code': PaymentIntentNextActionCashappQrCode }); +/** + * ABA Records contain U.S. bank account details per the ABA format. + */ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16762,6 +37380,9 @@ export const FundingInstructionsBankTransferAbaRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16771,6 +37392,9 @@ export const FundingInstructionsBankTransferIbanRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16779,6 +37403,9 @@ export const FundingInstructionsBankTransferSortCodeRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16788,6 +37415,9 @@ export const FundingInstructionsBankTransferSpeiRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16798,6 +37428,9 @@ export const FundingInstructionsBankTransferSwiftRecord: z.ZodType = z.object({ 'account_holder_address': Address, 'account_holder_name': z.string(), @@ -16810,6 +37443,9 @@ export const FundingInstructionsBankTransferZenginRecord: z.ZodType = z.object({ 'aba': FundingInstructionsBankTransferAbaRecord.optional(), 'iban': FundingInstructionsBankTransferIbanRecord.optional(), @@ -17567,6 +38203,19 @@ export const TransferData: z.ZodType = z.object({ 'destination': z.union([z.string(), z.lazy(() => Account)]) }); +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + */ export const PaymentIntent: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_capturable': z.number().int(), @@ -17760,6 +38409,29 @@ export const SetupIntentPaymentMethodOptions: z.ZodType = z.object({ 'application': z.union([z.string(), Application]), 'attach_to_self': z.boolean().optional(), @@ -17809,6 +38481,12 @@ export const ApiErrors: z.ZodType = z.object({ 'type': z.enum(['api_error', 'card_error', 'idempotency_error', 'invalid_request_error']) }); +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ export const SetupAttempt: z.ZodType = z.object({ 'application': z.union([z.string(), Application]), 'attach_to_self': z.boolean().optional(), @@ -18204,6 +38882,13 @@ export const PaymentMethodZip: z.ZodType = z.object({ }); +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ export const PaymentMethod: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -18321,6 +39006,9 @@ export const SubscriptionsResourceBillingModeFlexible: z.ZodType = z.object({ 'flexible': z.union([SubscriptionsResourceBillingModeFlexible]), 'type': z.enum(['classic', 'flexible']), @@ -18366,6 +39054,9 @@ export const PackageDimensions: z.ZodType = z.object({ 'width': z.number() }); +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ export const TaxCode: z.ZodType = z.object({ 'description': z.string(), 'id': z.string(), @@ -18373,6 +39064,16 @@ export const TaxCode: z.ZodType = z.object({ 'object': z.enum(['tax_code']) }); +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payment-links), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ export const Product: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -18414,6 +39115,14 @@ export const TransformQuantity: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Price: z.ZodType = z.object({ 'active': z.boolean(), 'billing_scheme': z.enum(['per_unit', 'tiered']), @@ -18439,16 +39148,25 @@ export const Price: z.ZodType = z.object({ 'unit_amount_decimal': z.string() }); +/** + * Represents the entities that the billing schedule applies to. + */ export const SubscriptionsResourceBillingSchedulesAppliesTo: z.ZodType = z.object({ 'price': z.union([z.string(), z.lazy(() => Price)]), 'type': z.enum(['price']) }); +/** + * Configures the `bill_until` date based on the provided `interval` and `interval_count`. + */ export const SubscriptionsResourceBillingSchedulesBillUntilDuration: z.ZodType = z.object({ 'interval': z.enum(['day', 'month', 'week', 'year']), 'interval_count': z.number().int() }); +/** + * Specifies the end of billing period. + */ export const SubscriptionsResourceBillingSchedulesBillUntil: z.ZodType = z.object({ 'computed_timestamp': z.number().int(), 'duration': z.union([SubscriptionsResourceBillingSchedulesBillUntilDuration]), @@ -18456,6 +39174,9 @@ export const SubscriptionsResourceBillingSchedulesBillUntil: z.ZodType = z.object({ 'applies_to': z.array(z.lazy(() => SubscriptionsResourceBillingSchedulesAppliesTo)), 'bill_until': SubscriptionsResourceBillingSchedulesBillUntil, @@ -18473,11 +39194,19 @@ export const CancellationDetails: z.ZodType = z.object 'reason': z.enum(['cancellation_requested', 'payment_disputed', 'payment_failed']) }); +/** + * The amount of the tax rate when the `rate_type`` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + */ export const TaxRateFlatAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string() }); +/** + * Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax. + * + * Related guide: [Tax rates](/billing/taxes/tax-rates) + */ export const TaxRate: z.ZodType = z.object({ 'active': z.boolean(), 'country': z.string(), @@ -18513,6 +39242,12 @@ export const TaxIdVerification: z.ZodType = z.object({ 'verified_name': z.string() }); +/** + * 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 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) + */ export const TaxId: z.ZodType = z.object({ 'country': z.string(), 'created': z.number().int(), @@ -18555,6 +39290,16 @@ export const TransformUsage: z.ZodType = z.object({ 'round': z.enum(['down', 'up']) }); +/** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ export const Plan: z.ZodType = z.object({ 'active': z.boolean(), 'amount': z.number().int(), @@ -18583,6 +39328,10 @@ export const SubscriptionsTrialsResourceTrial: z.ZodType = z.object({ 'billed_until': z.number().int().optional(), 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]), @@ -18641,6 +39390,10 @@ export const InvoicesResourceInvoiceTaxId: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -18761,6 +39514,11 @@ export const BillingClocksResourceStatusDetailsStatusDetails: z.ZodType = z.object({ 'created': z.number().int(), 'deletes_after': z.number().int(), @@ -18773,6 +39531,11 @@ export const TestHelpersTestClock: z.ZodType = z.obje 'status_details': BillingClocksResourceStatusDetailsStatusDetails }); +/** + * A credit grant is an API resource that documents the allocation of some billing credits to a customer. + * + * Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + */ export const BillingCreditGrant: z.ZodType = z.object({ 'amount': BillingCreditGrantsResourceAmount, 'applicability_config': BillingCreditGrantsResourceApplicabilityConfig, @@ -18804,6 +39567,9 @@ export const BillingCreditGrantsResourceBalanceDebit: z.ZodType = z.object({ 'created': z.number().int(), 'credit': z.union([z.lazy(() => BillingCreditGrantsResourceBalanceCredit)]), @@ -18854,6 +39620,11 @@ export const BillingBillResourceInvoicingTaxesTax: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -18886,6 +39657,10 @@ export const BillingBillResourceInvoicingParentsInvoiceQuoteParent: z.ZodType = z.object({ 'behavior': z.enum(['keep_as_draft', 'mark_uncollectible', 'void']), 'resumes_at': z.number().int() @@ -19009,11 +39784,17 @@ export const DeletedInvoice: z.ZodType = z.object({ 'object': z.enum(['invoice']) }); +/** + * A representation of an amount of money, consisting of an amount and a currency. + */ export const PaymentsPrimitivesPaymentRecordsResourceAmount: z.ZodType = z.object({ 'currency': z.string(), 'value': z.number().int() }); +/** + * Information about the customer for this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType = z.object({ 'customer': z.string(), 'email': z.string(), @@ -19021,6 +39802,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceCustomerDetails: z.ZodType< 'phone': z.string() }); +/** + * A representation of a physical address. + */ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'city': z.string(), 'country': z.string(), @@ -19030,6 +39814,9 @@ export const PaymentsPrimitivesPaymentRecordsResourceAddress: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'email': z.string(), @@ -19069,6 +39856,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsRes 'type': z.string() }); +/** + * Details of the card used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z.ZodType = z.object({ 'brand': z.enum(['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'link', 'mastercard', 'unionpay', 'unknown', 'visa']), 'capture_before': z.number().int().optional(), @@ -19087,6 +39877,11 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails: z 'wallet': z.union([PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWallet]) }); +/** + * Custom Payment Methods represent Payment Method types not modeled directly in + * the Stripe API. This resource consists of details about the custom payment method + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails: z.ZodType = z.object({ 'display_name': z.string(), 'type': z.string() @@ -19103,6 +39898,9 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodUsBankAccountD 'routing_number': z.string() }); +/** + * Details about the Payment Method used in this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.ZodType = z.object({ 'ach_credit_transfer': PaymentMethodDetailsAchCreditTransfer.optional(), 'ach_debit': PaymentMethodDetailsAchDebit.optional(), @@ -19174,21 +39972,38 @@ export const PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails: z.Zod 'zip': PaymentMethodDetailsZip.optional() }); +/** + * Custom processors represent payment processors not modeled directly in + * the Stripe API. This resource consists of details about the custom processor + * used for this payment attempt. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails: z.ZodType = z.object({ 'payment_reference': z.string() }); +/** + * Processor information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceProcessorDetails: z.ZodType = z.object({ 'custom': PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails.optional(), 'type': z.enum(['custom']) }); +/** + * The customer's shipping information associated with this payment. + */ export const PaymentsPrimitivesPaymentRecordsResourceShippingDetails: z.ZodType = z.object({ 'address': PaymentsPrimitivesPaymentRecordsResourceAddress, 'name': z.string(), 'phone': z.string() }); +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + * For example, you can create a Payment Record to model a payment made on a different payment processor, + * in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + * more Payment Attempt Records, which represent individual attempts made on a payment network. + */ export const PaymentRecord: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -19224,6 +40039,16 @@ export const InvoicesPaymentsInvoicePaymentStatusTransitions: z.ZodType = z.object({ 'amount_paid': z.number().int(), 'amount_requested': z.number().int(), @@ -19271,6 +40096,10 @@ export const ShippingRateFixedAmount: z.ZodType = 'currency_options': z.record(z.string(), ShippingRateCurrencyOption).optional() }); +/** + * Shipping rates describe the price of shipping presented to your customers and + * applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + */ export const ShippingRate: z.ZodType = z.object({ 'active': z.boolean(), 'created': z.number().int(), @@ -19318,6 +40147,40 @@ export const InvoiceThresholdReason: z.ZodType = z. 'item_reasons': z.array(InvoiceItemThresholdReason) }); +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export const Invoice: z.ZodType = z.object({ 'account_country': z.string(), 'account_name': z.string(), @@ -19412,6 +40275,10 @@ export const Invoice: z.ZodType = z.object({ 'webhooks_delivered_at': z.number().int() }); +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ export const SubscriptionsResourcePauseCollection: z.ZodType = z.object({ 'behavior': z.enum(['keep_as_draft', 'mark_uncollectible', 'void']), 'resumes_at': z.number().int() @@ -19464,6 +40331,10 @@ export const SubscriptionPendingInvoiceItemInterval: z.ZodType = z.object({ 'billing_cycle_anchor': z.number().int(), 'expires_at': z.number().int(), @@ -19473,6 +40344,9 @@ export const SubscriptionsResourcePendingUpdate: z.ZodType = z.object({ 'invoice': z.union([z.string(), z.lazy(() => Invoice)]), 'period_end': z.number().int(), @@ -19548,6 +40422,9 @@ export const DeletedPrice: z.ZodType = z.object({ 'object': z.enum(['price']) }); +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ export const SubscriptionScheduleAddInvoiceItem: z.ZodType = z.object({ 'discounts': z.array(DiscountsResourceStackableDiscount), 'metadata': z.record(z.string(), z.string()), @@ -19575,6 +40452,9 @@ export const DeletedPlan: z.ZodType = z.object({ 'object': z.enum(['plan']) }); +/** + * A phase item describes the price and quantity of a phase. + */ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'billing_thresholds': z.union([SubscriptionItemBillingThresholds]), 'discounts': z.array(DiscountsResourceStackableDiscount), @@ -19586,18 +40466,31 @@ export const SubscriptionScheduleConfigurationItem: z.ZodType = z.object({ 'behavior': z.enum(['keep_as_draft', 'mark_uncollectible', 'void']) }); +/** + * Defines how the scheduled subscription behaves when a trial ends. + */ export const SubscriptionSchedulesResourceEndBehavior: z.ZodType = z.object({ 'prorate_up_front': z.enum(['defer', 'include']) }); +/** + * Configures how the scheduled subscription behaves during the trial period. + */ export const SubscriptionSchedulesResourceTrialSettings: z.ZodType = z.object({ 'end_behavior': z.union([SubscriptionSchedulesResourceEndBehavior]) }); +/** + * A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ export const SubscriptionSchedulePhaseConfiguration: z.ZodType = z.object({ 'add_invoice_items': z.array(SubscriptionScheduleAddInvoiceItem), 'application_fee_percent': z.number(), @@ -19624,6 +40517,11 @@ export const SubscriptionSchedulePhaseConfiguration: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]), 'billing_behavior': z.enum(['prorate_on_next_phase', 'prorate_up_front']).optional(), @@ -19650,14 +40548,25 @@ export const SubscriptionSchedule: z.ZodType = z.obje 'test_clock': z.union([z.string(), TestHelpersTestClock]) }); +/** + * Defines how a subscription behaves when a free trial ends. + */ export const SubscriptionsTrialsResourceEndBehavior: z.ZodType = z.object({ 'missing_payment_method': z.enum(['cancel', 'create_invoice', 'pause']) }); +/** + * Configures how this subscription behaves during the trial period. + */ export const SubscriptionsTrialsResourceTrialSettings: z.ZodType = z.object({ 'end_behavior': SubscriptionsTrialsResourceEndBehavior }); +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ export const Subscription: z.ZodType = z.object({ 'application': z.union([z.string(), Application, DeletedApplication]), 'application_fee_percent': z.number(), @@ -19728,6 +40637,10 @@ export const CustomerTax: z.ZodType = z.object({ 'provider': z.enum(['anrok', 'avalara', 'sphere', 'stripe']) }); +/** + * This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + * and track payments that belong to the same customer. + */ export const Customer: z.ZodType = z.object({ 'address': z.union([Address]).optional(), 'balance': z.number().int().optional(), @@ -19790,6 +40703,15 @@ export const ExternalAccountRequirements: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]).optional(), 'account_holder_name': z.string(), @@ -19910,6 +40832,13 @@ export const LegalEntityPersonVerification: z.ZodType = z.object({ 'account': z.string().optional(), 'additional_tos_acceptances': PersonAdditionalTosAcceptances.optional(), @@ -20089,6 +41018,20 @@ export const AccountTosAcceptance: z.ZodType = z.obje 'user_agent': z.string().optional() }); +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `application`, which includes Custom accounts, the properties below are always + * returned. + * + * For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) + * is `stripe`, which includes Standard and Express accounts, some properties are only returned + * until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions) + * to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts). + */ export const Account: z.ZodType = z.object({ 'business_profile': z.union([AccountBusinessProfile]).optional(), 'business_type': z.enum(['company', 'government_entity', 'individual', 'non_profit']).optional(), @@ -20121,26 +41064,44 @@ export const Account: z.ZodType = z.object({ 'type': z.enum(['custom', 'express', 'none', 'standard']).optional() }); +/** + * Occurs whenever a user authorizes an application. Sent to the related application only. + */ export const AccountApplicationAuthorized: z.ZodType = z.object({ 'object': Application }); +/** + * Occurs whenever a user deauthorizes an application. Sent to the related application only. + */ export const AccountApplicationDeauthorized: z.ZodType = z.object({ 'object': Application }); +/** + * Occurs whenever an external account is created. + */ export const AccountExternalAccountCreated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an external account is deleted. + */ export const AccountExternalAccountDeleted: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an external account is updated. + */ export const AccountExternalAccountUpdated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever an account status or property has changed. + */ export const AccountUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Account) }); @@ -20167,6 +41128,12 @@ export const AccountCapabilityRequirements: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -20186,6 +41153,11 @@ export const IssuingComplianceNoticeLinkedObjects: z.ZodType = z.object({ 'created': z.number().int(), 'deadline': z.number().int(), @@ -20199,10 +41171,16 @@ export const AccountNotice: z.ZodType = z.object({ 'sent_at': z.number().int() }); +/** + * Occurs whenever an AccountNotice is created. + */ export const AccountNoticeCreated: z.ZodType = z.object({ 'object': AccountNotice }); +/** + * Occurs whenever an AccountNotice is updated. + */ export const AccountNoticeUpdated: z.ZodType = z.object({ 'object': AccountNotice }); @@ -20361,6 +41339,15 @@ export const ConnectEmbeddedAccountSessionCreateComponents: z.ZodType = z.object({ 'account': z.string(), 'client_secret': z.string(), @@ -20378,14 +41365,23 @@ export const ApplePayDomain: z.ZodType = z.object({ 'object': z.enum(['apple_pay_domain']) }); +/** + * Occurs whenever an application fee is created on a charge. + */ export const ApplicationFeeCreated: z.ZodType = z.object({ 'object': z.lazy(() => ApplicationFee) }); +/** + * Occurs whenever an application fee refund is updated. + */ export const ApplicationFeeRefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => FeeRefund) }); +/** + * Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds). This includes partial refunds. + */ export const ApplicationFeeRefunded: z.ZodType = z.object({ 'object': z.lazy(() => ApplicationFee) }); @@ -20395,6 +41391,17 @@ export const SecretServiceResourceScope: z.ZodType = z.object({ 'created': z.number().int(), 'deleted': z.boolean().optional(), @@ -20441,6 +41448,14 @@ export const BalanceDetailUngated: z.ZodType = z.obje 'pending': z.array(BalanceAmount) }); +/** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * The top-level `available` and `pending` comprise your "payments balance." + * + * Related guide: [Balances and settlement time](https://stripe.com/docs/payments/balances), [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ export const Balance: z.ZodType = z.object({ 'available': z.array(BalanceAmount), 'connect_reserved': z.array(BalanceAmount).optional(), @@ -20452,6 +41467,9 @@ export const Balance: z.ZodType = z.object({ 'refund_and_dispute_prefunding': BalanceDetailUngated.optional() }); +/** + * Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. + */ export const BalanceAvailable: z.ZodType = z.object({ 'object': Balance }); @@ -20480,11 +41498,17 @@ export const BalanceSettingsResourcePayments: z.ZodType = z.object({ 'object': z.enum(['balance_settings']), 'payments': BalanceSettingsResourcePayments }); +/** + * Occurs whenever a balance settings status or property has changed. + */ export const BalanceSettingsUpdated: z.ZodType = z.object({ 'object': BalanceSettings }); @@ -20604,6 +41628,11 @@ export const BillingMeterResourceBillingMeterValue: z.ZodType = z.object({ 'created': z.number().int(), 'customer_mapping': BillingMeterResourceCustomerMappingSettings, @@ -20620,6 +41649,9 @@ export const BillingMeter: z.ZodType = z.object({ 'value_settings': BillingMeterResourceBillingMeterValue }); +/** + * The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. + */ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'filters': z.array(ThresholdsResourceUsageAlertFilter), 'gte': z.number().int(), @@ -20627,6 +41659,9 @@ export const ThresholdsResourceUsageThresholdConfig: z.ZodType = z.object({ 'alert_type': z.enum(['usage_threshold']), 'id': z.string(), @@ -20646,6 +41681,9 @@ export const BillingAlertTriggered_1: z.ZodType = 'value': z.string() }); +/** + * Occurs whenever your custom alert threshold is met. + */ export const BillingAlertTriggered: z.ZodType = z.object({ 'object': BillingAlertTriggered_1 }); @@ -20667,6 +41705,9 @@ export const BillingOverviewResourcesMeterUsageRows: z.ZodType = z.object({ 'livemode': z.boolean(), 'object': z.enum(['billing.analytics.meter_usage']), @@ -20679,6 +41720,9 @@ export const CreditBalance: z.ZodType = z.object({ 'ledger_balance': BillingCreditGrantsResourceAmount }); +/** + * Indicates the billing credit balance for billing credits granted to a customer. + */ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'balances': z.array(CreditBalance), 'customer': z.union([z.string(), z.lazy(() => Customer), DeletedCustomer]), @@ -20687,34 +41731,58 @@ export const BillingCreditBalanceSummary: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditBalanceTransaction) }); +/** + * Occurs when a credit grant is created + */ export const BillingCreditGrantCreated: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditGrant) }); +/** + * Occurs when a credit grant is updated + */ export const BillingCreditGrantUpdated: z.ZodType = z.object({ 'object': z.lazy(() => BillingCreditGrant) }); +/** + * Occurs when a meter is created + */ export const BillingMeterCreated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is deactivated + */ export const BillingMeterDeactivated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is reactivated + */ export const BillingMeterReactivated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Occurs when a meter is updated + */ export const BillingMeterUpdated: z.ZodType = z.object({ 'object': BillingMeter }); +/** + * Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. + */ export const BillingMeterEvent: z.ZodType = z.object({ 'created': z.number().int(), 'event_name': z.string(), @@ -20729,6 +41797,9 @@ export const BillingMeterResourceBillingMeterEventAdjustmentCancel: z.ZodType = z.object({ 'cancel': z.union([BillingMeterResourceBillingMeterEventAdjustmentCancel]), 'event_name': z.string(), @@ -20738,6 +41809,12 @@ export const BillingMeterEventAdjustment: z.ZodType = z.object({ 'aggregated_value': z.number(), 'end_time': z.number().int(), @@ -20832,6 +41909,9 @@ export const PortalLoginPage: z.ZodType = z.object({ 'url': z.string() }); +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](/customer-management/configure-portal). + */ export const BillingPortalConfiguration: z.ZodType = z.object({ 'active': z.boolean(), 'application': z.union([z.string(), Application, DeletedApplication]), @@ -20849,10 +41929,16 @@ export const BillingPortalConfiguration: z.ZodType = z.object({ 'object': BillingPortalConfiguration }); +/** + * Occurs whenever a portal configuration is updated. + */ export const BillingPortalConfigurationUpdated: z.ZodType = z.object({ 'object': BillingPortalConfiguration }); @@ -20914,6 +42000,22 @@ export const PortalFlowsFlow: z.ZodType = z.object({ 'type': z.enum(['payment_method_update', 'subscription_cancel', 'subscription_update', 'subscription_update_confirm']) }); +/** + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Related guide: [Customer management](/customer-management) + */ export const BillingPortalSession: z.ZodType = z.object({ 'configuration': z.union([z.string(), BillingPortalConfiguration]), 'created': z.number().int(), @@ -20929,10 +42031,18 @@ export const BillingPortalSession: z.ZodType = z.obje 'url': z.string() }); +/** + * Occurs whenever a portal session is created. + */ export const BillingPortalSessionCreated: z.ZodType = z.object({ 'object': BillingPortalSession }); +/** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ export const Capability: z.ZodType = z.object({ 'account': z.union([z.string(), z.lazy(() => Account)]), 'future_requirements': AccountCapabilityFutureRequirements.optional(), @@ -20944,10 +42054,19 @@ export const Capability: z.ZodType = z.object({ 'status': z.enum(['active', 'inactive', 'pending', 'unrequested']) }); +/** + * Occurs whenever a capability has new requirements or a new status. + */ export const CapabilityUpdated: z.ZodType = z.object({ 'object': Capability }); +/** + * This is an object representing the terms of an offer of financing from + * Stripe Capital to a Connected account. This resource represents + * the terms accepted by the Connected account, which may differ from those + * offered. + */ export const CapitalConnectConnectFinancingAcceptedTerms: z.ZodType = z.object({ 'advance_amount': z.number().int(), 'currency': z.string(), @@ -20956,6 +42075,11 @@ export const CapitalConnectConnectFinancingAcceptedTerms: z.ZodType = z.object({ 'advance_amount': z.number().int(), 'campaign_type': z.enum(['newly_eligible_user', 'previously_eligible_user', 'repeat_user']), @@ -20965,6 +42089,10 @@ export const CapitalConnectConnectFinancingOfferedTerms: z.ZodType = z.object({ 'accepted_terms': CapitalConnectConnectFinancingAcceptedTerms.optional(), 'account': z.string(), @@ -20984,38 +42112,65 @@ export const CapitalFinancingOffer: z.ZodType = z.ob 'type': z.enum(['cash_advance', 'fixed_term_loan', 'flex_loan']).optional() }); +/** + * Occurs whenever a connected account accepts a financing offer. + */ export const CapitalFinancingOfferAccepted: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a financing offer is canceled. + */ export const CapitalFinancingOfferCanceled: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a new financing offer is created for a connected account. + */ export const CapitalFinancingOfferCreated: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a financing offer expires. + */ export const CapitalFinancingOfferExpired: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a financing offer is fully repaid. + */ export const CapitalFinancingOfferFullyRepaid: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a financing offer is paid out. + */ export const CapitalFinancingOfferPaidOut: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a financing offer is rejected. + */ export const CapitalFinancingOfferRejected: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * Occurs whenever a replacement for a financing offer has been created. More details can be [found here](https://docs.stripe.com/capital/replacements). + */ export const CapitalFinancingOfferReplacementCreated: z.ZodType = z.object({ 'object': CapitalFinancingOffer }); +/** + * The current repayment interval for the Connected account. + */ export const CapitalConnectFinancingSummaryCurrentRepaymentWindow: z.ZodType = z.object({ 'due_at': z.number(), 'paid_amount': z.number().int(), @@ -21034,6 +42189,10 @@ export const CapitalConnectFinancingSummaryDetails: z.ZodType = z.object({ 'details': z.union([CapitalConnectFinancingSummaryDetails]), 'financing_offer': z.string(), @@ -21041,11 +42200,17 @@ export const CapitalFinancingSummary: z.ZodType = 'status': z.enum(['accepted', 'delivered', 'none']) }); +/** + * This is an object representing a linked transaction on a Capital Financing Transaction. + */ export const CapitalConnectFinancingTransactionDetailsTransaction: z.ZodType = z.object({ 'charge': z.string().optional(), 'treasury_transaction': z.string().optional() }); +/** + * This is an object representing a transaction on a Capital financing offer. + */ export const CapitalConnectFinancingTransactionDetails: z.ZodType = z.object({ 'advance_amount': z.number().int(), 'currency': z.string(), @@ -21057,6 +42222,9 @@ export const CapitalConnectFinancingTransactionDetails: z.ZodType = z.object({ 'account': z.string(), 'created_at': z.number().int(), @@ -21070,62 +42238,107 @@ export const CapitalFinancingTransaction: z.ZodType = z.object({ 'object': CapitalFinancingTransaction }); +/** + * Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance. + */ export const CashBalanceFundsAvailable: z.ZodType = z.object({ 'object': CashBalance }); +/** + * Occurs whenever a previously uncaptured charge is captured. + */ export const ChargeCaptured: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`. + */ export const ChargeDisputeClosed: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs whenever a customer disputes a charge with their bank. + */ export const ChargeDisputeCreated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when funds are reinstated to your account after a dispute is closed. This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments). + */ export const ChargeDisputeFundsReinstated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when funds are removed from your account due to a dispute. + */ export const ChargeDisputeFundsWithdrawn: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs when the dispute is updated (usually with evidence). + */ export const ChargeDisputeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Dispute) }); +/** + * Occurs whenever an uncaptured charge expires. + */ export const ChargeExpired: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a failed charge attempt occurs. + */ export const ChargeFailed: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a pending charge is created. + */ export const ChargePending: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead. + */ export const ChargeRefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund. + */ export const ChargeRefunded: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a charge is successful. + */ export const ChargeSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); +/** + * Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture. + */ export const ChargeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Charge) }); @@ -21319,6 +42532,9 @@ export const LineItemsDisplay: z.ZodType = z.object({ 'name': z.string() }); +/** + * A line item. + */ export const Item: z.ZodType = z.object({ 'adjustable_quantity': z.union([LineItemsAdjustableQuantity]).optional(), 'amount_discount': z.number().int(), @@ -21539,6 +42755,13 @@ export const PaymentLinksResourceTransferData: z.ZodType Account)]) }); +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + */ export const PaymentLink: z.ZodType = z.object({ 'active': z.boolean(), 'after_completion': PaymentLinksResourceAfterCompletion, @@ -21945,6 +43168,22 @@ export const CheckoutSessionWalletOptions: z.ZodType = z.object({ 'adaptive_pricing': z.union([PaymentPagesCheckoutSessionAdaptivePricing]), 'after_expiration': z.union([PaymentPagesCheckoutSessionAfterExpiration]), @@ -22019,18 +43258,30 @@ export const CheckoutSession: z.ZodType = z.object({ 'wallet_options': z.union([CheckoutSessionWalletOptions]) }); +/** + * Occurs when a payment intent using a delayed payment method fails. + */ export const CheckoutSessionAsyncPaymentFailed: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a payment intent using a delayed payment method finally succeeds. + */ export const CheckoutSessionAsyncPaymentSucceeded: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a Checkout Session has been successfully completed. + */ export const CheckoutSessionCompleted: z.ZodType = z.object({ 'object': CheckoutSession }); +/** + * Occurs when a Checkout Session is expired. + */ export const CheckoutSessionExpired: z.ZodType = z.object({ 'object': CheckoutSession }); @@ -22047,6 +43298,9 @@ export const ClimateRemovalsLocation: z.ZodType = 'region': z.string() }); +/** + * A supplier of carbon removal. + */ export const ClimateSupplier: z.ZodType = z.object({ 'id': z.string(), 'info_url': z.string(), @@ -22057,6 +43311,9 @@ export const ClimateSupplier: z.ZodType = z.object({ 'removal_pathway': z.enum(['biomass_carbon_removal_and_storage', 'direct_air_capture', 'enhanced_weathering']) }); +/** + * The delivery of a specified quantity of carbon for an order. + */ export const ClimateRemovalsOrderDeliveries: z.ZodType = z.object({ 'delivered_at': z.number().int(), 'location': z.union([ClimateRemovalsLocation]), @@ -22071,6 +43328,10 @@ export const ClimateRemovalsProductsPrice: z.ZodType = z.object({ 'created': z.number().int(), 'current_prices_per_metric_ton': z.record(z.string(), ClimateRemovalsProductsPrice), @@ -22083,6 +43344,10 @@ export const ClimateProduct: z.ZodType = z.object({ 'suppliers': z.array(ClimateSupplier) }); +/** + * Orders represent your intent to purchase a particular Climate product. When you create an order, the + * payment is deducted from your merchant balance. + */ export const ClimateOrder: z.ZodType = z.object({ 'amount_fees': z.number().int(), 'amount_subtotal': z.number().int(), @@ -22108,61 +43373,103 @@ export const ClimateOrder: z.ZodType = z.object({ 'status': z.enum(['awaiting_funds', 'canceled', 'confirmed', 'delivered', 'open']) }); +/** + * Occurs when a Climate order is canceled. + */ export const ClimateOrderCanceled: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is created. + */ export const ClimateOrderCreated: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is delayed. + */ export const ClimateOrderDelayed: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order is delivered. + */ export const ClimateOrderDelivered: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate order's product is substituted for another. + */ export const ClimateOrderProductSubstituted: z.ZodType = z.object({ 'object': ClimateOrder }); +/** + * Occurs when a Climate product is created. + */ export const ClimateProductCreated: z.ZodType = z.object({ 'object': ClimateProduct }); +/** + * Occurs when a Climate product is updated. + */ export const ClimateProductPricingUpdated: z.ZodType = z.object({ 'object': ClimateProduct }); +/** + * This hash contains details about the online acceptance. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline: z.ZodType = z.object({ 'ip_address': z.string(), 'user_agent': z.string() }); +/** + * This hash contains details about the customer acceptance of the Mandate. + */ export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptance: z.ZodType = z.object({ 'online': z.union([ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline]), 'type': z.string() }); +/** + * Data used for generating a Mandate. + */ export const ConfirmationTokensResourceMandateData: z.ZodType = z.object({ 'customer_acceptance': ConfirmationTokensResourceMandateDataResourceCustomerAcceptance }); +/** + * Installment configuration for payments. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment: z.ZodType = z.object({ 'plan': PaymentMethodDetailsCardInstallmentsPlan.optional() }); +/** + * This hash contains the card payment method options. + */ export const ConfirmationTokensResourcePaymentMethodOptionsResourceCard: z.ZodType = z.object({ 'cvc_token': z.string(), 'installments': ConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment.optional() }); +/** + * Payment-method-specific configuration + */ export const ConfirmationTokensResourcePaymentMethodOptions: z.ZodType = z.object({ 'card': z.union([ConfirmationTokensResourcePaymentMethodOptionsResourceCard]) }); +/** + * Details of the PaymentMethod collected by Payment Element + */ export const ConfirmationTokensResourcePaymentMethodPreview: z.ZodType = z.object({ 'acss_debit': PaymentMethodAcssDebit.optional(), 'affirm': PaymentMethodAffirm.optional(), @@ -22236,6 +43543,15 @@ export const ConfirmationTokensResourceShipping: z.ZodType = z.object({ 'created': z.number().int(), 'expires_at': z.number().int(), @@ -22263,6 +43579,14 @@ export const CountrySpecVerificationFields: z.ZodType = z.object({ 'default_currency': z.string(), 'id': z.string(), @@ -22274,18 +43598,35 @@ export const CountrySpec: z.ZodType = z.object({ 'verification_fields': CountrySpecVerificationFields }); +/** + * Occurs whenever a coupon is created. + */ export const CouponCreated: z.ZodType = z.object({ 'object': Coupon }); +/** + * Occurs whenever a coupon is deleted. + */ export const CouponDeleted: z.ZodType = z.object({ 'object': Coupon }); +/** + * Occurs whenever a coupon is updated. + */ export const CouponUpdated: z.ZodType = z.object({ 'object': Coupon }); +/** + * Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + */ export const CustomerBalanceTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'checkout_session': z.union([z.string(), CheckoutSession]), @@ -22311,6 +43652,9 @@ export const CreditNotesPretaxCreditAmount: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string(), @@ -22342,6 +43686,11 @@ export const CreditNoteRefund: z.ZodType = z.object({ 'type': z.enum(['payment_record_refund', 'refund']) }); +/** + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + */ export const CreditNote: z.ZodType = z.object({ 'amount': z.number().int(), 'amount_shipping': z.number().int(), @@ -22384,136 +43733,235 @@ export const CreditNote: z.ZodType = z.object({ 'voided_at': z.number().int() }); +/** + * Occurs whenever a credit note is created. + */ export const CreditNoteCreated: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a credit note is updated. + */ export const CreditNoteUpdated: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a credit note is voided. + */ export const CreditNoteVoided: z.ZodType = z.object({ 'object': z.lazy(() => CreditNote) }); +/** + * Occurs whenever a new customer is created. + */ export const CustomerCreated: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a customer is deleted. + */ export const CustomerDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a coupon is attached to a customer. + */ export const CustomerDiscountCreated: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a coupon is removed from a customer. + */ export const CustomerDiscountDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a customer is switched from one coupon to another. + */ export const CustomerDiscountUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Discount) }); +/** + * Occurs whenever a new source is created for a customer. + */ export const CustomerSourceCreated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a source is removed from a customer. + */ export const CustomerSourceDeleted: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won't occur. + */ export const CustomerSourceExpiring: z.ZodType = z.object({ 'object': z.union([z.lazy(() => Card), Source]) }); +/** + * Occurs whenever a source's details are changed. + */ export const CustomerSourceUpdated: z.ZodType = z.object({ 'object': z.union([z.lazy(() => BankAccount), z.lazy(() => Card), Source]) }); +/** + * Occurs whenever collection is paused on a customer's subscription. Only applies when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused, not when subscriptions enter `status=paused`. + */ export const CustomerSubscriptionCollectionPaused: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever collection is resumed on a customer's subscription that is currently paused. Only applies when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed, not when subscriptions exit `status=paused`. + */ export const CustomerSubscriptionCollectionResumed: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer is signed up for a new plan. + */ export const CustomerSubscriptionCreated: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * An ad-hoc custom event that is sent based on user configured [Automation](https://docs.stripe.com/billing/automations#send-custom-webhook-event-action). + */ export const CustomerSubscriptionCustomEvent: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription ends. + */ export const CustomerSubscriptionDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription is paused. Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused. + */ export const CustomerSubscriptionPaused: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated. + */ export const CustomerSubscriptionPendingUpdateApplied: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription's pending update expires before the related invoice is paid. + */ export const CustomerSubscriptionPendingUpdateExpired: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a price migration failed to transition prices on a subscription. + */ export const CustomerSubscriptionPriceMigrationFailed: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a customer's subscription is no longer paused. Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed. + */ export const CustomerSubscriptionResumed: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`). + */ export const CustomerSubscriptionTrialWillEnd: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). + */ export const CustomerSubscriptionUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Subscription) }); +/** + * Occurs whenever a tax ID is created for a customer. + */ export const CustomerTaxIdCreated: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever a tax ID is deleted from a customer. + */ export const CustomerTaxIdDeleted: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever a customer's tax ID is updated. + */ export const CustomerTaxIdUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TaxId) }); +/** + * Occurs whenever any property of a customer changes. + */ export const CustomerUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Customer) }); +/** + * Occurs whenever a new customer cash balance transactions is created. + */ export const CustomerCashBalanceTransactionCreated: z.ZodType = z.object({ 'object': z.lazy(() => CustomerCashBalanceTransaction) }); +/** + * This hash contains whether the buy button is enabled. + */ export const CustomerSessionResourceComponentsResourceBuyButton: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * This hash contains the features the customer sheet supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_remove': z.enum(['disabled', 'enabled']) }); +/** + * This hash contains whether the customer sheet is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceCustomerSheet: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures]) }); +/** + * This hash contains the features the mobile payment element supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_redisplay': z.enum(['disabled', 'enabled']), @@ -22522,11 +43970,17 @@ export const CustomerSessionResourceComponentsResourceMobilePaymentElementResour 'payment_method_save_allow_redisplay_override': z.enum(['always', 'limited', 'unspecified']) }); +/** + * This hash contains whether the mobile payment element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourceMobilePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures]) }); +/** + * This hash contains the features the Payment Element supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures: z.ZodType = z.object({ 'payment_method_allow_redisplay_filters': z.array(z.enum(['always', 'limited', 'unspecified'])), 'payment_method_redisplay': z.enum(['disabled', 'enabled']), @@ -22536,25 +43990,40 @@ export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeat 'payment_method_save_usage': z.enum(['off_session', 'on_session']) }); +/** + * This hash contains whether the Payment Element is enabled and the features it supports. + */ export const CustomerSessionResourceComponentsResourcePaymentElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures]) }); +/** + * This hash contains whether the pricing table is enabled. + */ export const CustomerSessionResourceComponentsResourcePricingTable: z.ZodType = z.object({ 'enabled': z.boolean() }); +/** + * This hash defines whether the Tax ID Element supports certain features. + */ export const CustomerSessionResourceTaxIdElementResourceFeatures: z.ZodType = z.object({ 'tax_id_redisplay': z.enum(['disabled', 'enabled']), 'tax_id_save': z.enum(['disabled', 'enabled']) }); +/** + * This hash contains whether the Tax ID Element is enabled and the features it supports. + */ export const CustomerSessionResourceTaxIdElement: z.ZodType = z.object({ 'enabled': z.boolean(), 'features': z.union([CustomerSessionResourceTaxIdElementResourceFeatures]) }); +/** + * Configuration for the components supported by this Customer Session. + */ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'buy_button': CustomerSessionResourceComponentsResourceBuyButton, 'customer_sheet': CustomerSessionResourceComponentsResourceCustomerSheet, @@ -22564,6 +44033,14 @@ export const CustomerSessionResourceComponents: z.ZodType = z.object({ 'client_secret': z.string(), 'components': CustomerSessionResourceComponents.optional(), @@ -22659,6 +44136,10 @@ export const DeletedWebhookEndpoint: z.ZodType = z. 'object': z.enum(['webhook_endpoint']) }); +/** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const EntitlementsFeature: z.ZodType = z.object({ 'active': z.boolean(), 'id': z.string(), @@ -22669,6 +44150,9 @@ export const EntitlementsFeature: z.ZodType = z.object 'object': z.enum(['entitlements.feature']) }); +/** + * An active entitlement describes access to a feature for a customer. + */ export const EntitlementsActiveEntitlement: z.ZodType = z.object({ 'feature': z.union([z.string(), EntitlementsFeature]), 'id': z.string(), @@ -22677,6 +44161,9 @@ export const EntitlementsActiveEntitlement: z.ZodType = z.object({ 'customer': z.string(), 'entitlements': z.object({ @@ -22689,6 +44176,9 @@ export const EntitlementsActiveEntitlementSummary: z.ZodType = z.object({ 'object': EntitlementsActiveEntitlementSummary }); @@ -22702,6 +44192,9 @@ export const EphemeralKey: z.ZodType = z.object({ 'secret': z.string().optional() }); +/** + * An error response from the Stripe API + */ export const Error: z.ZodType = z.object({ 'error': z.lazy(() => ApiErrors) }); @@ -22732,6 +44225,26 @@ export const NotificationEventReason: z.ZodType = 'type': z.enum(['automation_action', 'request']) }); +/** + * Snapshot events allow you to track and react to activity in your Stripe integration. When + * the state of another API resource changes, Stripe creates an `Event` object that contains + * all the relevant information associated with that action, including the affected API + * resource. For example, a successful payment triggers a `charge.succeeded` event, which + * contains the `Charge` in the event's data property. Some actions trigger multiple events. + * For example, if you create a new subscription for a customer, it triggers both a + * `customer.subscription.created` event and a `charge.succeeded` event. + * + * Configure an event destination in your account to listen for events that represent actions + * your integration needs to respond to. Additionally, you can retrieve an individual event or + * a list of events from the API. + * + * [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications + * that occur in their connected accounts. These events include an account attribute that + * identifies the relevant connected account. + * + * You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event) + * for 30 days. + */ export const Event: z.ZodType = z.object({ 'account': z.string().optional(), 'api_version': z.string(), @@ -22747,16 +44260,52 @@ export const Event: z.ZodType = z.object({ 'type': z.enum(['account.application.authorized', 'account.application.deauthorized', 'account.external_account.created', 'account.external_account.deleted', 'account.external_account.updated', 'account.updated', 'account_notice.created', 'account_notice.updated', 'application_fee.created', 'application_fee.refund.updated', 'application_fee.refunded', 'balance.available', 'balance_settings.updated', 'billing.alert.triggered', 'billing_portal.configuration.created', 'billing_portal.configuration.updated', 'billing_portal.session.created', 'capability.updated', 'capital.financing_offer.accepted', 'capital.financing_offer.accepted_other_offer', 'capital.financing_offer.canceled', 'capital.financing_offer.created', 'capital.financing_offer.expired', 'capital.financing_offer.fully_repaid', 'capital.financing_offer.paid_out', 'capital.financing_offer.rejected', 'capital.financing_offer.replacement_created', 'capital.financing_transaction.created', 'cash_balance.funds_available', 'charge.captured', 'charge.dispute.closed', 'charge.dispute.created', 'charge.dispute.funds_reinstated', 'charge.dispute.funds_withdrawn', 'charge.dispute.updated', 'charge.expired', 'charge.failed', 'charge.pending', 'charge.refund.updated', 'charge.refunded', 'charge.succeeded', 'charge.updated', 'checkout.session.async_payment_failed', 'checkout.session.async_payment_succeeded', 'checkout.session.completed', 'checkout.session.expired', 'climate.order.canceled', 'climate.order.created', 'climate.order.delayed', 'climate.order.delivered', 'climate.order.product_substituted', 'climate.product.created', 'climate.product.pricing_updated', 'coupon.created', 'coupon.deleted', 'coupon.updated', 'credit_note.created', 'credit_note.updated', 'credit_note.voided', 'customer.created', 'customer.deleted', 'customer.discount.created', 'customer.discount.deleted', 'customer.discount.updated', 'customer.source.created', 'customer.source.deleted', 'customer.source.expiring', 'customer.source.updated', 'customer.subscription.collection_paused', 'customer.subscription.collection_resumed', 'customer.subscription.created', 'customer.subscription.custom_event', 'customer.subscription.deleted', 'customer.subscription.paused', 'customer.subscription.pending_update_applied', 'customer.subscription.pending_update_expired', 'customer.subscription.price_migration_failed', 'customer.subscription.resumed', 'customer.subscription.trial_will_end', 'customer.subscription.updated', 'customer.tax_id.created', 'customer.tax_id.deleted', 'customer.tax_id.updated', 'customer.updated', 'customer_cash_balance_transaction.created', 'entitlements.active_entitlement_summary.updated', 'file.created', 'financial_connections.account.account_numbers_updated', 'financial_connections.account.created', 'financial_connections.account.deactivated', 'financial_connections.account.disconnected', 'financial_connections.account.reactivated', 'financial_connections.account.refreshed_balance', 'financial_connections.account.refreshed_inferred_balances', 'financial_connections.account.refreshed_ownership', 'financial_connections.account.refreshed_transactions', 'financial_connections.account.upcoming_account_number_expiry', 'financial_connections.session.updated', 'fx_quote.expired', 'identity.verification_session.canceled', 'identity.verification_session.created', 'identity.verification_session.processing', 'identity.verification_session.redacted', 'identity.verification_session.requires_input', 'identity.verification_session.verified', 'invoice.created', 'invoice.deleted', 'invoice.finalization_failed', 'invoice.finalized', 'invoice.marked_uncollectible', 'invoice.overdue', 'invoice.overpaid', 'invoice.paid', 'invoice.payment.overpaid', 'invoice.payment_action_required', 'invoice.payment_attempt_required', 'invoice.payment_failed', 'invoice.payment_succeeded', 'invoice.sent', 'invoice.upcoming', 'invoice.updated', 'invoice.voided', 'invoice.will_be_due', 'invoice_payment.paid', 'invoiceitem.created', 'invoiceitem.deleted', 'issuing_authorization.created', 'issuing_authorization.request', 'issuing_authorization.updated', 'issuing_card.created', 'issuing_card.updated', 'issuing_cardholder.created', 'issuing_cardholder.updated', 'issuing_dispute.closed', 'issuing_dispute.created', 'issuing_dispute.funds_reinstated', 'issuing_dispute.funds_rescinded', 'issuing_dispute.submitted', 'issuing_dispute.updated', 'issuing_dispute_settlement_detail.created', 'issuing_dispute_settlement_detail.updated', 'issuing_fraud_liability_debit.created', 'issuing_personalization_design.activated', 'issuing_personalization_design.deactivated', 'issuing_personalization_design.rejected', 'issuing_personalization_design.updated', 'issuing_settlement.created', 'issuing_settlement.updated', 'issuing_token.created', 'issuing_token.updated', 'issuing_transaction.created', 'issuing_transaction.purchase_details_receipt_updated', 'issuing_transaction.updated', 'mandate.updated', 'payment_intent.amount_capturable_updated', 'payment_intent.canceled', 'payment_intent.created', 'payment_intent.partially_funded', 'payment_intent.payment_failed', 'payment_intent.processing', 'payment_intent.requires_action', 'payment_intent.succeeded', 'payment_link.created', 'payment_link.updated', 'payment_method.attached', 'payment_method.automatically_updated', 'payment_method.detached', 'payment_method.updated', 'payout.canceled', 'payout.created', 'payout.failed', 'payout.paid', 'payout.reconciliation_completed', 'payout.updated', 'person.created', 'person.deleted', 'person.updated', 'plan.created', 'plan.deleted', 'plan.updated', 'price.created', 'price.deleted', 'price.updated', 'privacy.redaction_job.canceled', 'privacy.redaction_job.created', 'privacy.redaction_job.ready', 'privacy.redaction_job.succeeded', 'privacy.redaction_job.validation_error', 'product.created', 'product.deleted', 'product.updated', 'promotion_code.created', 'promotion_code.updated', 'quote.accept_failed', 'quote.accepted', 'quote.accepting', 'quote.canceled', 'quote.created', 'quote.draft', 'quote.finalized', 'quote.reestimate_failed', 'quote.reestimated', 'quote.stale', 'radar.early_fraud_warning.created', 'radar.early_fraud_warning.updated', 'refund.created', 'refund.failed', 'refund.updated', 'reporting.report_run.failed', 'reporting.report_run.succeeded', 'reporting.report_type.updated', 'review.closed', 'review.opened', 'setup_intent.canceled', 'setup_intent.created', 'setup_intent.requires_action', 'setup_intent.setup_failed', 'setup_intent.succeeded', 'sigma.scheduled_query_run.created', 'source.canceled', 'source.chargeable', 'source.failed', 'source.mandate_notification', 'source.refund_attributes_required', 'source.transaction.created', 'source.transaction.updated', 'subscription_schedule.aborted', 'subscription_schedule.canceled', 'subscription_schedule.completed', 'subscription_schedule.created', 'subscription_schedule.expiring', 'subscription_schedule.price_migration_failed', 'subscription_schedule.released', 'subscription_schedule.updated', 'tax.form.updated', 'tax.settings.updated', 'tax_rate.created', 'tax_rate.updated', 'terminal.reader.action_failed', 'terminal.reader.action_succeeded', 'terminal.reader.action_updated', 'test_helpers.test_clock.advancing', 'test_helpers.test_clock.created', 'test_helpers.test_clock.deleted', 'test_helpers.test_clock.internal_failure', 'test_helpers.test_clock.ready', 'topup.canceled', 'topup.created', 'topup.failed', 'topup.reversed', 'topup.succeeded', 'transfer.created', 'transfer.reversed', 'transfer.updated', 'treasury.credit_reversal.created', 'treasury.credit_reversal.posted', 'treasury.debit_reversal.completed', 'treasury.debit_reversal.created', 'treasury.debit_reversal.initial_credit_granted', 'treasury.financial_account.closed', 'treasury.financial_account.created', 'treasury.financial_account.features_status_updated', 'treasury.inbound_transfer.canceled', 'treasury.inbound_transfer.created', 'treasury.inbound_transfer.failed', 'treasury.inbound_transfer.succeeded', 'treasury.outbound_payment.canceled', 'treasury.outbound_payment.created', 'treasury.outbound_payment.expected_arrival_date_updated', 'treasury.outbound_payment.failed', 'treasury.outbound_payment.posted', 'treasury.outbound_payment.returned', 'treasury.outbound_payment.tracking_details_updated', 'treasury.outbound_transfer.canceled', 'treasury.outbound_transfer.created', 'treasury.outbound_transfer.expected_arrival_date_updated', 'treasury.outbound_transfer.failed', 'treasury.outbound_transfer.posted', 'treasury.outbound_transfer.returned', 'treasury.outbound_transfer.tracking_details_updated', 'treasury.received_credit.created', 'treasury.received_credit.failed', 'treasury.received_credit.succeeded', 'treasury.received_debit.created']) }); +/** + * [Deprecated] The `ExchangeRate` APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. + * + * `ExchangeRate` objects allow you to determine the rates that Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + * + * *[Note: this integration path is supported but no longer recommended]* Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + * + * ----- + * + *   + * + * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + * + * - *localize prices for processing payments on Stripe* + * - *reconcile Stripe transactions* + * - *determine how much money to send to a connected account* + * - *determine app fees to charge a connected account* + * + * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + */ export const ExchangeRate: z.ZodType = z.object({ 'id': z.string(), 'object': z.enum(['exchange_rate']), 'rates': z.record(z.string(), z.number()) }); +/** + * Occurs whenever a new Stripe-generated file is available for your account. + */ export const FileCreated: z.ZodType = z.object({ 'object': z.lazy(() => File) }); +/** + * An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow. + */ export const FinancialConnectionsInstitution: z.ZodType = z.object({ 'countries': z.array(z.string()), 'features': BankConnectionsResourceInstitutionFeatureSupport, @@ -22769,6 +44318,9 @@ export const FinancialConnectionsInstitution: z.ZodType = z.object({ 'email': z.string(), 'id': z.string(), @@ -22780,6 +44332,9 @@ export const FinancialConnectionsAccountOwner: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -22792,6 +44347,9 @@ export const FinancialConnectionsAccountOwnership: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]), 'account_numbers': z.array(BankConnectionsResourceAccountNumberDetails), @@ -22817,46 +44375,79 @@ export const FinancialConnectionsAccount: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a new Financial Connections account is created. + */ export const FinancialConnectionsAccountCreated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account's status is updated from `active` to `inactive`. + */ export const FinancialConnectionsAccountDeactivated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account is disconnected. + */ export const FinancialConnectionsAccountDisconnected: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when a Financial Connections account's status is updated from `inactive` to `active`. + */ export const FinancialConnectionsAccountReactivated: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedBalance: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `inferred_balances_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedInferredBalances: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedOwnership: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`. + */ export const FinancialConnectionsAccountRefreshedTransactions: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * Occurs when an Account’s tokenized account number is about to expire. + */ export const FinancialConnectionsAccountUpcomingAccountNumberExpiry: z.ZodType = z.object({ 'object': FinancialConnectionsAccount }); +/** + * A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. + */ export const FinancialConnectionsAccountInferredBalance: z.ZodType = z.object({ 'as_of': z.number().int(), 'current': z.record(z.string(), z.number().int()), @@ -22864,6 +44455,9 @@ export const FinancialConnectionsAccountInferredBalance: z.ZodType = z.object({ 'account_holder': z.union([BankConnectionsResourceAccountholder]), 'accounts': z.object({ @@ -22886,10 +44480,16 @@ export const FinancialConnectionsSession: z.ZodType = z.object({ 'object': FinancialConnectionsSession }); +/** + * A Transaction represents a real transaction that affects a Financial Connections Account balance. + */ export const FinancialConnectionsTransaction: z.ZodType = z.object({ 'account': z.string(), 'amount': z.number().int(), @@ -22916,28 +44516,58 @@ export const FinancialReportingFinanceReportRunRunParameters: z.ZodType = z.object({ 'destination_duration': z.number().int(), 'destination_ip_address': z.string() }); +/** + * Header data. + */ export const ForwardedRequestHeader: z.ZodType = z.object({ 'name': z.string(), 'value': z.string() }); +/** + * Details about the request forwarded to the destination endpoint. + */ export const ForwardedRequestDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'http_method': z.enum(['POST']) }); +/** + * Details about the response from the destination endpoint. + */ export const ForwardedResponseDetails: z.ZodType = z.object({ 'body': z.string(), 'headers': z.array(ForwardedRequestHeader), 'status': z.number().int() }); +/** + * Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + * is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + * provided during onboarding, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe’s limits. + * + * Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + */ export const ForwardingRequest: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -22958,6 +44588,13 @@ export const FundingInstructionsBankTransfer: z.ZodType = z.object({ 'bank_transfer': FundingInstructionsBankTransfer, 'currency': z.string(), @@ -22994,6 +44631,14 @@ export const FxQuoteUsage: z.ZodType = z.object({ 'type': z.enum(['payment', 'transfer']) }); +/** + * The FX Quotes API provides three functions: + * - View Stripe's current exchange rate for any given currency pair. + * - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing uncertainty from FX fluctuations. + * - Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs. + * + * [View the docs](/payments/currencies/localize-prices/fx-quotes-api) + */ export const FxQuote: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -23006,34 +44651,52 @@ export const FxQuote: z.ZodType = z.object({ 'usage': FxQuoteUsage }); +/** + * Occurs when FX Quote's lock_status field transitions to 'Expired'. + */ export const FxQuoteExpired: z.ZodType = z.object({ 'object': FxQuote }); +/** + * Point in Time + */ export const GelatoDataDocumentReportDateOfBirth: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportExpirationDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataDocumentReportIssuedDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataIdNumberReportDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), 'year': z.number().int() }); +/** + * Point in Time + */ export const GelatoDataVerifiedOutputsDate: z.ZodType = z.object({ 'day': z.number().int(), 'month': z.number().int(), @@ -23045,6 +44708,9 @@ export const GelatoDocumentReportError: z.ZodType = z.object({ 'address': z.union([Address]), 'dob': z.union([GelatoDataDocumentReportDateOfBirth]).optional(), @@ -23068,6 +44734,9 @@ export const GelatoEmailReportError: z.ZodType = z. 'reason': z.string() }); +/** + * Result from a email check + */ export const GelatoEmailReport: z.ZodType = z.object({ 'email': z.string(), 'error': z.union([GelatoEmailReportError]), @@ -23079,6 +44748,9 @@ export const GelatoIdNumberReportError: z.ZodType = z.object({ 'dob': z.union([GelatoDataIdNumberReportDate]).optional(), 'error': z.union([GelatoIdNumberReportError]), @@ -23094,6 +44766,9 @@ export const GelatoPhoneReportError: z.ZodType = z. 'reason': z.string() }); +/** + * Result from a phone check + */ export const GelatoPhoneReport: z.ZodType = z.object({ 'error': z.union([GelatoPhoneReportError]), 'phone': z.string(), @@ -23126,6 +44801,9 @@ export const GelatoSelfieReportError: z.ZodType = 'reason': z.string() }); +/** + * Result from a selfie check + */ export const GelatoSelfieReport: z.ZodType = z.object({ 'document': z.string(), 'error': z.union([GelatoSelfieReportError]), @@ -23148,6 +44826,9 @@ export const GelatoSessionIdNumberOptions: z.ZodType = z.object({ 'code': z.enum(['abandoned', 'consent_declined', 'country_not_supported', 'device_not_supported', 'document_expired', 'document_type_not_supported', 'document_unverified_other', 'email_unverified_other', 'email_verification_declined', 'id_number_insufficient_document_data', 'id_number_mismatch', 'id_number_unverified_other', 'phone_unverified_other', 'phone_verification_declined', 'selfie_document_missing_photo', 'selfie_face_mismatch', 'selfie_manipulated', 'selfie_unverified_other', 'under_supported_age']), 'reason': z.string() @@ -23189,6 +44870,19 @@ export const GelatoVerifiedOutputs: z.ZodType = z.ob 'unparsed_sex': z.string().optional() }); +/** + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ export const IdentityVerificationReport: z.ZodType = z.object({ 'client_reference_id': z.string(), 'created': z.number().int(), @@ -23210,6 +44904,19 @@ export const VerificationSessionRedaction: z.ZodType = z.object({ 'client_reference_id': z.string(), 'client_secret': z.string(), @@ -23233,26 +44940,44 @@ export const IdentityVerificationSession: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession is created + */ export const IdentityVerificationSessionCreated: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to processing + */ export const IdentityVerificationSessionProcessing: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession is redacted. + */ export const IdentityVerificationSessionRedacted: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to require user input + */ export const IdentityVerificationSessionRequiresInput: z.ZodType = z.object({ 'object': IdentityVerificationSession }); +/** + * Occurs whenever a VerificationSession transitions to verified + */ export const IdentityVerificationSessionVerified: z.ZodType = z.object({ 'object': IdentityVerificationSession }); @@ -23280,82 +45005,143 @@ export const InboundTransfers: z.ZodType = z.object({ 'us_bank_account': InboundTransfersPaymentMethodDetailsUsBankAccount.optional() }); +/** + * Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks). + */ export const InvoiceCreated: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice is deleted. Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview). + */ export const InvoiceDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice cannot be finalized. See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details. + */ export const InvoiceFinalizationFailed: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever a draft invoice is finalized and updated to be an open invoice. + */ export const InvoiceFinalized: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice is marked uncollectible. + */ export const InvoiceMarkedUncollectible: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days after an invoice becomes due—where X is determined by Automations + */ export const InvoiceOverdue: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + */ export const InvoiceOverpaid: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. + */ export const InvoicePaid: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an InvoicePayment transitions to paid with a non-zero amount_overpaid. + */ export const InvoicePaymentOverpaid: z.ZodType = z.object({ 'object': z.lazy(() => InvoicePayment) }); +/** + * Occurs whenever an invoice payment attempt requires further user action to complete. + */ export const InvoicePaymentActionRequired: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe. + */ export const InvoicePaymentAttemptRequired: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method. + */ export const InvoicePaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice payment attempt succeeds. + */ export const InvoicePaymentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice email is sent out. + */ export const InvoiceSent: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). Note: The received `Invoice` object will not have an invoice ID. + */ export const InvoiceUpcoming: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice changes (e.g., the invoice amount). + */ export const InvoiceUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs whenever an invoice is voided. + */ export const InvoiceVoided: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs X number of days before an invoice becomes due—where X is determined by Automations + */ export const InvoiceWillBeDue: z.ZodType = z.object({ 'object': z.lazy(() => Invoice) }); +/** + * Occurs when an InvoicePayment is successfully paid. + */ export const InvoicePaymentPaid: z.ZodType = z.object({ 'object': z.lazy(() => InvoicePayment) }); +/** + * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + * can be created from within the Dashboard, and they can be used over the API when creating invoices. + */ export const InvoiceRenderingTemplate: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -23376,6 +45162,16 @@ export const ProrationDetails: z.ZodType = z.object({ 'discount_amounts': z.array(DiscountsResourceDiscountAmount) }); +/** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + * + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + * + * Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ export const Invoiceitem: z.ZodType = z.object({ 'amount': z.number().int(), 'currency': z.string(), @@ -23402,10 +45198,16 @@ export const Invoiceitem: z.ZodType = z.object({ 'test_clock': z.union([z.string(), TestHelpersTestClock]) }); +/** + * Occurs whenever an invoice item is created. + */ export const InvoiceitemCreated: z.ZodType = z.object({ 'object': Invoiceitem }); +/** + * Occurs whenever an invoice item is deleted. + */ export const InvoiceitemDeleted: z.ZodType = z.object({ 'object': Invoiceitem }); @@ -23456,6 +45258,11 @@ export const IssuingComplianceCreditUnderwritingRecordUnderwritingException: z.Z 'original_decision_type': z.enum(['additional_information_requested', 'application_rejected', 'credit_limit_approved', 'credit_limit_decreased', 'credit_line_closed', 'no_changes', 'withdrawn_by_applicant']) }); +/** + * 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/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. + */ export const IssuingCreditUnderwritingRecord: z.ZodType = z.object({ 'application': z.union([IssuingComplianceCreditUnderwritingRecordApplication]), 'created': z.number().int(), @@ -23476,6 +45283,9 @@ export const IssuingDisputeSettlementDetailNetworkData: z.ZodType = z.object({ 'amount': z.number().int(), 'card': z.string(), @@ -23491,6 +45301,9 @@ export const IssuingDisputeSettlementDetail: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_transaction': z.union([z.string(), z.lazy(() => BalanceTransaction)]), @@ -23502,120 +45315,208 @@ export const IssuingFraudLiabilityDebit: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling). + */ export const IssuingAuthorizationRequest: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Occurs whenever an authorization is updated. + */ export const IssuingAuthorizationUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingAuthorization) }); +/** + * Occurs whenever a card is created. + */ export const IssuingCardCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingCard) }); +/** + * Occurs whenever a card is updated. + */ export const IssuingCardUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingCard) }); +/** + * Occurs whenever a cardholder is created. + */ export const IssuingCardholderCreated: z.ZodType = z.object({ 'object': IssuingCardholder }); +/** + * Occurs whenever a cardholder is updated. + */ export const IssuingCardholderUpdated: z.ZodType = z.object({ 'object': IssuingCardholder }); +/** + * Occurs whenever a dispute is won, lost or expired. + */ export const IssuingDisputeClosed: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is created. + */ export const IssuingDisputeCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever funds are reinstated to your account for an Issuing dispute. + */ export const IssuingDisputeFundsReinstated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever funds are deducted from your account for an Issuing dispute. + */ export const IssuingDisputeFundsRescinded: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is submitted. + */ export const IssuingDisputeSubmitted: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Occurs whenever a dispute is updated. + */ export const IssuingDisputeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingDispute) }); +/** + * Emitted when the DisputeSettlementDetail object is created + */ export const IssuingDisputeSettlementDetailCreated: z.ZodType = z.object({ 'object': IssuingDisputeSettlementDetail }); +/** + * Emitted when the DisputeSettlementDetail object is updated + */ export const IssuingDisputeSettlementDetailUpdated: z.ZodType = z.object({ 'object': IssuingDisputeSettlementDetail }); +/** + * Occurs whenever funds are deducted from your account for fraud dispute loss liability. + */ export const IssuingFraudLiabilityDebitCreated: z.ZodType = z.object({ 'object': IssuingFraudLiabilityDebit }); +/** + * Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it. + */ export const IssuingPersonalizationDesignActivated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it. + */ export const IssuingPersonalizationDesignDeactivated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is rejected by design review. + */ export const IssuingPersonalizationDesignRejected: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever a personalization design is updated. + */ export const IssuingPersonalizationDesignUpdated: z.ZodType = z.object({ 'object': IssuingPersonalizationDesign }); +/** + * Occurs whenever an issuing settlement is created. + */ export const IssuingSettlementCreated: z.ZodType = z.object({ 'object': IssuingSettlement }); +/** + * Occurs whenever an issuing settlement is updated. + */ export const IssuingSettlementUpdated: z.ZodType = z.object({ 'object': IssuingSettlement }); +/** + * Occurs whenever an issuing digital wallet token is created. + */ export const IssuingTokenCreated: z.ZodType = z.object({ 'object': IssuingToken }); +/** + * Occurs whenever an issuing digital wallet token is updated. + */ export const IssuingTokenUpdated: z.ZodType = z.object({ 'object': IssuingToken }); +/** + * Occurs whenever an issuing transaction is created. + */ export const IssuingTransactionCreated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Occurs whenever an issuing transaction is updated with receipt data. + */ export const IssuingTransactionPurchaseDetailsReceiptUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Occurs whenever an issuing transaction is updated. + */ export const IssuingTransactionUpdated: z.ZodType = z.object({ 'object': z.lazy(() => IssuingTransaction) }); +/** + * Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. + * A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) + */ export const LoginLink: z.ZodType = z.object({ 'created': z.number().int(), 'object': z.enum(['login_link']), 'url': z.string() }); +/** + * Occurs whenever a Mandate is updated. + */ export const MandateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Mandate) }); @@ -23723,6 +45624,13 @@ export const OrdersV2ResourceTotalDetails: z.ZodType = z.object({ 'amount_subtotal': z.number().int(), 'amount_total': z.number().int(), @@ -23800,6 +45708,12 @@ export const OutboundTransfersPaymentMethodDetails: z.ZodType = z.object({ 'amount': PaymentsPrimitivesPaymentRecordsResourceAmount, 'amount_authorized': PaymentsPrimitivesPaymentRecordsResourceAmount, @@ -23833,34 +45747,58 @@ export const PaymentFlowsInstallmentOptions: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent is canceled. + */ export const PaymentIntentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a new PaymentIntent is created. + */ export const PaymentIntentCreated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes. + */ export const PaymentIntentPartiallyFunded: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. + */ export const PaymentIntentPaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has started processing. + */ export const PaymentIntentProcessing: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent transitions to requires_action state + */ export const PaymentIntentRequiresAction: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); +/** + * Occurs when a PaymentIntent has successfully completed payment. + */ export const PaymentIntentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => PaymentIntent) }); @@ -23875,26 +45813,44 @@ export const PaymentIntentTypeSpecificPaymentMethodOptionsClient: z.ZodType = z.object({ 'object': PaymentLink }); +/** + * Occurs when a payment link is updated. + */ export const PaymentLinkUpdated: z.ZodType = z.object({ 'object': PaymentLink }); +/** + * Occurs whenever a new payment method is attached to a customer. + */ export const PaymentMethodAttached: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method's details are automatically updated by the network. + */ export const PaymentMethodAutomaticallyUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method is detached from a customer. + */ export const PaymentMethodDetached: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); +/** + * Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update). + */ export const PaymentMethodUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PaymentMethod) }); @@ -23910,6 +45866,22 @@ export const PaymentMethodConfigResourcePaymentMethodProperties: z.ZodType = z.object({ 'acss_debit': PaymentMethodConfigResourcePaymentMethodProperties.optional(), 'active': z.boolean(), @@ -23980,15 +45952,27 @@ export const PaymentMethodConfiguration: z.ZodType = z.object({ 'error_message': z.string() }); +/** + * Indicates the status of a specific payment method on a payment method domain. + */ export const PaymentMethodDomainResourcePaymentMethodStatus: z.ZodType = z.object({ 'status': z.enum(['active', 'inactive']), 'status_details': PaymentMethodDomainResourcePaymentMethodStatusDetails.optional() }); +/** + * A payment method domain represents a web domain that you have registered with Stripe. + * Stripe Elements use registered payment method domains to control where certain payment methods are shown. + * + * Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + */ export const PaymentMethodDomain: z.ZodType = z.object({ 'amazon_pay': PaymentMethodDomainResourcePaymentMethodStatus, 'apple_pay': PaymentMethodDomainResourcePaymentMethodStatus, @@ -24004,66 +45988,114 @@ export const PaymentMethodDomain: z.ZodType = z.object 'paypal': PaymentMethodDomainResourcePaymentMethodStatus }); +/** + * Occurs whenever a payout is canceled. + */ export const PayoutCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is created. + */ export const PayoutCreated: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout attempt fails. + */ export const PayoutFailed: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is *expected* to be available in the destination account. If the payout fails, a `payout.failed` notification is also sent, at a later time. + */ export const PayoutPaid: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever balance transactions paid out in an automatic payout can be queried. + */ export const PayoutReconciliationCompleted: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a payout is updated. + */ export const PayoutUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Payout) }); +/** + * Occurs whenever a person associated with an account is created. + */ export const PersonCreated: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a person associated with an account is deleted. + */ export const PersonDeleted: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a person associated with an account is updated. + */ export const PersonUpdated: z.ZodType = z.object({ 'object': Person }); +/** + * Occurs whenever a plan is created. + */ export const PlanCreated: z.ZodType = z.object({ 'object': Plan }); +/** + * Occurs whenever a plan is deleted. + */ export const PlanDeleted: z.ZodType = z.object({ 'object': Plan }); +/** + * Occurs whenever a plan is updated. + */ export const PlanUpdated: z.ZodType = z.object({ 'object': Plan }); +/** + * Occurs whenever a price is created. + */ export const PriceCreated: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * Occurs whenever a price is deleted. + */ export const PriceDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * Occurs whenever a price is updated. + */ export const PriceUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Price) }); +/** + * The objects to redact, grouped by type. All redactable objects associated with these objects will be redacted as well. + */ export const RedactionResourceRootObjects: z.ZodType = z.object({ 'charges': z.array(z.string()), 'checkout_sessions': z.array(z.string()), @@ -24076,6 +46108,12 @@ export const RedactionResourceRootObjects: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -24086,31 +46124,54 @@ export const PrivacyRedactionJob: z.ZodType = z.object 'validation_behavior': z.enum(['error', 'fix']) }); +/** + * Occurs whenever a redaction job is canceled. + */ export const PrivacyRedactionJobCanceled: z.ZodType = z.object({ 'object': PrivacyRedactionJob }); +/** + * Occurs whenever a redaction job is created. + */ export const PrivacyRedactionJobCreated: z.ZodType = z.object({ 'object': PrivacyRedactionJob }); +/** + * Occurs whenever a redaction job has been successfully validated and is ready to run. + */ export const PrivacyRedactionJobReady: z.ZodType = z.object({ 'object': PrivacyRedactionJob }); +/** + * Occurs whenever a redaction job finishes running. + */ export const PrivacyRedactionJobSucceeded: z.ZodType = z.object({ 'object': PrivacyRedactionJob }); +/** + * Occurs whenever a redaction job fails validation. + */ export const PrivacyRedactionJobValidationError: z.ZodType = z.object({ 'object': PrivacyRedactionJob }); +/** + * If a Redaction Job Validation Error occurred because of a specific object, this will contain its identifier and object type. + */ export const RedactionResourceErroringObject: z.ZodType = z.object({ 'id': z.string(), 'object_type': z.string() }); +/** + * The Redaction Job validation error object contains information about + * errors that affect the ability to redact a specific object in a + * redaction job. + */ export const PrivacyRedactionJobValidationError_1: z.ZodType = z.object({ 'code': z.enum(['invalid_cascading_source', 'invalid_file_purpose', 'invalid_state', 'locked_by_other_job', 'too_many_objects']), 'erroring_object': z.union([RedactionResourceErroringObject]), @@ -24119,18 +46180,31 @@ export const PrivacyRedactionJobValidationError_1: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * Occurs whenever a product is deleted. + */ export const ProductDeleted: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * Occurs whenever a product is updated. + */ export const ProductUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Product) }); +/** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ export const ProductFeature: z.ZodType = z.object({ 'entitlement_feature': EntitlementsFeature, 'id': z.string(), @@ -24138,10 +46212,16 @@ export const ProductFeature: z.ZodType = z.object({ 'object': z.enum(['product_feature']) }); +/** + * Occurs whenever a promotion code is created. + */ export const PromotionCodeCreated: z.ZodType = z.object({ 'object': z.lazy(() => PromotionCode) }); +/** + * Occurs whenever a promotion code is updated. + */ export const PromotionCodeUpdated: z.ZodType = z.object({ 'object': z.lazy(() => PromotionCode) }); @@ -24286,6 +46366,9 @@ export const QuotesResourceSubscriptionDataBillOnAcceptance: z.ZodType = z.object({ 'flexible': SubscriptionsResourceBillingModeFlexible.optional(), 'type': z.enum(['classic', 'flexible']) @@ -24337,6 +46420,10 @@ export const QuotesResourceTransferData: z.ZodType Account)]) }); +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ export const Quote: z.ZodType = z.object({ 'allow_backdated_lines': z.boolean().optional(), 'amount_subtotal': z.number().int(), @@ -24386,42 +46473,72 @@ export const Quote: z.ZodType = z.object({ 'transfer_data': z.union([QuotesResourceTransferData]) }); +/** + * Occurs whenever a quote acceptance fails + */ export const QuoteAcceptFailed: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is accepted. + */ export const QuoteAccepted: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote's status changes to accepting + */ export const QuoteAccepting: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is canceled. + */ export const QuoteCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is created. + */ export const QuoteCreated: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs when a quote's status changes from stale to draft + */ export const QuoteDraft: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote is finalized. + */ export const QuoteFinalized: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote reestimate fails + */ export const QuoteReestimateFailed: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever an async job to compute preview subscription schedules/upcoming invoices for the quote has completed. + */ export const QuoteReestimated: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); +/** + * Occurs whenever a quote's status changes to stale + */ export const QuoteStale: z.ZodType = z.object({ 'object': z.lazy(() => Quote) }); @@ -24469,6 +46586,9 @@ export const QuoteLineAction: z.ZodType = z.object({ 'type': z.enum(['add_discount', 'add_item', 'add_metadata', 'clear_discounts', 'clear_metadata', 'remove_discount', 'remove_item', 'remove_metadata', 'set_discounts', 'set_items', 'set_metadata']) }); +/** + * Configures the immediate cancellation settings for a subscription schedule via quotes. + */ export const QuotesResourceQuoteLinesCancelSubscriptionSchedule: z.ZodType = z.object({ 'cancel_at': z.enum(['line_starts_at']), 'invoice_now': z.boolean(), @@ -24487,6 +46607,9 @@ export const QuotesResourceQuoteLinesTimestampHelpersEndsAt: z.ZodType = z.object({ 'set': z.union([SubscriptionSchedulesResourcePauseCollection]).optional(), 'type': z.enum(['remove', 'set']) @@ -24500,14 +46623,23 @@ export const QuotesResourceQuoteLinesTimestampHelpersStartsAt: z.ZodType = z.object({ 'prorate_up_front': z.enum(['defer', 'include']) }); +/** + * Configures how the scheduled subscription behaves during the trial period. + */ export const QuotesResourceQuoteLinesTrialSettings: z.ZodType = z.object({ 'end_behavior': z.union([QuotesResourceQuoteLinesEndBehavior]) }); +/** + * A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance. + */ export const QuoteLine: z.ZodType = z.object({ 'actions': z.array(QuoteLineAction).optional(), 'applies_to': z.union([QuotesResourceQuoteLinesAppliesTo]), @@ -24523,6 +46655,40 @@ export const QuoteLine: z.ZodType = z.object({ 'trial_settings': z.union([QuotesResourceQuoteLinesTrialSettings]).optional() }); +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + */ export const QuotePreviewInvoice: z.ZodType = z.object({ 'account_country': z.string(), 'account_name': z.string(), @@ -24641,6 +46807,12 @@ export const QuotePreviewSubscriptionSchedule: z.ZodType = z.object({ 'actionable': z.boolean(), 'charge': z.union([z.string(), z.lazy(() => Charge)]), @@ -24652,14 +46824,25 @@ export const RadarEarlyFraudWarning: z.ZodType = z. 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]).optional() }); +/** + * Occurs whenever an early fraud warning is created. + */ export const RadarEarlyFraudWarningCreated: z.ZodType = z.object({ 'object': RadarEarlyFraudWarning }); +/** + * Occurs whenever an early fraud warning is updated. + */ export const RadarEarlyFraudWarningUpdated: z.ZodType = z.object({ 'object': RadarEarlyFraudWarning }); +/** + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueListItem: z.ZodType = z.object({ 'created': z.number().int(), 'created_by': z.string(), @@ -24670,6 +46853,11 @@ export const RadarValueListItem: z.ZodType = z.object({ 'value_list': z.string() }); +/** + * Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + */ export const RadarValueList: z.ZodType = z.object({ 'alias': z.string(), 'created': z.number().int(), @@ -24693,18 +46881,37 @@ export const ReceivedPaymentMethodDetailsFinancialAccount: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a refund has failed. + */ export const RefundFailed: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * Occurs whenever a refund is updated. + */ export const RefundUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Refund) }); +/** + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export const ReportingReportRun: z.ZodType = z.object({ 'created': z.number().int(), 'error': z.string(), @@ -24718,14 +46925,30 @@ export const ReportingReportRun: z.ZodType = z.object({ 'succeeded_at': z.number().int() }); +/** + * Occurs whenever a requested `ReportRun` failed to complete. + */ export const ReportingReportRunFailed: z.ZodType = z.object({ 'object': ReportingReportRun }); +/** + * Occurs whenever a requested `ReportRun` completed successfully. + */ export const ReportingReportRunSucceeded: z.ZodType = z.object({ 'object': ReportingReportRun }); +/** + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ export const ReportingReportType: z.ZodType = z.object({ 'data_available_end': z.number().int(), 'data_available_start': z.number().int(), @@ -24738,14 +46961,23 @@ export const ReportingReportType: z.ZodType = z.object 'version': z.number().int() }); +/** + * Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available). + */ export const ReportingReportTypeUpdated: z.ZodType = z.object({ 'object': ReportingReportType }); +/** + * Occurs whenever a review is closed. The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`. + */ export const ReviewClosed: z.ZodType = z.object({ 'object': z.lazy(() => Review) }); +/** + * Occurs whenever a review is opened. + */ export const ReviewOpened: z.ZodType = z.object({ 'object': z.lazy(() => Review) }); @@ -24754,6 +46986,12 @@ export const SigmaScheduledQueryRunError: z.ZodType = z.object({ 'created': z.number().int(), 'data_load_time': z.number().int(), @@ -24768,22 +47006,37 @@ export const ScheduledQueryRun: z.ZodType = z.object({ 'title': z.string() }); +/** + * Occurs when a SetupIntent is canceled. + */ export const SetupIntentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a new SetupIntent is created. + */ export const SetupIntentCreated: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a SetupIntent is in requires_action state. + */ export const SetupIntentRequiresAction: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when a SetupIntent has failed the attempt to setup a payment method. + */ export const SetupIntentSetupFailed: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); +/** + * Occurs when an SetupIntent has successfully setup a payment method. + */ export const SetupIntentSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => SetupIntent) }); @@ -24792,18 +47045,30 @@ export const SetupIntentTypeSpecificPaymentMethodOptionsClient: z.ZodType = z.object({ 'object': ScheduledQueryRun }); +/** + * Occurs whenever a source is canceled. + */ export const SourceCanceled: z.ZodType = z.object({ 'object': Source }); +/** + * Occurs whenever a source transitions to chargeable. + */ export const SourceChargeable: z.ZodType = z.object({ 'object': Source }); +/** + * Occurs whenever a source fails. + */ export const SourceFailed: z.ZodType = z.object({ 'object': Source }); @@ -24822,6 +47087,11 @@ export const SourceMandateNotificationSepaDebitData: z.ZodType = z.object({ 'acss_debit': SourceMandateNotificationAcssDebitData.optional(), 'amount': z.number().int(), @@ -24837,10 +47107,16 @@ export const SourceMandateNotification_1: z.ZodType = z.object({ 'object': SourceMandateNotification_1 }); +/** + * Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment. + */ export const SourceRefundAttributesRequired: z.ZodType = z.object({ 'object': Source }); @@ -24881,6 +47157,12 @@ export const SourceTransactionSepaCreditTransferData: z.ZodType = z.object({ 'ach_credit_transfer': SourceTransactionAchCreditTransferData.optional(), 'amount': z.number().int(), @@ -24898,42 +47180,72 @@ export const SourceTransaction: z.ZodType = z.object({ 'type': z.enum(['ach_credit_transfer', 'ach_debit', 'alipay', 'bancontact', 'card', 'card_present', 'eps', 'giropay', 'ideal', 'klarna', 'multibanco', 'p24', 'sepa_debit', 'sofort', 'three_d_secure', 'wechat']) }); +/** + * Occurs whenever a source transaction is created. + */ export const SourceTransactionCreated: z.ZodType = z.object({ 'object': SourceTransaction }); +/** + * Occurs whenever a source transaction is updated. + */ export const SourceTransactionUpdated: z.ZodType = z.object({ 'object': SourceTransaction }); +/** + * Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency. + */ export const SubscriptionScheduleAborted: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a subscription schedule is canceled. + */ export const SubscriptionScheduleCanceled: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is completed. + */ export const SubscriptionScheduleCompleted: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is created. + */ export const SubscriptionScheduleCreated: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs 7 days before a subscription schedule will expire. + */ export const SubscriptionScheduleExpiring: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a price migration failed to transition prices on a subscription schedule. + */ export const SubscriptionSchedulePriceMigrationFailed: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a new subscription schedule is released. + */ export const SubscriptionScheduleReleased: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); +/** + * Occurs whenever a subscription schedule is updated. + */ export const SubscriptionScheduleUpdated: z.ZodType = z.object({ 'object': z.lazy(() => SubscriptionSchedule) }); @@ -24953,6 +47265,9 @@ export const TaxProductResourceTaxAssociationTransactionAttempts: z.ZodType = z.object({ 'calculation': z.string(), 'id': z.string(), @@ -25050,6 +47365,11 @@ export const TaxProductResourceTaxBreakdown: z.ZodType = z.object({ 'amount_total': z.number().int(), 'currency': z.string(), @@ -25128,6 +47448,11 @@ export const TaxReportingResourceTaxFormUs1099Nec: z.ZodType = z.object({ 'au_serr': TaxReportingResourceTaxFormAuSerr.optional(), 'ca_mrdp': TaxReportingResourceTaxFormCaMrdp.optional(), @@ -25147,6 +47472,9 @@ export const TaxForm: z.ZodType = z.object({ 'us_1099_nec': TaxReportingResourceTaxFormUs1099Nec.optional() }); +/** + * Occurs when a tax form is updated. + */ export const TaxFormUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TaxForm) }); @@ -25318,6 +47646,13 @@ export const TaxProductRegistrationsResourceCountryOptions: z.ZodType = z.object({ 'active_from': z.number().int(), 'country': z.string(), @@ -25353,6 +47688,11 @@ export const TaxProductResourceTaxSettingsStatusDetails: z.ZodType = z.object({ 'defaults': TaxProductResourceTaxSettingsDefaults, 'head_office': z.union([TaxProductResourceTaxSettingsHeadOffice]), @@ -25362,6 +47702,9 @@ export const TaxSettings: z.ZodType = z.object({ 'status_details': TaxProductResourceTaxSettingsStatusDetails }); +/** + * Occurs whenever tax settings is updated. + */ export const TaxSettingsUpdated: z.ZodType = z.object({ 'object': TaxSettings }); @@ -25399,6 +47742,11 @@ export const TaxProductResourceTaxTransactionShippingCost: z.ZodType = z.object({ 'created': z.number().int(), 'currency': z.string(), @@ -25423,10 +47771,16 @@ export const TaxTransaction: z.ZodType = z.object({ 'type': z.enum(['reversal', 'transaction']) }); +/** + * Occurs whenever a new tax rate is created. + */ export const TaxRateCreated: z.ZodType = z.object({ 'object': TaxRate }); +/** + * Occurs whenever a tax rate is updated. + */ export const TaxRateUpdated: z.ZodType = z.object({ 'object': TaxRate }); @@ -25506,6 +47860,10 @@ export const TerminalConfigurationConfigurationResourceWifiConfig: z.ZodType = z.object({ 'bbpos_wisepad3': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), 'bbpos_wisepos_e': TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.optional(), @@ -25523,12 +47881,22 @@ export const TerminalConfiguration: z.ZodType = z.ob 'wifi': TerminalConfigurationConfigurationResourceWifiConfig.optional() }); +/** + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalConnectionToken: z.ZodType = z.object({ 'location': z.string().optional(), 'object': z.enum(['terminal.connection_token']), 'secret': z.string() }); +/** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ export const TerminalLocation: z.ZodType = z.object({ 'address': Address, 'address_kana': LegalEntityJapanAddress.optional(), @@ -25544,15 +47912,24 @@ export const TerminalLocation: z.ZodType = z.object({ 'phone': z.string().optional() }); +/** + * Options associated with the Apple Terms and Conditions link type. + */ export const TerminalOnboardingLinkAppleTermsAndConditions: z.ZodType = z.object({ 'allow_relinking': z.boolean(), 'merchant_display_name': z.string() }); +/** + * Link type options associated with the current onboarding link object. + */ export const TerminalOnboardingLinkLinkOptions: z.ZodType = z.object({ 'apple_terms_and_conditions': z.union([TerminalOnboardingLinkAppleTermsAndConditions]) }); +/** + * Returns redirect links used for onboarding onto Tap to Pay on iPhone. + */ export const TerminalOnboardingLink: z.ZodType = z.object({ 'link_options': TerminalOnboardingLinkLinkOptions, 'link_type': z.enum(['apple_terms_and_conditions']), @@ -25561,6 +47938,9 @@ export const TerminalOnboardingLink: z.ZodType = z. 'redirect_url': z.string() }); +/** + * Represents custom text to be displayed when collecting the input using a reader + */ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'description': z.string(), 'skip_button': z.string(), @@ -25568,38 +47948,62 @@ export const TerminalReaderReaderResourceCustomText: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about a number being collected using a reader + */ export const TerminalReaderReaderResourceNumeric: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about a phone number being collected using a reader + */ export const TerminalReaderReaderResourcePhone: z.ZodType = z.object({ 'value': z.string() }); +/** + * Choice to be selected on a Reader + */ export const TerminalReaderReaderResourceChoice: z.ZodType = z.object({ 'id': z.string(), 'style': z.enum(['primary', 'secondary']), 'text': z.string() }); +/** + * Information about a selection being collected using a reader + */ export const TerminalReaderReaderResourceSelection: z.ZodType = z.object({ 'choices': z.array(TerminalReaderReaderResourceChoice), 'id': z.string(), 'text': z.string() }); +/** + * Information about a signature being collected using a reader + */ export const TerminalReaderReaderResourceSignature: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about text being collected using a reader + */ export const TerminalReaderReaderResourceText: z.ZodType = z.object({ 'value': z.string() }); +/** + * Information about an input's toggle + */ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'default_value': z.enum(['disabled', 'enabled']), 'description': z.string(), @@ -25607,6 +48011,9 @@ export const TerminalReaderReaderResourceToggle: z.ZodType = z.object({ 'custom_text': z.union([TerminalReaderReaderResourceCustomText]), 'email': TerminalReaderReaderResourceEmail.optional(), @@ -25621,21 +48028,33 @@ export const TerminalReaderReaderResourceInput: z.ZodType = z.object({ 'inputs': z.array(TerminalReaderReaderResourceInput), 'metadata': z.record(z.string(), z.string()) }); +/** + * Represents a per-transaction tipping configuration + */ export const TerminalReaderReaderResourceTippingConfig: z.ZodType = z.object({ 'amount_eligible': z.number().int().optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceCollectConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'skip_tipping': z.boolean().optional(), 'tipping': TerminalReaderReaderResourceTippingConfig.optional() }); +/** + * Represents a reader action to collect a payment method + */ export const TerminalReaderReaderResourceCollectPaymentMethodAction: z.ZodType = z.object({ 'account': z.string().optional(), 'collect_config': TerminalReaderReaderResourceCollectConfig.optional(), @@ -25643,16 +48062,25 @@ export const TerminalReaderReaderResourceCollectPaymentMethodAction: z.ZodType PaymentMethod).optional() }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceConfirmConfig: z.ZodType = z.object({ 'return_url': z.string().optional() }); +/** + * Represents a reader action to confirm a payment + */ export const TerminalReaderReaderResourceConfirmPaymentIntentAction: z.ZodType = z.object({ 'account': z.string().optional(), 'confirm_config': TerminalReaderReaderResourceConfirmConfig.optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional(), 'return_url': z.string().optional(), @@ -25660,26 +48088,41 @@ export const TerminalReaderReaderResourceProcessConfig: z.ZodType = z.object({ 'account': z.string().optional(), 'payment_intent': z.union([z.string(), z.lazy(() => PaymentIntent)]), 'process_config': TerminalReaderReaderResourceProcessConfig.optional() }); +/** + * Represents a per-setup override of a reader configuration + */ export const TerminalReaderReaderResourceProcessSetupConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to process a setup intent + */ export const TerminalReaderReaderResourceProcessSetupIntentAction: z.ZodType = z.object({ 'generated_card': z.string().optional(), 'process_config': TerminalReaderReaderResourceProcessSetupConfig.optional(), 'setup_intent': z.union([z.string(), z.lazy(() => SetupIntent)]) }); +/** + * Represents a per-transaction override of a reader configuration + */ export const TerminalReaderReaderResourceRefundPaymentConfig: z.ZodType = z.object({ 'enable_customer_cancellation': z.boolean().optional() }); +/** + * Represents a reader action to refund a payment + */ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'account': z.string().optional(), 'amount': z.number().int().optional(), @@ -25693,12 +48136,18 @@ export const TerminalReaderReaderResourceRefundPaymentAction: z.ZodType = z.object({ 'amount': z.number().int(), 'description': z.string(), 'quantity': z.number().int() }); +/** + * Represents a cart to be displayed on the reader + */ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'currency': z.string(), 'line_items': z.array(TerminalReaderReaderResourceLineItem), @@ -25706,11 +48155,17 @@ export const TerminalReaderReaderResourceCart: z.ZodType = z.object({ 'cart': z.union([TerminalReaderReaderResourceCart]), 'type': z.enum(['cart']) }); +/** + * Represents an action performed by the reader + */ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'collect_inputs': TerminalReaderReaderResourceCollectInputsAction.optional(), 'collect_payment_method': TerminalReaderReaderResourceCollectPaymentMethodAction.optional(), @@ -25725,6 +48180,11 @@ export const TerminalReaderReaderResourceReaderAction: z.ZodType = z.object({ 'action': z.union([TerminalReaderReaderResourceReaderAction]), 'device_sw_version': z.string(), @@ -25741,22 +48201,37 @@ export const TerminalReader: z.ZodType = z.object({ 'status': z.enum(['offline', 'online']) }); +/** + * Occurs whenever an action sent to a Terminal reader failed. + */ export const TerminalReaderActionFailed: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Occurs whenever an action sent to a Terminal reader was successful. + */ export const TerminalReaderActionSucceeded: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Occurs whenever an action sent to a Terminal reader is updated. + */ export const TerminalReaderActionUpdated: z.ZodType = z.object({ 'object': TerminalReader }); +/** + * Represents magstripe data collected by the reader. + */ export const TerminalReaderCollectedDataResourceMagstripeData: z.ZodType = z.object({ 'data': z.string() }); +/** + * Returns data collected by Terminal readers. This data is only stored for 24 hours. + */ export const TerminalReaderCollectedData: z.ZodType = z.object({ 'created': z.number().int(), 'id': z.string(), @@ -25766,26 +48241,63 @@ export const TerminalReaderCollectedData: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock is created. + */ export const TestHelpersTestClockCreated: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock is deleted. + */ export const TestHelpersTestClockDeleted: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock fails to advance its frozen time. + */ export const TestHelpersTestClockInternalFailure: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Occurs whenever a test clock transitions to a ready status. + */ export const TestHelpersTestClockReady: z.ZodType = z.object({ 'object': TestHelpersTestClock }); +/** + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. Use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create [Customer](https://stripe.com/docs/api#customers) + * objects or [External accounts](/api#external_accounts). + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + */ export const Token: z.ZodType = z.object({ 'bank_account': z.lazy(() => BankAccount).optional(), 'card': z.lazy(() => Card).optional(), @@ -25798,34 +48310,58 @@ export const Token: z.ZodType = z.object({ 'used': z.boolean() }); +/** + * Occurs whenever a top-up is canceled. + */ export const TopupCanceled: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up is created. + */ export const TopupCreated: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up fails. + */ export const TopupFailed: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up is reversed. + */ export const TopupReversed: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a top-up succeeds. + */ export const TopupSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => Topup) }); +/** + * Occurs whenever a transfer is created. + */ export const TransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); +/** + * Occurs whenever a transfer is reversed, including partial reversals. + */ export const TransferReversed: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); +/** + * Occurs whenever a transfer's description or metadata is updated. + */ export const TransferUpdated: z.ZodType = z.object({ 'object': z.lazy(() => Transfer) }); @@ -25834,6 +48370,9 @@ export const TreasuryReceivedCreditsResourceStatusTransitions: z.ZodType = z.object({ 'cash': z.number().int(), 'inbound_pending': z.number().int(), @@ -25848,6 +48387,9 @@ export const TreasuryReceivedDebitsResourceStatusTransitions: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -25880,6 +48422,11 @@ export const TreasuryInboundTransfersResourceInboundTransferResourceStatusTransi 'succeeded_at': z.number().int() }); +/** + * Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * + * Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + */ export const TreasuryInboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -25936,6 +48483,13 @@ export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDeta 'us_domestic_wire': TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + */ export const TreasuryOutboundPayment: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -25998,6 +48552,13 @@ export const TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDe 'us_domestic_wire': TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails.optional() }); +/** + * Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + * + * Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + */ export const TreasuryOutboundTransfer: z.ZodType = z.object({ 'amount': z.number().int(), 'cancelable': z.boolean(), @@ -26068,6 +48629,9 @@ export const TreasuryReceivedCreditsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -26111,6 +48675,9 @@ export const TreasuryReceivedDebitsResourceReversalDetails: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -26143,6 +48710,9 @@ export const TreasuryTransactionsResourceFlowDetails: z.ZodType = z.object({ 'balance_impact': TreasuryTransactionsResourceBalanceImpact, 'created': z.number().int(), @@ -26164,6 +48734,9 @@ export const TreasuryTransactionsResourceAbstractTransactionResourceStatusTransi 'void_at': z.number().int() }); +/** + * Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ export const TreasuryTransaction: z.ZodType = z.object({ 'amount': z.number().int(), 'balance_impact': TreasuryTransactionsResourceBalanceImpact, @@ -26187,6 +48760,9 @@ export const TreasuryTransaction: z.ZodType = z.object 'status_transitions': TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions }); +/** + * You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ export const TreasuryCreditReversal: z.ZodType = z.object({ 'amount': z.number().int(), 'created': z.number().int(), @@ -26204,44 +48780,71 @@ export const TreasuryCreditReversal: z.ZodType = z. 'transaction': z.union([z.string(), z.lazy(() => TreasuryTransaction)]) }); +/** + * Occurs whenever an CreditReversal is submitted and created. + */ export const TreasuryCreditReversalCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryCreditReversal) }); +/** + * Occurs whenever an CreditReversal post is posted. + */ export const TreasuryCreditReversalPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryCreditReversal) }); +/** + * Occurs whenever a DebitReversal is completed. + */ export const TreasuryDebitReversalCompleted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Occurs whenever a DebitReversal is created. + */ export const TreasuryDebitReversalCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Occurs whenever an initial credit is granted on a DebitReversal. + */ export const TreasuryDebitReversalInitialCreditGranted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryDebitReversal) }); +/** + * Balance information for the FinancialAccount + */ export const TreasuryFinancialAccountsResourceBalance: z.ZodType = z.object({ 'cash': z.record(z.string(), z.number().int()), 'inbound_pending': z.record(z.string(), z.number().int()), 'outbound_pending': z.record(z.string(), z.number().int()) }); +/** + * Additional details on the FinancialAccount Features information. + */ export const TreasuryFinancialAccountsResourceTogglesSettingStatusDetails: z.ZodType = z.object({ 'code': z.enum(['activating', 'capability_not_requested', 'financial_account_closed', 'rejected_other', 'rejected_unsupported_business', 'requirements_past_due', 'requirements_pending_verification', 'restricted_by_platform', 'restricted_other']), 'resolution': z.enum(['contact_stripe', 'provide_information', 'remove_restriction']), 'restriction': z.enum(['inbound_flows', 'outbound_flows']).optional() }); +/** + * Toggle settings for enabling/disabling a feature + */ export const TreasuryFinancialAccountsResourceToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Toggle settings for enabling/disabling the ABA address feature + */ export const TreasuryFinancialAccountsResourceAbaToggleSettings: z.ZodType = z.object({ 'bank': z.enum(['evolve', 'fifth_third', 'goldman_sachs']).optional(), 'requested': z.boolean(), @@ -26249,36 +48852,58 @@ export const TreasuryFinancialAccountsResourceAbaToggleSettings: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an inbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceInboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * InboundTransfers contains inbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceInboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceInboundAchToggleSettings.optional() }); +/** + * Toggle settings for enabling/disabling an outbound ACH specific feature + */ export const TreasuryFinancialAccountsResourceOutboundAchToggleSettings: z.ZodType = z.object({ 'requested': z.boolean(), 'status': z.enum(['active', 'pending', 'restricted']), 'status_details': z.array(TreasuryFinancialAccountsResourceTogglesSettingStatusDetails) }); +/** + * Settings related to Outbound Payments features on a Financial Account + */ export const TreasuryFinancialAccountsResourceOutboundPayments: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ export const TreasuryFinancialAccountsResourceOutboundTransfers: z.ZodType = z.object({ 'ach': TreasuryFinancialAccountsResourceOutboundAchToggleSettings.optional(), 'us_domestic_wire': TreasuryFinancialAccountsResourceToggleSettings.optional() }); +/** + * Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'card_issuing': TreasuryFinancialAccountsResourceToggleSettings.optional(), 'deposit_insurance': TreasuryFinancialAccountsResourceToggleSettings.optional(), @@ -26290,6 +48915,9 @@ export const TreasuryFinancialAccountFeatures: z.ZodType = z.object({ 'account_holder_name': z.string(), 'account_number': z.string().optional(), @@ -26298,12 +48926,18 @@ export const TreasuryFinancialAccountsResourceAbaRecord: z.ZodType = z.object({ 'aba': TreasuryFinancialAccountsResourceAbaRecord.optional(), 'supported_networks': z.array(z.enum(['ach', 'us_domestic_wire'])).optional(), 'type': z.enum(['aba']) }); +/** + * Restrictions that a Connect Platform has placed on this FinancialAccount. + */ export const TreasuryFinancialAccountsResourcePlatformRestrictions: z.ZodType = z.object({ 'inbound_flows': z.enum(['restricted', 'unrestricted']), 'outbound_flows': z.enum(['restricted', 'unrestricted']) @@ -26317,6 +48951,10 @@ export const TreasuryFinancialAccountsResourceStatusDetails: z.ZodType = z.object({ 'active_features': z.array(z.enum(['card_issuing', 'deposit_insurance', 'financial_addresses.aba', 'financial_addresses.aba.forwarding', 'inbound_transfers.ach', 'intra_stripe_flows', 'outbound_payments.ach', 'outbound_payments.us_domestic_wire', 'outbound_transfers.ach', 'outbound_transfers.us_domestic_wire', 'remote_deposit_capture'])).optional(), 'balance': TreasuryFinancialAccountsResourceBalance, @@ -26339,106 +48977,190 @@ export const TreasuryFinancialAccount: z.ZodType 'supported_currencies': z.array(z.string()) }); +/** + * Occurs whenever the status of the FinancialAccount becomes closed. + */ export const TreasuryFinancialAccountClosed: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever a new FinancialAccount is created. + */ export const TreasuryFinancialAccountCreated: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever the statuses of any features within an existing FinancialAccount are updated. + */ export const TreasuryFinancialAccountFeaturesStatusUpdated: z.ZodType = z.object({ 'object': TreasuryFinancialAccount }); +/** + * Occurs whenever an InboundTransfer is canceled. + */ export const TreasuryInboundTransferCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer is created. + */ export const TreasuryInboundTransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer has failed. + */ export const TreasuryInboundTransferFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an InboundTransfer has succeeded. + */ export const TreasuryInboundTransferSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryInboundTransfer) }); +/** + * Occurs whenever an OutboundPayment is canceled. + */ export const TreasuryOutboundPaymentCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever a new OutboundPayment is successfully created. + */ export const TreasuryOutboundPaymentCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever the arrival date on an OutboundPayment updates. + */ export const TreasuryOutboundPaymentExpectedArrivalDateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment fails. + */ export const TreasuryOutboundPaymentFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment posts. + */ export const TreasuryOutboundPaymentPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundPayment was returned. + */ export const TreasuryOutboundPaymentReturned: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever tracking_details on an OutboundPayment is updated. + */ export const TreasuryOutboundPaymentTrackingDetailsUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundPayment) }); +/** + * Occurs whenever an OutboundTransfer is canceled. + */ export const TreasuryOutboundTransferCanceled: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is created. + */ export const TreasuryOutboundTransferCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever the arrival date on an OutboundTransfer updates. + */ export const TreasuryOutboundTransferExpectedArrivalDateUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer has failed. + */ export const TreasuryOutboundTransferFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is posted. + */ export const TreasuryOutboundTransferPosted: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever an OutboundTransfer is returned. + */ export const TreasuryOutboundTransferReturned: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever tracking_details on an OutboundTransfer is updated. + */ export const TreasuryOutboundTransferTrackingDetailsUpdated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryOutboundTransfer) }); +/** + * Occurs whenever a received_credit is created as a result of funds being pushed by another account. + */ export const TreasuryReceivedCreditCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits. + */ export const TreasuryReceivedCreditFailed: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_credit transitions to succeeded state. Only applicable for check deposits. + */ export const TreasuryReceivedCreditSucceeded: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedCredit) }); +/** + * Occurs whenever a received_debit is created as a result of funds being pulled by another account. + */ export const TreasuryReceivedDebitCreated: z.ZodType = z.object({ 'object': z.lazy(() => TreasuryReceivedDebit) }); +/** + * You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + */ export const WebhookEndpoint: z.ZodType = z.object({ 'api_version': z.string(), 'application': z.string(), diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/api.ts index 8dee271..4f81000 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/api.ts @@ -16,47 +16,262 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'webhooks': { 'event': { 'settings': { +/** + * Create a new Event Webhook + * + * **This endpoint allows you to create a new Event Webhook.** + * + * When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. + * + * ### Webhook identifiers + * + * When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). + * + * You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. + * + * ### OAuth + * + * You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. + * + * You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. + * + * ### Signature verification + * + * Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + */ 'POST': f.builder().def_json().def_body(Model.EventWebhookRequest.parse).def_response(async ({ json }) => Model.EventWebhookUnsignedResponse.parse(await json())), 'all': { +/** + * Retrieve all of your Event Webhooks. + * + * **This endpoint allows you to retrieve all of your Event Webhooks.** + * + * Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. + * + * ### Event settings + * + * Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. + * + * ### Signature verification + * + * The `public_key` property will be returned only for webhooks with signature verification enabled. + * + * ### OAuth + * + * You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.EventWebhookAllResponse.parse(await json())) }, 'signed': { '$id': { +/** + * Get Signed Event Webhook's Public Key + * + * **This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** + * + * If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. + * + * Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + * + * For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + */ 'GET': f.builder().def_json(), +/** + * Toggle signature verification for a single Event Webhook by ID + * + * **This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** + * + * If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. + * + * This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. + * + * For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + */ 'PATCH': f.builder().def_json() } }, '$id': { +/** + * Get the settings for a single Event Webhook. + * + * **This endpoint allows you to retrieve a single Event Webhook by ID.** + * + * If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. + * + * ### Event settings + * + * Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. + * + * ### Signature verification + * + * The `public_key` property will be returned only for webhooks with signature verification enabled. + * + * ### OAuth + * + * You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.EventWebhookNoDatesResponse.parse(await json())), +/** + * Update a single Event Webhook by ID. + * + * **This endpoint allows you to update a single Event Webhook by ID.** + * + * If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. + * + * ### Enable or disable the webhook + * + * You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. + * + * ### URL + * + * A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. + * + * ### Event settings + * + * If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. + * + * ### Webhook identifiers + * + * You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. + * + * ### OAuth + * + * You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. + * + * ### Signature verification + * + * Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + */ 'PATCH': f.builder().def_json().def_body(Model.EventWebhookRequest.parse).def_response(async ({ json }) => Model.EventWebhookUnsignedResponse.parse(await json())), +/** + * Delete a single Event Webhook by ID. + * + * **This endpoint allows you to delete a single Event Webhook by ID.** + * + * Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. + * + * ### Enable or disable the webhook + * + * This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. + */ 'DELETE': f.builder().def_json() } }, 'test': { +/** + * Test an Event Webhook's settings + * + * **This endpoint allows you to test an Event Webhook.** + * + * Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. + * + * This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. + * + * ### Test OAuth configuration + * + * To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. + * + * If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. + * + * You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. + */ 'POST': f.builder().def_json().def_body(Model.EventWebhookTestRequest.parse) } }, 'parse': { 'settings': { +/** + * Retrieve all parse settings + * + * **This endpoint allows you to retrieve all of your current inbound parse settings.** + */ 'GET': f.builder().def_json(), +/** + * Create a parse setting + * + * **This endpoint allows you to create a new inbound parse setting.** + * + * Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. + * + * The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. + * + * Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. + * + * The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. + */ 'POST': f.builder().def_json().def_response(async ({ json }) => Model.ParseSetting.parse(await json())), '$hostname': { +/** + * Retrieve a specific parse setting + * + * **This endpoint allows you to retrieve a specific inbound parse setting by hostname.** + * + * You can retrieve all your Inbound Parse settings and their associated host names with the "Retrieve all parse settings" endpoint. + */ 'GET': f.builder().def_json().def_response(async ({ json }) => Model.ParseSetting.parse(await json())), +/** + * Update a parse setting + * + * **This endpoint allows you to update a specific inbound parse setting by hostname.** + * + * You can retrieve all your Inbound Parse settings and their associated host names with the "Retrieve all parse settings" endpoint. + */ 'PATCH': f.builder().def_json().def_response(async ({ json }) => Model.ParseSetting.parse(await json())), +/** + * Delete a parse setting + * + * **This endpoint allows you to delete a specific inbound parse setting by hostname.** + * + * You can retrieve all your Inbound Parse settings and their associated host names with the "Retrieve all parse settings" endpoint. + */ 'DELETE': f.builder().def_json() } }, 'stats': { +/** + * Retrieves Inbound Parse Webhook statistics. + * + * **This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** + * + * SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. + * + * There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). + */ 'GET': f.builder().def_json().def_searchparams(z.object({ limit: z.string().optional(), offset: z.string().optional(), aggregated_by: AggregatedBy.optional(), start_date: z.string(), end_date: z.string().optional() }).parse) } }, 'security': { 'policies': { +/** + * Create a new webhook security policy + * + * Create a new webhook security policy. Note: One of signature or oauth must be given to have a valid security policy. + */ 'POST': f.builder().def_json(), +/** + * Retrieve all webhook security policies for your account + * + * Returns a list of all webhook security policies configured for your account, including their IDs, names, and security configurations. + */ 'GET': f.builder().def_json(), '$id': { +/** + * Update an existing webhook security policy + * + * Update an existing webhook security policy with new configuration values. + */ 'PATCH': f.builder().def_json(), +/** + * Retrieve a specific webhook security policy + * + * Retrieve the details of a specific webhook security policy by its ID. + */ 'GET': f.builder().def_json(), +/** + * Delete a specific webhook security policy + * + * Permanently delete a webhook security policy by its ID. + */ 'DELETE': f.builder().def_json().def_searchparams(z.object({ force: z.boolean().optional() }).parse) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/models.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/models.ts index 9167141..6ad8f62 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/models.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/twilo/models.ts @@ -3,153 +3,492 @@ import { z } from 'zod'; // Helper types for schemas export type EventWebhookRequestModel = { + /** + * Set this property to `true` to enable the Event Webhook or `false` to disable it. + */ 'enabled'?: boolean | undefined; + /** + * Set this property to the URL where you want the Event Webhook to send event data. + */ 'url': string; + /** + * Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_resubscribe'?: boolean | undefined; + /** + * Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + */ 'delivered'?: boolean | undefined; + /** + * Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_unsubscribe'?: boolean | undefined; + /** + * Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. + */ 'spam_report'?: boolean | undefined; + /** + * Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. + */ 'bounce'?: boolean | undefined; + /** + * Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + */ 'deferred'?: boolean | undefined; + /** + * Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'unsubscribe'?: boolean | undefined; + /** + * Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. + */ 'processed'?: boolean | undefined; + /** + * Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + */ 'open'?: boolean | undefined; + /** + * Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + */ 'click'?: boolean | undefined; + /** + * Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + */ 'dropped'?: boolean | undefined; + /** + * Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + */ 'friendly_name'?: string | undefined; + /** + * Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + */ 'oauth_client_id'?: string | undefined; + /** + * Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + */ 'oauth_client_secret'?: string | undefined; + /** + * Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + */ 'oauth_token_url'?: string | undefined; }; export type EventWebhookTestRequestModel = { + /** + * The ID of the Event Webhook you want to retrieve. + */ 'id'?: string | undefined; + /** + * The URL where you would like the test notification to be sent. + */ 'url': string; + /** + * The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + */ 'oauth_client_id'?: string | undefined; + /** + * The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + */ 'oauth_client_secret'?: string | undefined; + /** + * The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + */ 'oauth_token_url'?: string | undefined; }; export type EventWebhookBaseResponsePropsModel = { + /** + * Indicates if the Event Webhook is enabled. + */ 'enabled'?: boolean | undefined; + /** + * The URL where SendGrid will send event data. + */ 'url'?: string | undefined; + /** + * Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + */ 'account_status_change'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_resubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + */ 'delivered'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + */ 'spam_report'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + */ 'bounce'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + */ 'deferred'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + */ 'processed'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + */ 'open'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + */ 'click'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + */ 'dropped'?: boolean | undefined; + /** + * An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + */ 'friendly_name'?: string | undefined; + /** + * A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + */ 'id'?: string | undefined; }; export type EventWebhookDateResponsePropsModel = { + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + */ 'created_date'?: string | undefined; + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + */ 'updated_date'?: string | undefined; }; export type EventWebhookOauthResponsePropsModel = { + /** + * The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + */ 'oauth_client_id'?: string | undefined; + /** + * The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + */ 'oauth_token_url'?: string | undefined; }; export type EventWebhookSignedResponsePropModel = { + /** + * The public key you can use to verify the SendGrid signature. + */ 'public_key'?: string | undefined; }; export type EventWebhookUnsignedResponseModel = { + /** + * Indicates if the Event Webhook is enabled. + */ 'enabled'?: boolean | undefined; + /** + * The URL where SendGrid will send event data. + */ 'url'?: string | undefined; + /** + * Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + */ 'account_status_change'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_resubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + */ 'delivered'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + */ 'spam_report'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + */ 'bounce'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + */ 'deferred'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + */ 'processed'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + */ 'open'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + */ 'click'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + */ 'dropped'?: boolean | undefined; + /** + * An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + */ 'friendly_name'?: string | undefined; + /** + * A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + */ 'id'?: string | undefined; + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + */ 'created_date'?: string | undefined; + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + */ 'updated_date'?: string | undefined; + /** + * The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + */ 'oauth_client_id'?: string | undefined; + /** + * The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + */ 'oauth_token_url'?: string | undefined; }; export type EventWebhookSignedResponseModel = { + /** + * Indicates if the Event Webhook is enabled. + */ 'enabled'?: boolean | undefined; + /** + * The URL where SendGrid will send event data. + */ 'url'?: string | undefined; + /** + * Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + */ 'account_status_change'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_resubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + */ 'delivered'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + */ 'spam_report'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + */ 'bounce'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + */ 'deferred'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + */ 'processed'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + */ 'open'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + */ 'click'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + */ 'dropped'?: boolean | undefined; + /** + * An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + */ 'friendly_name'?: string | undefined; + /** + * A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + */ 'id'?: string | undefined; + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + */ 'created_date'?: string | undefined; + /** + * An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + */ 'updated_date'?: string | undefined; + /** + * The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + */ 'oauth_client_id'?: string | undefined; + /** + * The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + */ 'oauth_token_url'?: string | undefined; + /** + * The public key you can use to verify the SendGrid signature. + */ 'public_key'?: string | undefined; }; export type EventWebhookNoDatesResponseModel = { + /** + * Indicates if the Event Webhook is enabled. + */ 'enabled'?: boolean | undefined; + /** + * The URL where SendGrid will send event data. + */ 'url'?: string | undefined; + /** + * Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + */ 'account_status_change'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_resubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + */ 'delivered'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'group_unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + */ 'spam_report'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + */ 'bounce'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + */ 'deferred'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + */ 'unsubscribe'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + */ 'processed'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + */ 'open'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + */ 'click'?: boolean | undefined; + /** + * Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + */ 'dropped'?: boolean | undefined; + /** + * An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + */ 'friendly_name'?: string | undefined; + /** + * A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + */ 'id'?: string | undefined; + /** + * The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + */ 'oauth_client_id'?: string | undefined; + /** + * The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + */ 'oauth_token_url'?: string | undefined; + /** + * The public key you can use to verify the SendGrid signature. + */ 'public_key'?: string | undefined; }; export type EventWebhookAllResponseModel = { + /** + * The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. + */ 'max_allowed'?: number | undefined; + /** + * An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. + */ 'webhooks'?: EventWebhookSignedResponseModel[] | undefined; }; export type ParseSettingModel = { + /** + * The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. + */ 'url'?: string | undefined; + /** + * A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. + */ 'hostname'?: string | undefined; + /** + * Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. + */ 'spam_check'?: boolean | undefined; + /** + * Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. + */ 'send_raw'?: boolean | undefined; }; export type ErrorResponseModel = { 'errors'?: Array<{ + /** + * An error message. + */ 'message'?: string | undefined; + /** + * When applicable, this property value will be the field that generated the error. + */ 'field'?: string | undefined; + /** + * When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + */ 'help'?: {} | undefined; }> | undefined; + /** + * When applicable, this property value will be an error ID. + */ 'id'?: string | undefined; }; diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/api.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/api.ts index d7cc8bb..03cce51 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/api.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/api.ts @@ -14,7 +14,15 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = { 'youtube': { 'v3': { 'videos': { +/** + * Retrieves a list of resources, possibly filtered. + * + * Returns a list of videos that match the API request parameters. + */ 'GET': f.builder().def_json().def_searchparams(z.object({ part: z.array(z.enum(['contentDetails', 'fileDetails', 'id', 'liveStreamingDetails', 'localizations', 'player', 'processingDetails', 'recordingDetails', 'snippet', 'statistics', 'status', 'suggestions', 'topicDetails'])), id: z.array(z.string()).optional(), chart: z.enum(['chartUnspecified', 'mostPopular']).optional(), maxResults: z.number().int().min(1).max(50).optional(), pageToken: z.string().optional() }).parse).def_response(async ({ json }) => Model.VideoListResponse.parse(await json())), +/** + * Uploads a video to YouTube. + */ 'POST': f.builder().def_json().def_searchparams(z.object({ part: z.array(z.enum(['snippet', 'status', 'player'])) }).parse).def_body(Model.Video.parse).def_response(async ({ json }) => Model.Video.parse(await json())) } } diff --git a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/models.ts b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/models.ts index 61a1806..167c626 100644 --- a/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/models.ts +++ b/packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/youtube/models.ts @@ -63,6 +63,9 @@ export type VideoStatusModel = { }; export type VideoStatisticsModel = { + /** + * Type is string because view counts can exceed 2^32. + */ 'viewCount'?: string | undefined; 'likeCount'?: string | undefined; 'dislikeCount'?: string | undefined; @@ -76,6 +79,9 @@ export type VideoPlayerModel = { 'embedWidth'?: number | undefined; }; +/** + * A video resource represents a YouTube video. + */ export type VideoModel = { 'kind'?: string | undefined; 'etag'?: string | undefined; @@ -184,6 +190,9 @@ export const VideoPlayer: z.ZodType = z.object({ 'embedWidth': z.number().int().optional() }); +/** + * A video resource represents a YouTube video. + */ export const Video: z.ZodType = z.object({ 'kind': z.string().optional(), 'etag': z.string().optional(), diff --git a/packages/create_freestyle_fetch/src/__tests__/router_generator.test.ts b/packages/create_freestyle_fetch/src/__tests__/router_generator.test.ts index ea89d7e..848d051 100644 --- a/packages/create_freestyle_fetch/src/__tests__/router_generator.test.ts +++ b/packages/create_freestyle_fetch/src/__tests__/router_generator.test.ts @@ -259,8 +259,39 @@ describe('Router Generator Comprehensive Tests', () => { const parsedPaths = parsePaths(spec) const code = generateRouter(parsedPaths, spec) - expect(code).not.toContain('summary') - expect(code).not.toContain('description') + // Should not contain them as keys in the object + expect(code).not.toMatch(/'summary':/) + expect(code).not.toMatch(/'description':/) + + // But should contain them as JSDoc + expect(code).toContain('/**') + expect(code).toContain('* User operations') + expect(code).toContain('* All user related things') + expect(code).toContain('*/') + expect(code).toContain("'GET': f.builder()") + }) + + it('should generate JSDoc for operations', () => { + const spec: OpenAPIV3_1.Document = { + ...baseSpec, + paths: { + '/users': { + get: { + summary: 'Get Users', + description: 'Returns all users', + responses: { '200': { description: 'OK' } }, + }, + }, + }, + } + const parsedPaths = parsePaths(spec) + const code = generateRouter(parsedPaths, spec) + + expect(code).toContain('/**') + expect(code).toContain('* Get Users') + expect(code).toContain('*') + expect(code).toContain('* Returns all users') + expect(code).toContain('*/') expect(code).toContain("'GET': f.builder()") }) diff --git a/packages/create_freestyle_fetch/src/__tests__/schema_generator.test.ts b/packages/create_freestyle_fetch/src/__tests__/schema_generator.test.ts index 5d7f422..89e88c2 100644 --- a/packages/create_freestyle_fetch/src/__tests__/schema_generator.test.ts +++ b/packages/create_freestyle_fetch/src/__tests__/schema_generator.test.ts @@ -1101,4 +1101,51 @@ describe('SchemaGenerator', () => { expect(result).toContain('ProductList') }) }) + + describe('JSDoc Generation', () => { + it('should generate JSDoc for models', () => { + const spec = createSpec({ + User: { + type: 'object', + description: 'A user object', + properties: { + name: { + type: 'string', + description: 'The user name', + }, + }, + }, + }) + const generator = new SchemaGenerator(spec) + const result = generator.generateModels() + + expect(result).toContain('/**\n * A user object\n */') + expect(result).toContain('/**\n * The user name\n */') + }) + + it('should generate JSDoc for properties', () => { + const spec = createSpec({ + User: { + type: 'object', + properties: { + name: { + type: 'string', + description: 'The user name', + }, + age: { + type: 'number', + description: 'The user age\nMust be positive', + }, + }, + }, + }) + const generator = new SchemaGenerator(spec) + const result = generator.generateModels() + + expect(result).toContain('/**\n * The user name\n */') + expect(result).toContain( + '/**\n * The user age\n * Must be positive\n */' + ) + }) + }) }) diff --git a/packages/create_freestyle_fetch/src/__tests__/utils.test.ts b/packages/create_freestyle_fetch/src/__tests__/utils.test.ts index ac07ade..c48f827 100644 --- a/packages/create_freestyle_fetch/src/__tests__/utils.test.ts +++ b/packages/create_freestyle_fetch/src/__tests__/utils.test.ts @@ -1,7 +1,111 @@ import { describe, expect, it } from 'vitest' -import { toPascalCase } from '../utils' +import { + convertHtmlToMarkdown, + createJSDocComment, + toPascalCase, +} from '../utils' describe('utils', () => { + describe('convertHtmlToMarkdown', () => { + it('should return empty string for empty input', () => { + expect(convertHtmlToMarkdown('')).toBe('') + }) + + it('should convert paragraphs to newlines', () => { + expect(convertHtmlToMarkdown('

Hello

World

')).toBe( + 'Hello\n\nWorld' + ) + }) + + it('should convert links to markdown', () => { + expect( + convertHtmlToMarkdown( + 'Example' + ) + ).toBe('[Example](https://example.com)') + }) + + it('should convert code tags to backticks', () => { + expect(convertHtmlToMarkdown('code')).toBe('`code`') + }) + + it('should convert bold tags', () => { + expect(convertHtmlToMarkdown('bold')).toBe( + '**bold**' + ) + expect(convertHtmlToMarkdown('bold')).toBe('**bold**') + }) + + it('should convert italic tags', () => { + expect(convertHtmlToMarkdown('italic')).toBe('*italic*') + expect(convertHtmlToMarkdown('italic')).toBe('*italic*') + }) + + it('should convert lists', () => { + expect( + convertHtmlToMarkdown('
  • Item 1
  • Item 2
') + ).toBe('- Item 1\n- Item 2') + }) + + it('should handle complex nested HTML', () => { + const html = ` +

This is a bold statement.

+

Check out this link.

+
    +
  • Item 1
  • +
  • Item 2 with code
  • +
+ ` + const expected = `This is a **bold** statement.\n\nCheck out [this link](/link).\n\n- Item 1\n- Item 2 with \`code\`` + // Normalize whitespace for comparison + expect( + convertHtmlToMarkdown(html).replace(/\s+/g, ' ').trim() + ).toBe(expected.replace(/\s+/g, ' ').trim()) + }) + + it('should decode HTML entities', () => { + expect(convertHtmlToMarkdown('<div>')).toBe('
') + expect(convertHtmlToMarkdown('&')).toBe('&') + }) + }) + + describe('createJSDocComment', () => { + it('should return empty string if no summary or description', () => { + expect(createJSDocComment()).toBe('') + expect(createJSDocComment(undefined, undefined)).toBe('') + }) + + it('should generate JSDoc with summary only', () => { + const result = createJSDocComment('This is a summary') + expect(result).toBe('/**\n * This is a summary\n */\n') + }) + + it('should generate JSDoc with description only', () => { + const result = createJSDocComment( + undefined, + 'This is a description' + ) + expect(result).toBe('/**\n * This is a description\n */\n') + }) + + it('should generate JSDoc with summary and description', () => { + const result = createJSDocComment('Summary', 'Description') + expect(result).toBe('/**\n * Summary\n *\n * Description\n */\n') + }) + + it('should handle multi-line descriptions', () => { + const result = createJSDocComment('Summary', 'Line 1\nLine 2') + expect(result).toBe( + '/**\n * Summary\n *\n * Line 1\n * Line 2\n */\n' + ) + }) + + it('should handle indentation', () => { + const result = createJSDocComment('Summary', undefined, ' ') + expect(result).toBe(' /**\n * Summary\n */\n') + }) + }) + describe('toPascalCase', () => { it('should convert kebab-case to PascalCase', () => { expect(toPascalCase('user-profile')).toBe('UserProfile') diff --git a/packages/create_freestyle_fetch/src/router_generator.ts b/packages/create_freestyle_fetch/src/router_generator.ts index ebda1a9..6fbad71 100644 --- a/packages/create_freestyle_fetch/src/router_generator.ts +++ b/packages/create_freestyle_fetch/src/router_generator.ts @@ -1,7 +1,7 @@ import type { OpenAPIV3_1 } from 'openapi-types' import { OperationValidationError } from './errors' import { SchemaGenerator } from './schema_generator' -import { toPascalCase } from './utils' +import { createJSDocComment, toPascalCase } from './utils' function isReferenceObject(obj: any): obj is OpenAPIV3_1.ReferenceObject { return obj && '$ref' in obj @@ -135,8 +135,12 @@ export function generateRouter( for (const key in pathNode) { const value = pathNode[key] if (httpMethods.has(key.toLowerCase())) { + const jsDoc = createJSDocComment( + value.summary, + value.description + ) parts.push( - `'${key.toUpperCase()}': ${generateBuilder( + `${jsDoc}'${key.toUpperCase()}': ${generateBuilder( value, pathLevelParams, schemaGenerator, @@ -150,8 +154,12 @@ export function generateRouter( !openApiMetadataKeys.has(key) ) { const nextPath = currentPath ? `${currentPath}/${key}` : key + const jsDoc = createJSDocComment( + value.summary, + value.description + ) parts.push( - `'${key}': {\n${buildRouterObject(value, nextPath)}\n}` + `${jsDoc}'${key}': {\n${buildRouterObject(value, nextPath)}\n}` ) } } diff --git a/packages/create_freestyle_fetch/src/schema_generator.ts b/packages/create_freestyle_fetch/src/schema_generator.ts index 81ff5ba..3356a8e 100644 --- a/packages/create_freestyle_fetch/src/schema_generator.ts +++ b/packages/create_freestyle_fetch/src/schema_generator.ts @@ -1,6 +1,6 @@ import type { OpenAPIV3_1 } from 'openapi-types' import { SchemaValidationError } from './errors' // Assumed existing -import { toPascalCase } from './utils' // Assumed existing +import { createJSDocComment, toPascalCase } from './utils' // Assumed existing export class SchemaGenerator { private spec: OpenAPIV3_1.Document @@ -81,8 +81,17 @@ export class SchemaGenerator { modelStrings.push('// Helper types for schemas') for (const name of sortedSchemaNames) { const pascalName = this.getSchemaName(name) + const schema = this.spec.components?.schemas?.[name] + const description = + schema && !this.isReferenceObject(schema) + ? schema.description + : undefined + const jsDoc = createJSDocComment(undefined, description) + const typeDef = this.mapSchemaObjectToType(name) - modelStrings.push(`export type ${pascalName}Model = ${typeDef};`) + modelStrings.push( + `${jsDoc}export type ${pascalName}Model = ${typeDef};` + ) } modelStrings.push('') @@ -94,8 +103,15 @@ export class SchemaGenerator { const pascalName = this.getSchemaName(name) // Use explicit type for perf. + const schema = this.spec.components?.schemas?.[name] + const description = + schema && !this.isReferenceObject(schema) + ? schema.description + : undefined + const jsDoc = createJSDocComment(undefined, description) + modelStrings.push( - `export const ${pascalName}: z.ZodType<${pascalName}Model> = ${zodSchema};` + `${jsDoc}export const ${pascalName}: z.ZodType<${pascalName}Model> = ${zodSchema};` ) } @@ -172,8 +188,17 @@ export class SchemaGenerator { key, value ) + const description = + 'description' in value + ? (value.description as string) + : undefined + const jsDoc = createJSDocComment( + undefined, + description, + ' ' + ) props.push( - ` '${key}'${isRequired ? '' : '?'}: ${typeStr}${isRequired ? '' : ' | undefined'};` + `${jsDoc} '${key}'${isRequired ? '' : '?'}: ${typeStr}${isRequired ? '' : ' | undefined'};` ) } ) diff --git a/packages/create_freestyle_fetch/src/utils.ts b/packages/create_freestyle_fetch/src/utils.ts index 0cda5ee..2712fe6 100644 --- a/packages/create_freestyle_fetch/src/utils.ts +++ b/packages/create_freestyle_fetch/src/utils.ts @@ -52,3 +52,86 @@ export function toPascalCase(str: string): string { }) .join('') } + +/** + * Converts HTML content to Markdown for better JSDoc rendering + */ +export function convertHtmlToMarkdown(html: string): string { + if (!html) return '' + + let markdown = html + // Replace

tags with double newlines + .replace(/

/g, '\n\n') + .replace(/<\/p>/g, '') + // Replace
with newline + .replace(//g, '\n') + // Replace tags with markdown links [text](url) + .replace( + /]*?\s+)?href="([^"]*)"[^>]*>(.*?)<\/a>/g, + '[$2]($1)' + ) + // Replace tags with backticks + .replace(/(.*?)<\/code>/g, '`$1`') + // Replace and with bold + .replace(/<(?:strong|b)>(.*?)<\/(?:strong|b)>/g, '**$1**') + // Replace and with italic + .replace(/<(?:em|i)>(.*?)<\/(?:em|i)>/g, '*$1*') + // Replace